Example #1
0
 public static void FullPivLU(ReadOnlySpan <double> firstMatrix,
                              int rows1,
                              int cols1,
                              Span <double> l,
                              Span <double> u,
                              Span <double> p,
                              Span <double> q)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pL = &MemoryMarshal.GetReference(l))
             {
                 fixed(double *pU = &MemoryMarshal.GetReference(u))
                 {
                     fixed(double *pP = &MemoryMarshal.GetReference(p))
                     {
                         fixed(double *pQ = &MemoryMarshal.GetReference(q))
                         {
                             ThunkDenseEigen.dfullPivLU_(pfirst, rows1, cols1, pL, pU, pP, pQ);
                         }
                     }
                 }
             }
         }
     }
 }
Example #2
0
 public static void EigenSolver(
     ReadOnlySpan <double> firstMatrix, int size,
     Span <double> outRealEigenvalues,
     Span <double> outImagEigenValue,
     Span <double> outRealEigenVectors,
     Span <double> outImagEigenVectors)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pRealOut = &MemoryMarshal.GetReference(outRealEigenvalues))
             {
                 fixed(double *pImageOut = &MemoryMarshal.GetReference(outImagEigenValue))
                 {
                     fixed(double *pRealVectorOut = &MemoryMarshal.GetReference(outRealEigenVectors))
                     {
                         fixed(double *pImageVectorOut = &MemoryMarshal.GetReference(outImagEigenVectors))
                         {
                             ThunkDenseEigen.deigenvalues_(pfirst, size, pRealOut, pImageOut, pRealVectorOut, pImageVectorOut);
                         }
                     }
                 }
             }
         }
     }
 }
Example #3
0
 public static double Determinant(ReadOnlySpan <double> firstMatrix, int rows1, int cols1)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             return(ThunkDenseEigen.ddeterminant_(pfirst, rows1, cols1));
         }
     }
 }
Example #4
0
 public static double LpInfNorm(ReadOnlySpan <double> firstVector, int length)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstVector))
         {
             return(ThunkDenseEigen.dvlpinf_norm_(pfirst, length));
         }
     }
 }
Example #5
0
 public static void Scale(ReadOnlySpan <double> vector, double scalar, int length, Span <double> outVector)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(vector))
         {
             fixed(double *pOut = &MemoryMarshal.GetReference(outVector))
             {
                 ThunkDenseEigen.dscale_(pfirst, scalar, length, pOut);
             }
         }
     }
 }
Example #6
0
 public static double Dot(ReadOnlySpan <double> firstVector, ReadOnlySpan <double> secondVector, int length)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstVector))
         {
             fixed(double *pSecond = &MemoryMarshal.GetReference(secondVector))
             {
                 return(ThunkDenseEigen.ddot_(pfirst, pSecond, length));
             }
         }
     }
 }
Example #7
0
 public static void Determinant(ReadOnlySpan <double> firstMatrix, int rows1, int cols1, Span <double> mout)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pmout = &MemoryMarshal.GetReference(mout))
             {
                 ThunkDenseEigen.dinverse_(pfirst, rows1, cols1, pmout);
             }
         }
     }
 }
Example #8
0
 public static double LpInfNorm(
     ReadOnlySpan <double> firstMatrix,
     int rows1,
     int cols1)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             return(ThunkDenseEigen.dlpinf_norm_(pfirst, rows1, cols1));
         }
     }
 }
Example #9
0
 public static void TMult(ReadOnlySpan <double> firstMatrix, int rows, int cols, Span <double> outMatrix)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pOut = &MemoryMarshal.GetReference(outMatrix))
             {
                 ThunkDenseEigen.da_tmult_(pfirst, rows, cols, pOut);
             }
         }
     }
 }
Example #10
0
 public static void PlusT(ReadOnlySpan <double> firstMatrix, int size, Span <double> outMatrix)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pOut = &MemoryMarshal.GetReference(outMatrix))
             {
                 ThunkDenseEigen.dxplusxt_(pfirst, size, pOut);
             }
         }
     }
 }
Example #11
0
 public static double RelativeError(ReadOnlySpan <double> firstMatrix, int rows1, int cols1, ReadOnlySpan <double> rhs, ReadOnlySpan <double> x)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pX = &MemoryMarshal.GetReference(x))
             {
                 fixed(double *pRhs = &MemoryMarshal.GetReference(rhs))
                 {
                     return(ThunkDenseEigen.drelative_error_(pfirst, rows1, cols1, pRhs, pX));
                 }
             }
         }
     }
 }
Example #12
0
 public static void Add(ReadOnlySpan <double> firstVector, ReadOnlySpan <double> secondVector, int length, Span <double> outVector)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstVector))
         {
             fixed(double *pSecond = &MemoryMarshal.GetReference(secondVector))
             {
                 fixed(double *pOut = &MemoryMarshal.GetReference(outVector))
                 {
                     ThunkDenseEigen.dadd_(pfirst, pSecond, length, pOut);
                 }
             }
         }
     }
 }
Example #13
0
 public static void Transpose(
     ReadOnlySpan <double> firstMatrix,
     int rows1,
     int cols1,
     Span <double> outMatrix)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pOut = &MemoryMarshal.GetReference(outMatrix))
             {
                 ThunkDenseEigen.dtransp_(pfirst, rows1, cols1, pOut);
             }
         }
     }
 }
Example #14
0
 public static void NormalEquationsLeastSquares(ReadOnlySpan <double> firstMatrix, int rows1, int cols1,
                                                ReadOnlySpan <double> rhs,
                                                Span <double> vout)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *prhs = &MemoryMarshal.GetReference(rhs))
             {
                 fixed(double *pVOut = &MemoryMarshal.GetReference(vout))
                 {
                     ThunkDenseEigen.dnormal_equations__leastsquares_(pfirst, rows1, cols1, prhs, pVOut);
                 }
             }
         }
     }
 }
Example #15
0
 public static void Mult(
     ReadOnlySpan <double> firstMatrix, int rows1, int cols1,
     ReadOnlySpan <double> vector, int length,
     Span <double> outMatrix)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pSecond = &MemoryMarshal.GetReference(vector))
             {
                 fixed(double *pOut = &MemoryMarshal.GetReference(outMatrix))
                 {
                     ThunkDenseEigen.dmultv_(pfirst, rows1, cols1, pSecond, length, pOut);
                 }
             }
         }
     }
 }
Example #16
0
 public static void Plus(
     ReadOnlySpan <double> firstMatrix, int rows1, int cols1,
     ReadOnlySpan <double> secondMatrix, int rows2, int cols2,
     Span <double> outMatrix)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pSecond = &MemoryMarshal.GetReference(secondMatrix))
             {
                 fixed(double *pOut = &MemoryMarshal.GetReference(outMatrix))
                 {
                     ThunkDenseEigen.dxplusa_(pfirst, rows1, cols1, pSecond, rows2, cols2, pOut);
                 }
             }
         }
     }
 }
Example #17
0
 public static void HouseholderQR(ReadOnlySpan <double> firstMatrix,
                                  int rows1,
                                  int cols1,
                                  Span <double> q,
                                  Span <double> r)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pQ = &MemoryMarshal.GetReference(q))
             {
                 fixed(double *pR = &MemoryMarshal.GetReference(r))
                 {
                     ThunkDenseEigen.dhouseholderQR_(pfirst, rows1, cols1, pQ, pR);
                 }
             }
         }
     }
 }
Example #18
0
 public static void SolveLDLT(ReadOnlySpan <double> firstMatrix,
                              int rows1,
                              int cols1,
                              ReadOnlySpan <double> rhs,
                              Span <double> vout)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *prhs = &MemoryMarshal.GetReference(rhs))
             {
                 fixed(double *pVOut = &MemoryMarshal.GetReference(vout))
                 {
                     ThunkDenseEigen.dsolve_ldlt_(pfirst, rows1, cols1, prhs, pVOut);
                 }
             }
         }
     }
 }
Example #19
0
 public static void SVDBdcSvd(ReadOnlySpan <double> firstMatrix, int rows1, int cols1,
                              Span <double> uout,
                              Span <double> sout,
                              Span <double> vout)
 {
     unsafe
     {
         fixed(double *pfirst = &MemoryMarshal.GetReference(firstMatrix))
         {
             fixed(double *pUOut = &MemoryMarshal.GetReference(uout))
             {
                 fixed(double *pSOut = &MemoryMarshal.GetReference(sout))
                 {
                     fixed(double *pVOut = &MemoryMarshal.GetReference(vout))
                     {
                         ThunkDenseEigen.dsvd_bdcSvd_(pfirst, rows1, cols1, pUOut, pSOut, pVOut);
                     }
                 }
             }
         }
     }
 }