Show / Hide Table of Contents

    Class CudaSolveRefactorization

    CudaSolveRefactorization: The cuSolverRF library was designed to accelerate solution of sets of linear systems by fast re-factorization when given new coefficients in the same sparsity pattern A_i x_i = f_i

    Inheritance
    System.Object
    CudaSolveRefactorization
    Implements
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ManagedCuda.CudaSolve
    Assembly: CudaSolve.dll
    Syntax
    public class CudaSolveRefactorization : IDisposable

    Constructors

    | Improve this Doc View Source

    CudaSolveRefactorization()

    Create new refactorization solve instance

    Declaration
    public CudaSolveRefactorization()

    Methods

    | Improve this Doc View Source

    AccessBundledFactorsDevice(out Int32, out CudaDeviceVariable<Int32>, out CudaDeviceVariable<Int32>, out CudaDeviceVariable<Double>)

    This routine allows direct access to the lower L and upper U triangular factors stored in the cuSolverRF library handle. The factors are compressed into a single matrix M=(LI)+ U, where the unitary diagonal of L is not stored. It is assumed that a prior call to the cusolverRfRefactor() was done in order to generate these triangular factors.

    Declaration
    public void AccessBundledFactorsDevice(out int nnzM, out CudaDeviceVariable<int> Mp, out CudaDeviceVariable<int> Mi, out CudaDeviceVariable<double> Mx)
    Parameters
    Type Name Description
    System.Int32 nnzM

    the number of non-zero elements of matrix M.

    CudaDeviceVariable<System.Int32> Mp

    the array of offsets corresponding to the start of each row in the arrays Mi and Mx. This array has also an extra entry at the end that stores the number of non-zero elements in the matrix $M$. The array size is n+1.

    CudaDeviceVariable<System.Int32> Mi

    the array of column indices corresponding to the non-zero elements in the matrix M. It is assumed that this array is sorted by row and by column within each row. The array size is nnzM.

    CudaDeviceVariable<System.Double> Mx

    the array of values corresponding to the non-zero elements in the matrix M. It is assumed that this array is sorted by row and by column within each row. The array size is nnzM.

    | Improve this Doc View Source

    Analyze()

    This routine performs the appropriate analysis of parallelism available in the LU refactorization depending upon the algorithm chosen by the user.

    Declaration
    public void Analyze()
    | Improve this Doc View Source

    BatchAnalyze()

    This routine performs the appropriate analysis of parallelism available in the batched LU re-factorization.

    Declaration
    public void BatchAnalyze()
    | Improve this Doc View Source

    BatchRefactor()

    This routine performs the LU re-factorization

    Declaration
    public void BatchRefactor()
    | Improve this Doc View Source

    BatchResetValues(Int32, Int32, Int32, CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>, CudaDeviceVariable<Double>[], CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>)

    This routine updates internal data structures with the values of the new coefficient matrix. It is assumed that the arrays csrRowPtrA, csrColIndA, P and Q have not changed since the last call to the cusolverRfbatch_setup_host routine.

    Declaration
    public void BatchResetValues(int batchSize, int n, int nnzA, CudaDeviceVariable<int> csrRowPtrA, CudaDeviceVariable<int> csrColIndA, CudaDeviceVariable<double>[] csrValA_array, CudaDeviceVariable<int> P, CudaDeviceVariable<int> Q)
    Parameters
    Type Name Description
    System.Int32 batchSize

    the number of matrices in batched mode.

    System.Int32 n

    the number of rows (and columns) of matrix A.

    System.Int32 nnzA

    the number of non-zero elements of matrix A.

    CudaDeviceVariable<System.Int32> csrRowPtrA

    the array of offsets corresponding to the start of each row in the arrays csrColIndA and 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.

    CudaDeviceVariable<System.Int32> 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.

    CudaDeviceVariable<System.Double>[] csrValA_array

    array of pointers of size batchSize, each pointer points to the array of values corresponding to the non-zero elements in the matrix.

    CudaDeviceVariable<System.Int32> P

    the left permutation (often associated with pivoting). The array size in n.

    CudaDeviceVariable<System.Int32> Q

    the right permutation (often associated with reordering). The array size in n.

    | Improve this Doc View Source

    BatchSetupHost(Int32, Int32, Int32, Int32[], Int32[], Double[][], Int32, Int32[], Int32[], Double[], Int32, Int32[], Int32[], Double[], Int32[], Int32[], cusolverRfHandle)

    This routine assembles the internal data structures of the cuSolverRF library for batched operation. It is called after the call to the cusolverRfCreate() routine, and before any other batched routines.

    Declaration
    public void BatchSetupHost(int batchSize, int n, int nnzA, int[] h_csrRowPtrA, int[] h_csrColIndA, double[][] h_csrValA_array, 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, cusolverRfHandle handle)
    Parameters
    Type Name Description
    System.Int32 batchSize

    the number of matrices in the batched mode.

    System.Int32 n

    the number of rows (and columns) of matrix A.

    System.Int32 nnzA

    the number of non-zero elements of matrix A.

    System.Int32[] 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.

    System.Int32[] 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.

    System.Double[][] h_csrValA_array

    array of pointers of size batchSize, each pointer points to the array of values corresponding to the non-zero elements in the matrix.

    System.Int32 nnzL

    the number of non-zero elements of matrix L.

    System.Int32[] 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.

    System.Int32[] 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.

    System.Double[] 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.

    System.Int32 nnzU

    the number of non-zero elements of matrix U.

    System.Int32[] 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.

    System.Int32[] 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.

    System.Double[] 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.

    System.Int32[] h_P

    the left permutation (often associated with pivoting). The array size in n.

    System.Int32[] h_Q

    the right permutation (often associated with reordering). The array size in n.

    cusolverRfHandle handle

    the pointer to the cuSolverRF library handle.

    | Improve this Doc View Source

    BatchZeroPivot(Int32[])

    The user can query which matrix failed LU refactorization by checking corresponding value in position array. The input parameter position is an integer array of size batchSize.

    Declaration
    public void BatchZeroPivot(int[] position)
    Parameters
    Type Name Description
    System.Int32[] position

    integer array of size batchSize. The value of position(j) reports singularity of matrix Aj, -1 if no structural / numerical zero, k >= 0 if Aj(k,k) is either structural zero or numerical zero.

    | Improve this Doc View Source

    cusolverRfBatchSolve(CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>, Int32, Double[], Int32, Double[][], Int32)

    To solve A_j * x_j = b_j, first we reform the equation by M_j * Q * x_j = P * b_j. Then do refactorization by cusolverRfBatch_Refactor(). Further cusolverRfBatch_Solve() takes over the remaining steps.

    Declaration
    public void cusolverRfBatchSolve(CudaDeviceVariable<int> P, CudaDeviceVariable<int> Q, int nrhs, double[] Temp, int ldt, double[][] XF_array, int ldxf)
    Parameters
    Type Name Description
    CudaDeviceVariable<System.Int32> P

    the left permutation (often associated with pivoting). The array size in n.

    CudaDeviceVariable<System.Int32> Q

    the right permutation (often associated with reordering). The array size in n.

    System.Int32 nrhs

    the number right-hand-sides to be solved.

    System.Double[] Temp

    the dense matrix that contains temporary workspace (of size ldt*nrhs).

    System.Int32 ldt

    the leading dimension of dense matrix Temp (ldt >= n).

    System.Double[][] XF_array

    array of pointers of size batchSize, each pointer points to the dense matrix that contains the right-hand-sides F and solutions X (of size ldxf*nrhs).

    System.Int32 ldxf

    the leading dimension of dense matrix XF (ldxf >= n).

    | Improve this Doc View Source

    cusolverRfSetupDevice(Int32, Int32, CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>, CudaDeviceVariable<Double>, Int32, CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>, CudaDeviceVariable<Double>, Int32, CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>, CudaDeviceVariable<Double>, CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>)

    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.

    Declaration
    public void cusolverRfSetupDevice(int n, int nnzA, CudaDeviceVariable<int> csrRowPtrA, CudaDeviceVariable<int> csrColIndA, CudaDeviceVariable<double> csrValA, int nnzL, CudaDeviceVariable<int> csrRowPtrL, CudaDeviceVariable<int> csrColIndL, CudaDeviceVariable<double> csrValL, int nnzU, CudaDeviceVariable<int> csrRowPtrU, CudaDeviceVariable<int> csrColIndU, CudaDeviceVariable<double> csrValU, CudaDeviceVariable<int> P, CudaDeviceVariable<int> Q)
    Parameters
    Type Name Description
    System.Int32 n

    the number of rows (and columns) of matrix A.

    System.Int32 nnzA

    the number of non-zero elements of matrix A.

    CudaDeviceVariable<System.Int32> 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.

    CudaDeviceVariable<System.Int32> 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.

    CudaDeviceVariable<System.Double> 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.

    System.Int32 nnzL

    the number of non-zero elements of matrix L.

    CudaDeviceVariable<System.Int32> 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.

    CudaDeviceVariable<System.Int32> 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.

    CudaDeviceVariable<System.Double> 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.

    System.Int32 nnzU

    the number of non-zero elements of matrix U.

    CudaDeviceVariable<System.Int32> 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.

    CudaDeviceVariable<System.Int32> 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.

    CudaDeviceVariable<System.Double> 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.

    CudaDeviceVariable<System.Int32> P

    the left permutation (often associated with pivoting). The array size in n.

    CudaDeviceVariable<System.Int32> Q

    the right permutation (often associated with reordering). The array size in n.

    | Improve this Doc View Source

    Dispose()

    Dispose

    Declaration
    public void Dispose()
    | Improve this Doc View Source

    Dispose(Boolean)

    For IDisposable

    Declaration
    protected virtual void Dispose(bool fDisposing)
    Parameters
    Type Name Description
    System.Boolean fDisposing
    | Improve this Doc View Source

    ExtractBundledFactorsHost(Int32, out Int32, out Int32[], out Int32[], out Double[])

    This routine allows direct access to the lower L and upper U triangular factors stored in the cuSolverRF library handle. The factors are compressed into a single matrix M=(LI)+ U, where the unitary diagonal of L is not stored. It is assumed that a prior call to the cusolverRfRefactor() was done in order to generate these triangular factors.

    Declaration
    public void ExtractBundledFactorsHost(int n, out int h_nnzM, out int[] h_Mp, out int[] h_Mi, out double[] h_Mx)
    Parameters
    Type Name Description
    System.Int32 n

    Size of Matrix M (n x n)

    System.Int32 h_nnzM

    the number of non-zero elements of matrix M.

    System.Int32[] h_Mp

    the array of offsets corresponding to the start of each row in the arrays Mi and Mx. This array has also an extra entry at the end that stores the number of non-zero elements in the matrix $M$. The array size is n+1.

    System.Int32[] h_Mi

    the array of column indices corresponding to the non-zero elements in the matrix M. It is assumed that this array is sorted by row and by column within each row. The array size is nnzM.

    System.Double[] h_Mx

    the array of values corresponding to the non-zero elements in the matrix M. It is assumed that this array is sorted by row and by column within each row. The array size is nnzM.

    | Improve this Doc View Source

    ExtractSplitFactorsHost(Int32, out Int32, out Int32[], out Int32[], out Double[], out Int32, out Int32[], out Int32[], out Double[])

    This routine extracts lower (L) and upper (U) triangular factors from the cuSolverRF library handle into the host memory. It is assumed that a prior call to the cusolverRfRefactor() was done in order to generate these triangular factors.

    Declaration
    public void ExtractSplitFactorsHost(int n, out int h_nnzL, out int[] h_csrRowPtrL, out int[] h_csrColIndL, out double[] h_csrValL, out int h_nnzU, out int[] h_csrRowPtrU, out int[] h_csrColIndU, out double[] h_csrValU)
    Parameters
    Type Name Description
    System.Int32 n

    Size of Matrix M (n x n)

    System.Int32 h_nnzL

    the number of non-zero elements of matrix L.

    System.Int32[] h_csrRowPtrL

    the array of offsets corresponding to the start of each row in the arrays h_Li and h_Lx. This array has also an extra entry at the end that stores the number of nonzero elements in the matrix L. The array size is n+1.

    System.Int32[] 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 h_nnzL.

    System.Double[] 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 h_nnzL.

    System.Int32 h_nnzU

    the number of non-zero elements of matrix U.

    System.Int32[] h_csrRowPtrU

    the array of offsets corresponding to the start of each row in the arrays h_Ui and h_Ux. This array has also an extra entry at the end that stores the number of nonzero elements in the matrix U. The array size is n+1.

    System.Int32[] 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 h_nnzU.

    System.Double[] 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 h_nnzU.

    | Improve this Doc View Source

    Finalize()

    For dispose

    Declaration
    protected void Finalize()
    | Improve this Doc View Source

    GetAlgs(ref Factorization, ref TriangularSolve)

    This routine gets the algorithm used for the refactorization in cusolverRfRefactor() and the triangular solve in cusolverRfSolve(). It may be called once prior to cusolverRfAnalyze() routine.

    Declaration
    public void GetAlgs(ref Factorization factAlg, ref TriangularSolve solveAlg)
    Parameters
    Type Name Description
    Factorization factAlg

    the enumerated algorithm type.

    TriangularSolve solveAlg

    the enumerated algorithm type.

    | Improve this Doc View Source

    GetMatrixFormat(ref MatrixFormat, ref UnitDiagonal)

    This routine gets the matrix format used in the cusolverRfSetup(), cusolverRfSetupHost(), cusolverRfResetValues(), cusolverRfExtractBundledFactorsHost() and cusolverRfExtractSplitFactorsHost() routines.

    Declaration
    public void GetMatrixFormat(ref MatrixFormat format, ref UnitDiagonal diag)
    Parameters
    Type Name Description
    MatrixFormat format

    the enumerated matrix format type.

    UnitDiagonal diag

    the enumerated unit diagonal type.

    | Improve this Doc View Source

    GetNumericBoostReport(ref NumericBoostReport)

    This routine gets the report whether numeric boosting was used in the cusolverRfRefactor() and cusolverRfSolve() routines.

    Declaration
    public void GetNumericBoostReport(ref NumericBoostReport report)
    Parameters
    Type Name Description
    NumericBoostReport report

    the enumerated boosting report type.

    | Improve this Doc View Source

    GetNumericProperties(ref Double, ref Double)

    This routine gets the numeric values used for checking for "zero" pivot and for boosting it in the cusolverRfRefactor() and cusolverRfSolve() routines. It may be called multiple times prior to cusolverRfRefactor() and cusolverRfSolve() routines. The numeric boosting will be used only if boost > 0.0.

    Declaration
    public void GetNumericProperties(ref double zero, ref double boost)
    Parameters
    Type Name Description
    System.Double zero

    the value below which zero pivot is flagged.

    System.Double boost

    the value which is substituted for zero pivot (if the later is flagged).

    | Improve this Doc View Source

    GetResetValuesFastMode(ref ResetValuesFastMode)

    This routine gets the mode used in the cusolverRfResetValues routine.

    Declaration
    public void GetResetValuesFastMode(ref ResetValuesFastMode fastMode)
    Parameters
    Type Name Description
    ResetValuesFastMode fastMode

    the enumerated mode type.

    | Improve this Doc View Source

    Refactor(cusolverRfHandle)

    This routine performs the LU re-factorization

    Declaration
    public void Refactor(cusolverRfHandle handle)
    Parameters
    Type Name Description
    cusolverRfHandle handle
    | Improve this Doc View Source

    ResetValues(Int32, Int32, CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>, CudaDeviceVariable<Double>, CudaDeviceVariable<Double>, CudaDeviceVariable<Double>)

    This routine updates internal data structures with the values of the new coefficient matrix. It is assumed that the arrays csrRowPtrA, csrColIndA, P and Q have not changed since the last call to the cusolverRfSetup[Host] routine. This assumption reflects the fact that the sparsity pattern of coefficient matrices as well as reordering to minimize fill-in and pivoting remain the same in the set of linear systems

    Declaration
    public void ResetValues(int n, int nnzA, CudaDeviceVariable<int> csrRowPtrA, CudaDeviceVariable<int> csrColIndA, CudaDeviceVariable<double> csrValA, CudaDeviceVariable<double> P, CudaDeviceVariable<double> Q)
    Parameters
    Type Name Description
    System.Int32 n

    the number of rows (and columns) of matrix A.

    System.Int32 nnzA

    the number of non-zero elements of matrix A.

    CudaDeviceVariable<System.Int32> csrRowPtrA

    the array of offsets corresponding to the start of each row in the arrays csrColIndA and 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.

    CudaDeviceVariable<System.Int32> 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.

    CudaDeviceVariable<System.Double> 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.

    CudaDeviceVariable<System.Double> P

    the left permutation (often associated with pivoting). The array size in n.

    CudaDeviceVariable<System.Double> Q

    the right permutation (often associated with reordering). The array size in n.

    | Improve this Doc View Source

    SetAlgs(Factorization, TriangularSolve)

    This routine sets the algorithm used for the refactorization in cusolverRfRefactor() and the triangular solve in cusolverRfSolve(). It may be called once prior to cusolverRfAnalyze() routine.

    Declaration
    public void SetAlgs(Factorization factAlg, TriangularSolve solveAlg)
    Parameters
    Type Name Description
    Factorization factAlg

    the enumerated algorithm type.

    TriangularSolve solveAlg

    the enumerated algorithm type.

    | Improve this Doc View Source

    SetMatrixFormat(MatrixFormat, UnitDiagonal)

    This routine sets the matrix format used in the cusolverRfSetup(), cusolverRfSetupHost(), cusolverRfResetValues(), cusolverRfExtractBundledFactorsHost() and cusolverRfExtractSplitFactorsHost() routines.

    Declaration
    public void SetMatrixFormat(MatrixFormat format, UnitDiagonal diag)
    Parameters
    Type Name Description
    MatrixFormat format

    the enumerated matrix format type.

    UnitDiagonal diag

    the enumerated unit diagonal type.

    | Improve this Doc View Source

    SetNumericProperties(Double, Double)

    This routine sets the numeric values used for checking for "zero" pivot and for boosting it in the cusolverRfRefactor() and cusolverRfSolve() routines. It may be called multiple times prior to cusolverRfRefactor() and cusolverRfSolve() routines. The numeric boosting will be used only if boost > 0.0.

    Declaration
    public void SetNumericProperties(double zero, double boost)
    Parameters
    Type Name Description
    System.Double zero

    the value below which zero pivot is flagged.

    System.Double boost

    the value which is substituted for zero pivot (if the later is flagged).

    | Improve this Doc View Source

    SetResetValuesFastMode(ResetValuesFastMode)

    This routine sets the mode used in the cusolverRfResetValues routine.

    Declaration
    public void SetResetValuesFastMode(ResetValuesFastMode fastMode)
    Parameters
    Type Name Description
    ResetValuesFastMode fastMode

    the enumerated mode type.

    | Improve this Doc View Source

    SetupHost(Int32, Int32, Int32[], Int32[], Double[], Int32, Int32[], Int32[], Double[], Int32, Int32[], Int32[], Double[], Int32[], Int32[])

    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.

    Declaration
    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)
    Parameters
    Type Name Description
    System.Int32 n

    the number of rows (and columns) of matrix A.

    System.Int32 nnzA

    the number of non-zero elements of matrix A.

    System.Int32[] 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.

    System.Int32[] 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.

    System.Double[] 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.

    System.Int32 nnzL

    the number of non-zero elements of matrix L.

    System.Int32[] 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.

    System.Int32[] 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.

    System.Double[] 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.

    System.Int32 nnzU

    the number of non-zero elements of matrix U.

    System.Int32[] 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.

    System.Int32[] 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.

    System.Double[] 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.

    System.Int32[] h_P

    the left permutation (often associated with pivoting). The array size in n.

    System.Int32[] h_Q

    the right permutation (often associated with reordering). The array size in n.

    | Improve this Doc View Source

    Solve(CudaDeviceVariable<Int32>, CudaDeviceVariable<Int32>, Int32, Double[], Int32, Double[], Int32)

    This routine performs the forward and backward solve with the lower and upper triangular factors resulting from the LU re-factorization

    Declaration
    public void Solve(CudaDeviceVariable<int> P, CudaDeviceVariable<int> Q, int nrhs, double[] Temp, int ldt, double[] XF, int ldxf)
    Parameters
    Type Name Description
    CudaDeviceVariable<System.Int32> P

    the left permutation (often associated with pivoting). The array size in n.

    CudaDeviceVariable<System.Int32> Q

    the right permutation (often associated with reordering). The array size in n.

    System.Int32 nrhs

    the number right-hand-sides to be solved.

    System.Double[] Temp

    the dense matrix that contains temporary workspace (of size ldt*nrhs).

    System.Int32 ldt

    the leading dimension of dense matrix Temp (ldt >= n).

    System.Double[] XF

    the dense matrix that contains the righthand-sides F and solutions X (of size ldxf*nrhs).

    System.Int32 ldxf

    the leading dimension of dense matrix XF (ldxf >= n).

    Implements

    System.IDisposable
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX