Library/ManagedCuda/CudaSolve/CudaSolveDense.cs
/// <summary>
/// This function solves a linear system of multiple right-hand sides op(A)*X=B.
/// </summary>
/// <param name="trans">operation op(A) that is non- or (conj.) transpose.</param>
/// <param name="n">number of rows and columns of matrix A.</param>
/// <param name="nrhs">number of right-hand sides.</param>
/// <param name="A">array of dimension lda * n with lda is not less than max(1,n).</param>
/// <param name="lda">leading dimension of two-dimensional array used to store matrix A.</param>
/// <param name="devIpiv">array of size at least n, containing pivot indices.</param>
/// <param name="B">array of dimension ldb * nrhs with ldb is not less than max(1,n).</param>
/// <param name="ldb">leading dimension of two-dimensional array used to store matrix B.</param>
/// <param name="devInfo">if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong.</param>
This function solves a linear system of multiple right-hand sides op(A)*X=B.
This function solves a linear system of multiple right - hand sides op ( A ) * X = B .
public void Getrs(Operation trans, int n, int nrhs, CudaDeviceVariable<double> A, int lda, CudaDeviceVariable<int> devIpiv, CudaDeviceVariable<double> B, int ldb, CudaDeviceVariable<int> devInfo)
		{
			res = CudaSolveNativeMethods.Dense.cusolverDnDgetrs(_handle, trans, n, nrhs, A.DevicePointer, lda, devIpiv.DevicePointer, B.DevicePointer, ldb, devInfo.DevicePointer);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusolverDnDgetrs", res));
			if (res != cusolverStatus.Success) throw new CudaSolveException(res);
		}
public void Getrs ( Operation trans , int n , int nrhs , CudaDeviceVariable < double > A , int lda , CudaDeviceVariable < int > devIpiv , CudaDeviceVariable < double > B , int ldb , CudaDeviceVariable < int > devInfo ) { res = CudaSolveNativeMethods . Dense . cusolverDnDgetrs ( _handle , trans , n , nrhs , A . DevicePointer , lda , devIpiv . DevicePointer , B . DevicePointer , ldb , devInfo . DevicePointer ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cusolverStatus . Success ) throw new CudaSolveException ( res ) ; }
This function solves a linear system of multiple right-hand sides op(A)*X=B.
This function solves a linear system of multiple right - hand sides op ( A ) * X = B .
trans
Operation
operation op(A) that is non- or (conj.) transpose.
operation op ( A ) that is non - or ( conj . ) transpose .
n
int
number of rows and columns of matrix A.
number of rows and columns of matrix A .
nrhs
int
number of right-hand sides.
number of right - hand sides .
A
CudaDeviceVariable<double>
array of dimension lda * n with lda is not less than max(1,n).
array of dimension lda * n with lda is not less than max ( 1 n ) .
lda
int
leading dimension of two-dimensional array used to store matrix A.
leading dimension of two - dimensional array used to store matrix A .
devIpiv
CudaDeviceVariable<int>
array of size at least n, containing pivot indices.
array of size at least n containing pivot indices .
B
CudaDeviceVariable<double>
array of dimension ldb * nrhs with ldb is not less than max(1,n).
array of dimension ldb * nrhs with ldb is not less than max ( 1 n ) .
ldb
int
leading dimension of two-dimensional array used to store matrix B.
leading dimension of two - dimensional array used to store matrix B .
devInfo
CudaDeviceVariable<int>
if devInfo = 0, the operation is successful. if devInfo = -i, the i-th parameter is wrong.
if devInfo = 0 the operation is successful . if devInfo = - i the i - th parameter is wrong .