Library/ManagedCuda/CudaSolve/Refactorization.cs
/// <summary>This routine assembles the internal data structures of the cuSolverRF library. It is often
/// the first routine to be called after the call to the cusolverRfCreate() routine.
/// </summary>
/// <param name="n">the number of rows (and columns) of matrix A.</param>
/// <param name="nnzA">the number of non-zero elements of matrix A.</param>
/// <param name="h_csrRowPtrA">the array of offsets corresponding to 
/// the start of each row in the arrays h_csrColIndA and h_csrValA. This
/// array has also an extra entry at the end that stores the number of non-zero
/// elements in the matrix. The array size is n+1.</param>
/// <param name="h_csrColIndA">the array of column indices corresponding
/// to the non-zero elements in the matrix. It is assumed that this array is sorted by row
/// and by column within each row. The array size is nnzA.</param>
/// <param name="h_csrValA">the array of values corresponding to the
/// non-zero elements in the matrix. It is assumed that this array is sorted by row
/// and by column within each row. The array size is nnzA.</param>
/// <param name="nnzL">the number of non-zero elements of matrix L.</param>
/// <param name="h_csrRowPtrL">the array of offsets corresponding to
/// the start of each row in the arrays h_csrColIndL and h_csrValL. This
/// array has also an extra entry at the end that stores the number of non-zero
/// elements in the matrix L. The array size is n+1.</param>
/// <param name="h_csrColIndL">the array of column indices corresponding
/// to the non-zero elements in the matrix L. It is assumed that this array is sorted by
/// row and by column within each row. The array size is nnzL.</param>
/// <param name="h_csrValL">the array of values corresponding to the
/// non-zero elements in the matrix L. It is assumed that this array is sorted by row
/// and by column within each row. The array size is nnzL.</param>
/// <param name="nnzU">the number of non-zero elements of matrix U.</param>
/// <param name="h_csrRowPtrU">the array of offsets corresponding to
/// the start of each row in the arrays h_csrColIndU and h_csrValU. This
/// array has also an extra entry at the end that stores the number of non-zero elements in the matrix U. The array size is n+1.</param>
/// <param name="h_csrColIndU">the array of column indices corresponding 
/// to the non-zero elements in the matrix U. It is assumed that this array is sorted by row and by column within each row. The array size is nnzU.</param>
/// <param name="h_csrValU">the array of values corresponding to the non-zero elements in the matrix U. It is
/// assumed that this array is sorted by row and by column within each row. The array size is nnzU.</param>
/// <param name="h_P">the left permutation (often associated with pivoting). The array size in n.</param>
/// <param name="h_Q">the right permutation (often associated with reordering). The array size in n.</param>
This routine assembles the internal data structures of the cuSolverRF library. It is often
the first routine to be called after the call to the cusolverRfCreate() routine.
This routine assembles the internal data structures of the cuSolverRF library . It is often the first routine to be called after the call to the cusolverRfCreate () routine .
public void SetupHost(int n, int nnzA, int[] h_csrRowPtrA, int[] h_csrColIndA, double[] h_csrValA, int nnzL, int[] h_csrRowPtrL, int[] h_csrColIndL,
			double[] h_csrValL, int nnzU, int[] h_csrRowPtrU, int[] h_csrColIndU, double[] h_csrValU, int[] h_P, int[] h_Q)
		{
			res = CudaSolveNativeMethods.Refactorization.cusolverRfSetupHost(n, nnzA, h_csrRowPtrA, h_csrColIndA, h_csrValA, nnzL, h_csrRowPtrL, h_csrColIndL, h_csrValL,
				nnzU, h_csrRowPtrU, h_csrColIndU, h_csrValU, h_P, h_Q, _handle);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusolverRfSetupHost", res));
			if (res != cusolverStatus.Success) throw new CudaSolveException(res);
		}
public void SetupHost ( int n , int nnzA , int [ ] h_csrRowPtrA , int [ ] h_csrColIndA , double [ ] h_csrValA , int nnzL , int [ ] h_csrRowPtrL , int [ ] h_csrColIndL , double [ ] h_csrValL , int nnzU , int [ ] h_csrRowPtrU , int [ ] h_csrColIndU , double [ ] h_csrValU , int [ ] h_P , int [ ] h_Q ) { res = CudaSolveNativeMethods . Refactorization . cusolverRfSetupHost ( n , nnzA , h_csrRowPtrA , h_csrColIndA , h_csrValA , nnzL , h_csrRowPtrL , h_csrColIndL , h_csrValL , nnzU , h_csrRowPtrU , h_csrColIndU , h_csrValU , h_P , h_Q , _handle ) ; Debug . WriteLine ( String . Format ( " " , DateTime . Now , " " , res ) ) ; if ( res != cusolverStatus . Success ) throw new CudaSolveException ( res ) ; }
This routine assembles the internal data structures of the cuSolverRF library.
This routine assembles the internal data structures of the cuSolverRF library .
n
int
the number of rows (and columns) of matrix A.
the number of rows ( and columns ) of matrix A .
nnzA
int
the number of non-zero elements of matrix A.
the number of non - zero elements of matrix A .
h_csrRowPtrA
int[]
the array of offsets corresponding to
the start of each row in the arrays h_csrColIndA and h_csrValA. This
array has also an extra entry at the end that stores the number of non-zero
elements in the matrix. The array size is n+1.
the array of offsets corresponding to the start of each row in the arrays h_csrColIndA and h_csrValA . This array has also an extra entry at the end that stores the number of non - zero elements in the matrix . The array size is n + 1 .
h_csrColIndA
int[]
the array of column indices corresponding
to the non-zero elements in the matrix. It is assumed that this array is sorted by row
and by column within each row. The array size is nnzA.
the array of column indices corresponding to the non - zero elements in the matrix . It is assumed that this array is sorted by row and by column within each row . The array size is nnzA .
h_csrValA
double[]
the array of values corresponding to the
non-zero elements in the matrix. It is assumed that this array is sorted by row
and by column within each row. The array size is nnzA.
the array of values corresponding to the non - zero elements in the matrix . It is assumed that this array is sorted by row and by column within each row . The array size is nnzA .
nnzL
int
the number of non-zero elements of matrix L.
the number of non - zero elements of matrix L .
h_csrRowPtrL
int[]
the array of offsets corresponding to
the start of each row in the arrays h_csrColIndL and h_csrValL. This
array has also an extra entry at the end that stores the number of non-zero
elements in the matrix L. The array size is n+1.
the array of offsets corresponding to the start of each row in the arrays h_csrColIndL and h_csrValL . This array has also an extra entry at the end that stores the number of non - zero elements in the matrix L . The array size is n + 1 .
h_csrColIndL
int[]
the array of column indices corresponding
to the non-zero elements in the matrix L. It is assumed that this array is sorted by
row and by column within each row. The array size is nnzL.
the array of column indices corresponding to the non - zero elements in the matrix L . It is assumed that this array is sorted by row and by column within each row . The array size is nnzL .
h_csrValL
double[]
the array of values corresponding to the
non-zero elements in the matrix L. It is assumed that this array is sorted by row
and by column within each row. The array size is nnzL.
the array of values corresponding to the non - zero elements in the matrix L . It is assumed that this array is sorted by row and by column within each row . The array size is nnzL .
nnzU
int
the number of non-zero elements of matrix U.
the number of non - zero elements of matrix U .
h_csrRowPtrU
int[]
the array of offsets corresponding to
the start of each row in the arrays h_csrColIndU and h_csrValU. This
array has also an extra entry at the end that stores the number of non-zero elements in the matrix U. The array size is n+1.
the array of offsets corresponding to the start of each row in the arrays h_csrColIndU and h_csrValU . This array has also an extra entry at the end that stores the number of non - zero elements in the matrix U . The array size is n + 1 .
h_csrColIndU
int[]
the array of column indices corresponding
to the non-zero elements in the matrix U. It is assumed that this array is sorted by row and by column within each row. The array size is nnzU.
the array of column indices corresponding to the non - zero elements in the matrix U . It is assumed that this array is sorted by row and by column within each row . The array size is nnzU .
h_csrValU
double[]
the array of values corresponding to the non-zero elements in the matrix U. It is
assumed that this array is sorted by row and by column within each row. The array size is nnzU.
the array of values corresponding to the non - zero elements in the matrix U . It is assumed that this array is sorted by row and by column within each row . The array size is nnzU .
h_P
int[]
the left permutation (often associated with pivoting). The array size in n.
the left permutation ( often associated with pivoting ) . The array size in n .
h_Q
int[]
the right permutation (often associated with reordering). The array size in n.
the right permutation ( often associated with reordering ) . The array size in n .