示例#1
0
        private int GetIndexPackedSymmetric(int i, int j, int n, cublasFillMode fillMode)
        {
            if (fillMode == cublasFillMode.Lower)
            {
                if (i < j)
                {
                    throw new ArgumentOutOfRangeException("Please set i >= j in Lower fill mode.");
                }

                return(i + ((2 * n - j - 1) * j) / 2);
            }
            else
            {
                if (i > j)
                {
                    throw new ArgumentOutOfRangeException("Please set i <= j in Upper fill mode.");
                }
                return(i + (j * (j + 1)) / 2);
            }
        }
 public CUBLASStatusv2 cublasDtrsv(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int n, IntPtr A, int lda, IntPtr x, int incx)
 {
     return(cublasDtrsv_v2(handle, uplo, trans, diag, n, A, lda, x, incx));
 }
 public CUBLASStatusv2 cublasDsymm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc)
 {
     throw new NotImplementedException();
 }
 public CUBLASStatusv2 cublasDspmv(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr ap, IntPtr x, int incx, ref double beta, IntPtr y, int incy)
 {
     throw new NotImplementedException();
 }
 private static extern CUBLASStatusv2 cublasDsymv_v2(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr A, int lda, IntPtr x, int incx, ref double beta, IntPtr y, int incy);
 public CUBLASStatusv2 cublasDtrsm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb)
 {
     return cublasDtrsm_v2(handle, side, uplo, trans, diag, m, n, ref alpha, A, lda, B, ldb);
 }
 public CUBLASStatusv2 cublasDsymm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc)
 {
     return cublasDsymm_v2(handle, side, uplo, m, n, ref alpha, A, lda, B, ldb, ref beta, C, ldc);
 }
 public CUBLASStatusv2 cublasDsymv(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr A, int lda, IntPtr x, int incx, ref double beta, IntPtr y, int incy)
 {
     return cublasDsymv_v2(handle, uplo, n, ref alpha, A, lda, x, incx, ref beta, y, incy);
 }
 private static extern CUBLASStatusv2 cublasDspmv_v2(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr ap, IntPtr x, int incx, ref double beta, IntPtr y, int incy);
示例#10
0
 private static extern CUBLASStatusv2 cublasSsbmv_v2(cublasHandle handle, cublasFillMode uplo, int n, int k, ref float alpha, IntPtr A, int lda, IntPtr x, int incx, ref float beta, IntPtr y, int incy);
示例#11
0
 public CUBLASStatusv2 cublasDtrsm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb)
 {
     return(cublasDtrsm_v2(handle, side, uplo, trans, diag, m, n, ref alpha, A, lda, B, ldb));
 }
示例#12
0
 public CUBLASStatusv2 cublasStrmm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int m, int n, ref float alpha, IntPtr A, int lda, IntPtr B, int ldb, IntPtr C, int ldc)
 {
     return(cublasStrmm_v2(handle, side, uplo, trans, diag, m, n, ref alpha, A, lda, B, ldb, C, ldc));
 }
示例#13
0
 public CUBLASStatusv2 cublasDsyr2k(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc)
 {
     return(cublasDsyr2k_v2(handle, uplo, trans, n, k, ref alpha, A, lda, B, ldb, ref beta, C, ldc));
 }
示例#14
0
 public CUBLASStatusv2 cublasSsyrk(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref float alpha, IntPtr A, int lda, ref float beta, IntPtr C, int ldc)
 {
     return(cublasSsyrk_v2(handle, uplo, trans, n, k, ref alpha, A, lda, ref beta, C, ldc));
 }
示例#15
0
 public CUBLASStatusv2 cublasDsymm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc)
 {
     return(cublasDsymm_v2(handle, side, uplo, m, n, ref alpha, A, lda, B, ldb, ref beta, C, ldc));
 }
示例#16
0
 public CUBLASStatusv2 cublasSsbmv(cublasHandle handle, cublasFillMode uplo, int n, int k, ref float alpha, IntPtr A, int lda, IntPtr x, int incx, ref float beta, IntPtr y, int incy)
 {
     return cublasSsbmv_v2(handle, uplo, n, k, ref alpha, A, lda, x, incx, ref beta, y, incy);
 }
示例#17
0
 public CUBLASStatusv2 cublasDspr(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr x, int incx, IntPtr ap)
 {
     return cublasDspr_v2(handle, uplo, n, ref alpha, x, incx, ap);
 }
示例#18
0
 private static extern CUBLASStatusv2 cublasSspr_v2(cublasHandle handle, cublasFillMode uplo, int n, ref float alpha, IntPtr x, int incx, IntPtr ap);
示例#19
0
 public CUBLASStatusv2 cublasDsyr2(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr x, int incx, IntPtr y, int incy, IntPtr A, int lda)
 {
     return cublasDsyr2_v2(handle, uplo, n, ref alpha, x, incx, y, incy, A, lda);
 }
示例#20
0
 public CUBLASStatusv2 cublasDspmv(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr ap, IntPtr x, int incx, ref double beta, IntPtr y, int incy)
 {
     throw new NotImplementedException();
 }
示例#21
0
 public CUBLASStatusv2 cublasDsyr2k(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc)
 {
     return cublasDsyr2k_v2(handle, uplo, trans, n, k, ref alpha, A, lda, B, ldb, ref beta, C, ldc);
 }
示例#22
0
 public CUBLASStatusv2 cublasSsyr(cublasHandle handle, cublasFillMode uplo, int n, ref float alpha, IntPtr x, int incx, IntPtr A, int lda)
 {
     throw new NotImplementedException();
 }
示例#23
0
 private static extern CUBLASStatusv2 cublasSspr_v2(cublasHandle handle, cublasFillMode uplo, int n, ref float alpha, IntPtr x, int incx, IntPtr ap);
示例#24
0
 public CUBLASStatusv2 cublasDsyr2(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr x, int incx, IntPtr y, int incy, IntPtr A, int lda)
 {
     throw new NotImplementedException();
 }
示例#25
0
 private void CompressSymmetricBandedMatrixToCBC(double[] A, double[] CBC, int n, int k, cublasFillMode fillMode)
 {
     if (fillMode == cublasFillMode.Lower)
     {
         for (int i = 0; i < n; i++)
         {
             for (int j = 0; j < n; j++)
             {
                 if ((i >= j) && (i <= j + k))
                 {
                     int packedIndex = GetIndexColumnMajor(i - j, j, k + 1);
                     int index       = GetIndexColumnMajor(i, j, n);
                     CBC[packedIndex] = A[index];
                 }
             }
         }
     }
     else
     {
         for (int i = 0; i < n; i++)
         {
             for (int j = 0; j < n; j++)
             {
                 if ((i <= j) && (i >= j - k))
                 {
                     int packedIndex = GetIndexColumnMajor(k + i - j, j, k + 1);
                     int index       = GetIndexColumnMajor(i, j, n);
                     CBC[packedIndex] = A[index];
                 }
             }
         }
     }
 }
示例#26
0
 public CUBLASStatusv2 cublasDtrsv(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int n, IntPtr A, int lda, IntPtr x, int incx)
 {
     throw new NotImplementedException();
 }
示例#27
0
 public CUBLASStatusv2 cublasDsyr2(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr x, int incx, IntPtr y, int incy, IntPtr A, int lda)
 {
     throw new NotImplementedException();
 }
示例#28
0
 public CUBLASStatusv2 cublasDsymm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc)
 {
     throw new NotImplementedException();
 }
示例#29
0
 public CUBLASStatusv2 cublasDsyr2k(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc)
 {
     throw new NotImplementedException();
 }
示例#30
0
 public CUBLASStatusv2 cublasSsyrk(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref float alpha, IntPtr A, int lda, ref float beta, IntPtr C, int ldc)
 {
     throw new NotImplementedException();
 }
示例#31
0
 private static extern CUBLASStatusv2 cublasDtrsm_v2(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb);
示例#32
0
 public CUBLASStatusv2 cublasDsyr2k(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc)
 {
     throw new NotImplementedException();
 }
示例#33
0
 public CUBLASStatusv2 cublasSspmv(cublasHandle handle, cublasFillMode uplo, int n, ref float alpha, IntPtr ap, IntPtr x, int incx, ref float beta, IntPtr y, int incy)
 {
     return cublasSspmv_v2(handle, uplo, n, ref alpha, ap, x, incx, ref beta, y, incy);
 }
示例#34
0
 public CUBLASStatusv2 cublasDtrsm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb)
 {
     throw new NotImplementedException();
 }
示例#35
0
 public CUBLASStatusv2 cublasSspr2(cublasHandle handle, cublasFillMode uplo, int n, ref float alpha, IntPtr x, int incx, IntPtr y, int incy, IntPtr ap)
 {
     return cublasSspr2_v2(handle, uplo, n, ref alpha, x, incx, y, incy, ap);
 }
示例#36
0
 public override void SPR(int n, double alpha, double[] x, double[] ap, cublasFillMode uplo = cublasFillMode.Lower, int incx = 1)
 {
     throw new NotImplementedException();
 }
示例#37
0
 public CUBLASStatusv2 cublasSsyr(cublasHandle handle, cublasFillMode uplo, int n, ref float alpha, IntPtr x, int incx, IntPtr A, int lda)
 {
     return cublasSsyr_v2(handle, uplo, n, ref alpha, x, incx, A, lda);
 }
示例#38
0
 public override void SPR2(int n, float alpha, float[] x, float[] y, float[] ap, cublasFillMode uplo = cublasFillMode.Lower, int incx = 1, int incy = 1)
 {
     throw new NotImplementedException();
 }
示例#39
0
 public CUBLASStatusv2 cublasDtrsv(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int n, IntPtr A, int lda, IntPtr x, int incx)
 {
     return cublasDtrsv_v2(handle, uplo, trans, diag, n, A, lda, x, incx);
 }
示例#40
0
 public override void SYR(int n, float alpha, float[] x, float[] A, cublasFillMode uplo = cublasFillMode.Lower, int lda = 0, int incx = 1)
 {
     throw new NotImplementedException();
 }
示例#41
0
 public CUBLASStatusv2 cublasSsyrk(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref float alpha, IntPtr A, int lda, ref float beta, IntPtr C, int ldc)
 {
     return cublasSsyrk_v2(handle, uplo, trans, n, k, ref alpha, A, lda, ref beta, C, ldc);
 }
示例#42
0
 public override void SYR2(int n, double alpha, double[] x, double[] y, double[] A, cublasFillMode uplo = cublasFillMode.Lower, int lda = 0, int incx = 1, int incy = 1)
 {
     throw new NotImplementedException();
 }
示例#43
0
 public CUBLASStatusv2 cublasStrmm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int m, int n, ref float alpha, IntPtr A, int lda, IntPtr B, int ldb, IntPtr C, int ldc)
 {
     return cublasStrmm_v2(handle, side, uplo, trans, diag, m, n, ref alpha, A, lda, B, ldb, C, ldc);
 }
示例#44
0
 public override void TRSV(int n, double[] A, double[] x, cublasOperation trans = cublasOperation.N, cublasFillMode uplo = cublasFillMode.Lower, cublasDiagType diag = cublasDiagType.NonUnit, int lda = 0, int incx = 1)
 {
     throw new NotImplementedException();
 }
示例#45
0
 private static extern CUBLASStatusv2 cublasSsbmv_v2(cublasHandle handle, cublasFillMode uplo, int n, int k, ref float alpha, IntPtr A, int lda, IntPtr x, int incx, ref float beta, IntPtr y, int incy);
示例#46
0
 public override void SYMM(int m, int n, double alpha, double[] A, double[] B, double beta, double[] C, cublasSideMode side = cublasSideMode.Left, cublasFillMode uplo = cublasFillMode.Lower, int lda = 0, int ldb = 0, int ldc = 0)
 {
     throw new NotImplementedException();
 }
示例#47
0
 private static extern CUBLASStatusv2 cublasDspr2_v2(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr x, int incx, IntPtr y, int incy, IntPtr ap);
示例#48
0
 public override void SYRK(int n, int k, float alpha, float[] A, float beta, float[] C, cublasOperation trans = cublasOperation.N, cublasFillMode uplo = cublasFillMode.Lower, int lda = 0, int ldc = 0)
 {
     throw new NotImplementedException();
 }
示例#49
0
 public override void SYR2K(int n, int k, double alpha, double[] A, double[] B, double beta, double[] C, cublasOperation trans = cublasOperation.N, cublasFillMode uplo = cublasFillMode.Lower, int lda = 0, int ldb = 0, int ldc = 0)
 {
     throw new NotImplementedException();
 }
示例#50
0
 public override void TRSM(int m, int n, double alpha, double[] A, double[] B, cublasSideMode side = cublasSideMode.Left, cublasOperation trans = cublasOperation.N, cublasFillMode uplo = cublasFillMode.Lower, cublasDiagType diag = cublasDiagType.NonUnit, int lda = 0, int ldb = 0)
 {
     throw new NotImplementedException();
 }
示例#51
0
 private void PackSymmetricMatrix(double[] matrixSymmetric, double[] buffer, int n, cublasFillMode fillMode)
 {
     if (fillMode == cublasFillMode.Lower)
     {
         for (int j = 0; j < n; j++)
         {
             for (int i = j; i < n; i++)
             {
                 buffer[GetIndexPackedSymmetric(i, j, n, fillMode)] = matrixSymmetric[GetIndexColumnMajor(i, j, n)];
             }
         }
     }
     else
     {
         for (int j = 0; j < n; j++)
         {
             for (int i = 0; i <= j; i++)
             {
                 buffer[GetIndexPackedSymmetric(i, j, n, fillMode)] = matrixSymmetric[GetIndexColumnMajor(i, j, n)];
             }
         }
     }
 }
示例#52
0
 private static extern CUBLASStatusv2 cublasDtrsv_v2(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int n, IntPtr A, int lda, IntPtr x, int incx);
示例#53
0
 public CUBLASStatusv2 cublasSsyr(cublasHandle handle, cublasFillMode uplo, int n, ref float alpha, IntPtr x, int incx, IntPtr A, int lda)
 {
     throw new NotImplementedException();
 }
示例#54
0
 private static extern CUBLASStatusv2 cublasDsymm_v2(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc);
示例#55
0
 public CUBLASStatusv2 cublasDtrsv(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int n, IntPtr A, int lda, IntPtr x, int incx)
 {
     throw new NotImplementedException();
 }
示例#56
0
 private static extern CUBLASStatusv2 cublasSsyrk_v2(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref float alpha, IntPtr A, int lda, ref float beta, IntPtr C, int ldc);
示例#57
0
 public CUBLASStatusv2 cublasSsyrk(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref float alpha, IntPtr A, int lda, ref float beta, IntPtr C, int ldc)
 {
     throw new NotImplementedException();
 }
示例#58
0
 private static extern CUBLASStatusv2 cublasDsyr2k_v2(cublasHandle handle, cublasFillMode uplo, cublasOperation trans, int n, int k, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb, ref double beta, IntPtr C, int ldc);
示例#59
0
 public CUBLASStatusv2 cublasDtrsm(cublasHandle handle, cublasSideMode side, cublasFillMode uplo, cublasOperation trans, cublasDiagType diag, int m, int n, ref double alpha, IntPtr A, int lda, IntPtr B, int ldb)
 {
     throw new NotImplementedException();
 }
示例#60
0
 public CUBLASStatusv2 cublasDsyr2(cublasHandle handle, cublasFillMode uplo, int n, ref double alpha, IntPtr x, int incx, IntPtr y, int incy, IntPtr A, int lda)
 {
     return(cublasDsyr2_v2(handle, uplo, n, ref alpha, x, incx, y, incy, A, lda));
 }