Library/ManagedCuda/CudaBlas/CudaBlasHandler.cs
/// <summary>
/// This function solves an array of triangular linear systems with multiple right-hand-sides.<para/>
/// The solution overwrites the right-hand-sides on exit.<para/>
/// No test for singularity or near-singularity is included in this function.<para/>
/// This function is intended to be used for matrices of small sizes where the launch
/// overhead is a significant factor. The current implementation limits the dimensions m and n to 32.
/// </summary>
/// <param name="side">indicates if matrix A[i] is on the left or right of X[i].</param>
/// <param name="uplo">indicates if matrix A[i] lower or upper part is stored, the
/// other part is not referenced and is inferred from the stored elements.</param>
/// <param name="trans">operation op(A[i]) that is non- or (conj.) transpose.</param>
/// <param name="diag">indicates if the elements on the main diagonal of matrix
/// A[i] are unity and should not be accessed.</param>
/// <param name="m">number of rows of matrix B[i], with matrix A[i] sized accordingly.</param>
/// <param name="n">number of columns of matrix B[i], with matrix A[i] is sized accordingly.</param>
/// <param name="alpha">scalar used for multiplication, if alpha==0 then A[i] is not 
/// referenced and B[i] does not have to be a valid input.</param>
/// <param name="A">array of device pointers with each array/device pointerarray 
/// of dim. lda x m with lda>=max(1,m) if transa==CUBLAS_OP_N and lda x n with
/// lda>=max(1,n) otherwise.</param>
/// <param name="lda">leading dimension of two-dimensional array used to store matrix A[i].</param>
/// <param name="B">array of device pointers with each array/device pointerarrayof dim.
/// ldb x n with ldb>=max(1,m)</param>
/// <param name="ldb">leading dimension of two-dimensional array used to store matrix B[i].</param>
/// <param name="batchCount"></param>
This function solves an array of triangular linear systems with multiple right-hand-sides.
The solution overwrites the right-hand-sides on exit.
No test for singularity or near-singularity is included in this function.
This function is intended to be used for matrices of small sizes where the launch
overhead is a significant factor. The current implementation limits the dimensions m and n to 32.
This function solves an array of triangular linear systems with multiple right - hand - sides . The solution overwrites the right - hand - sides on exit . No test for singularity or near - singularity is included in this function . This function is intended to be used for matrices of small sizes where the launch overhead is a significant factor . The current implementation limits the dimensions m and n to 32 .
public void TrsmBatched(SideMode side, FillMode uplo, Operation trans, DiagType diag, int m, int n, CudaDeviceVariable<float> alpha,
			CudaDeviceVariable<CUdeviceptr> A, int lda, CudaDeviceVariable<CUdeviceptr> B, int ldb, int batchCount)
		{
			_status = CudaBlasNativeMethods.cublasStrsmBatched(_blasHandle, side, uplo, trans, diag, m, n, alpha.DevicePointer,
				A.DevicePointer, lda, B.DevicePointer, ldb, batchCount);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cublasStrsmBatched", _status));
			if (_status != CublasStatus.Success) throw new CudaBlasException(_status);
		}
public void TrsmBatched ( SideMode side , FillMode uplo , Operation trans , DiagType diag , int m , int n , CudaDeviceVariable < float > alpha , CudaDeviceVariable < CUdeviceptr > A , int lda , CudaDeviceVariable < CUdeviceptr > B , int ldb , int batchCount ) { _status = CudaBlasNativeMethods . cublasStrsmBatched ( _blasHandle , side , uplo , trans , diag , m , n , alpha . DevicePointer , A . DevicePointer , lda , B . DevicePointer , ldb , batchCount ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , _status ) ) ; if ( _status != CublasStatus . Success ) throw new CudaBlasException ( _status ) ; }
This function solves an array of triangular linear systems with multiple right-hand-sides.
This function solves an array of triangular linear systems with multiple right - hand - sides .
side
SideMode
indicates if matrix A[i] is on the left or right of X[i].
indicates if matrix A [ i ] is on the left or right of X [ i ] .
uplo
FillMode
indicates if matrix A[i] lower or upper part is stored, the
other part is not referenced and is inferred from the stored elements.
indicates if matrix A [ i ] lower or upper part is stored the other part is not referenced and is inferred from the stored elements .
trans
Operation
operation op(A[i]) that is non- or (conj.) transpose.
operation op ( A [ i ] ) that is non - or ( conj . ) transpose .
diag
DiagType
indicates if the elements on the main diagonal of matrix
A[i] are unity and should not be accessed.
indicates if the elements on the main diagonal of matrix A [ i ] are unity and should not be accessed .
m
int
number of rows of matrix B[i], with matrix A[i] sized accordingly.
number of rows of matrix B [ i ] with matrix A [ i ] sized accordingly .
n
int
number of columns of matrix B[i], with matrix A[i] is sized accordingly.
number of columns of matrix B [ i ] with matrix A [ i ] is sized accordingly .
alpha
CudaDeviceVariable<float>
scalar used for multiplication, if alpha==0 then A[i] is not
referenced and B[i] does not have to be a valid input.
scalar used for multiplication if alpha == 0 then A [ i ] is not referenced and B [ i ] does not have to be a valid input .
A
CudaDeviceVariable<CUdeviceptr>
array of device pointers with each array/device pointerarray
of dim. lda x m with lda>=max(1,m) if transa==CUBLAS_OP_N and lda x n with
lda>=max(1,n) otherwise.
array of device pointers with each array / device pointerarray of dim . lda x m with lda > = max ( 1 m ) if transa == CUBLAS_OP_N and lda x n with lda > = max ( 1 n ) otherwise .
lda
int
leading dimension of two-dimensional array used to store matrix A[i].
leading dimension of two - dimensional array used to store matrix A [ i ] .
B
CudaDeviceVariable<CUdeviceptr>
array of device pointers with each array/device pointerarrayof dim.
ldb x n with ldb>=max(1,m)
array of device pointers with each array / device pointerarrayof dim . ldb x n with ldb > = max ( 1 m )
ldb
int
leading dimension of two-dimensional array used to store matrix B[i].
leading dimension of two - dimensional array used to store matrix B [ i ] .
batchCount
int
None