当前位置: 首页>>代码示例>>C#>>正文


C# SPARSE.cusparseMatDescr类代码示例

本文整理汇总了C#中Cudafy.Maths.SPARSE.cusparseMatDescr的典型用法代码示例。如果您正苦于以下问题:C# cusparseMatDescr类的具体用法?C# cusparseMatDescr怎么用?C# cusparseMatDescr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


cusparseMatDescr类属于Cudafy.Maths.SPARSE命名空间,在下文中一共展示了cusparseMatDescr类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DefaultTriangular

        public static cusparseMatDescr DefaultTriangular()
        {
            cusparseMatDescr descr = new cusparseMatDescr();
            descr.MatrixType = cusparseMatrixType.Triangular;
            descr.FillMode = cusparseFillMode.Lower;
            descr.DiagType = cusparseDiagType.NonUnit;
            descr.IndexBase = cusparseIndexBase.Zero;

            return descr;
        }
开发者ID:constructor-igor,项目名称:cudafy,代码行数:10,代码来源:cusparseMatDescr.cs

示例2: CusparseDdense2csc

 public CUSPARSEStatus CusparseDdense2csc(cusparseHandle handle, int m, int n, cusparseMatDescr descrA, IntPtr A, int lda, IntPtr nnzPerCol, IntPtr cscValA, IntPtr cscRowIndA, IntPtr cscColPtrA)
 {
     return cusparseDdense2csc(handle, m, n, descrA, A, lda, nnzPerCol, cscValA, cscRowIndA, cscColPtrA);
 }
开发者ID:JustasB,项目名称:cudafy,代码行数:4,代码来源:CUSPARSEDriver.cs

示例3: CSRSV_SOLVE

 /// <summary>
 /// Performs the solve phase of the solution of a sparse triangular linear system.
 /// op(A) * y = alpha * x
 /// </summary>
 /// <param name="m">specifies the number of rows and columns of matrix A; m must be at least zero.</param>
 /// <param name="alpha">scalar multiplier applied to x.</param>
 /// <param name="csrValA">array of nnz elements, where nnz is the number of non-zero elements and can be obtained from csrRow[m] - csrRow[0].</param>
 /// <param name="csrRowA">array of m+1 index elements.</param>
 /// <param name="csrColA">array of nnz column indices.</param>
 /// <param name="x">vector of m elements.</param>
 /// <param name="y">vector of m elements. updated according to op(A) * y = alpha * x</param>
 /// <param name="op">specifies op(A).</param>
 /// <param name="info">structure that stores the information collected during the analysis phase. It should be passed to the solve phase unchanged.</param>
 /// <param name="descrA">descriptor of matrix A.</param>
 public abstract void CSRSV_SOLVE(int m, ref double alpha, double[] csrValA, int[] csrRowA, int[] csrColA, double[] x, double[] y, cusparseOperation op, cusparseSolveAnalysisInfo info, cusparseMatDescr descrA);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:15,代码来源:GPGPUSPARSE.cs

示例4: CSRMV

 /// <summary>
 /// Performs one of the matrix-vector operations.
 /// y = alpha * op(A) * x + beta * y
 /// </summary>
 /// <param name="m">specifies the number of rows of matrix A; m mmust be at least zero.</param>
 /// <param name="n">specifies the number of columns of matrix A; n mmust be at least zero.</param>
 /// <param name="nnz">number of non-zero elements of matrix A.</param>
 /// <param name="alpha">scalar multiplier applied to op(A) * x.</param>
 /// <param name="csrValA">array of nnz elements, where nnz is the number of non-zero elements and can be ontained from csrRow[m] - csrRow[0].</param>
 /// <param name="csrRowA">array of m+1 index elements.</param>
 /// <param name="csrColA">array of nnz column indices.</param>
 /// <param name="x">vector of n elements if op(A) = A, and m elements if op(A) = transpose(A).</param>
 /// <param name="beta">scalar multiplier applied to y. If beta is zero, y does not have to be a valid input.</param>
 /// <param name="y">vector of m elements if op(A) = A, and n elements if op(A) = transpose(A).</param>
 /// <param name="descrA">descriptor of matrix A.</param>
 /// <param name="op">specifies op(A).</param>
 public abstract void CSRMV(int m, int n, int nnz, ref double alpha, double[] csrValA, int[] csrRowA, int[] csrColA, double[] x, ref double beta, double[] y, cusparseMatDescr descrA, cusparseOperation op = cusparseOperation.NonTranspose);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:17,代码来源:GPGPUSPARSE.cs

示例5: Dense2CSC

 /// <summary>
 /// Converts the matrix A in dense format into a matrix in CSC format. All the parameters are pre-allocated by the user, and the arrays are filled in based nnzPerCol.
 /// </summary>
 /// <param name="m">number of rows of the matrix A; m must be at least zero.</param>
 /// <param name="n">number of columns of the matrix A; n must be at least zero.</param>
 /// <param name="A">array of dimension (lda, n)</param>
 /// <param name="nnzPerCol">>array of size m containing the number of non-zero elements per column.</param>
 /// <param name="cscValA">array of nnz elements to be filled.</param>
 /// <param name="cscRowIndA">array of nnz row indices, corresponding to the non-zero elements in the matrix.</param>
 /// <param name="cscColA">array of n+1 index elements.</param>
 /// <param name="descrA">descriptor of matrix A.</param>
 /// <param name="lda">leading dimension of A. If lda is 0, automatically be m.</param>
 public abstract void Dense2CSC(int m, int n, double[] A, int[] nnzPerCol, double[] cscValA, int[] cscRowIndA, int[] cscColA, cusparseMatDescr descrA, int lda = 0);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:13,代码来源:GPGPUSPARSE.cs

示例6: Dense2CSR

 /// <summary>
 /// Converts the matrix A in dense format into a matrix in CSR format. All the parameters are pre-allocated by the user, and the arrays are filled in based on nnzPerRow.
 /// </summary>
 /// <param name="m">number of rows of the matrix A; m must be at least zero.</param>
 /// <param name="n">number of columns of the matrix A; n must be at least zero.</param>
 /// <param name="A">array of dimension (lda, n)</param>
 /// <param name="nnzPerRow">array of size m containing the number of non-zero elements per row.</param>
 /// <param name="csrValA">array of nnz elements to be filled.</param>
 /// <param name="csrRowA">array of m+1 index elements.</param>
 /// <param name="csrColIndA">array of nnz column indices, corresponding to the non-zero elements in the matrix.</param>
 /// <param name="descrA">descriptor of matrix A.</param>
 /// <param name="lda">leading dimension of A. If lda is 0, automatically be m.</param>
 public abstract void Dense2CSR(int m, int n, double[] A, int[] nnzPerRow, double[] csrValA, int[] csrRowA, int[] csrColIndA, cusparseMatDescr descrA, int lda = 0);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:13,代码来源:GPGPUSPARSE.cs

示例7: cusparseDdense2csc

 private static extern CUSPARSEStatus cusparseDdense2csc(cusparseHandle handle, int m, int n, cusparseMatDescr descrA, IntPtr A, int lda, IntPtr nnzPerCol, IntPtr cscValA, IntPtr cscRowIndA, IntPtr cscColPtrA);
开发者ID:JustasB,项目名称:cudafy,代码行数:1,代码来源:CUSPARSEDriver.cs

示例8: cusparseDdense2csr

 private static extern CUSPARSEStatus cusparseDdense2csr(cusparseHandle handle, int m, int n, cusparseMatDescr descrA, IntPtr A, int lda, IntPtr nnzPerRow, IntPtr csrValA, IntPtr csrRowPtrA, IntPtr csrColIndA);
开发者ID:JustasB,项目名称:cudafy,代码行数:1,代码来源:CUSPARSEDriver.cs

示例9: cusparseSetMatFillMode

 private static extern CUSPARSEStatus cusparseSetMatFillMode(cusparseMatDescr descrA, cusparseFillMode fillMode);
开发者ID:JustasB,项目名称:cudafy,代码行数:1,代码来源:CUSPARSEDriver.cs

示例10: CusparseDcsrmv

 public CUSPARSEStatus CusparseDcsrmv(cusparseHandle handle, cusparseOperation transA, int m, int n, int nnz, ref double alpha, cusparseMatDescr descrA, IntPtr csrValA, IntPtr csrRowPtrA, IntPtr csrColIndA, IntPtr x, ref double beta, IntPtr y)
 {
     return cusparseDcsrmv_v2(handle, transA, m, n, nnz, ref alpha, descrA, csrValA, csrRowPtrA, csrColIndA, x, ref beta, y);
 }
开发者ID:JustasB,项目名称:cudafy,代码行数:4,代码来源:CUSPARSEDriver.cs

示例11: cusparseGetMatType

 private static extern cusparseMatrixType cusparseGetMatType(cusparseMatDescr descrA);
开发者ID:JustasB,项目名称:cudafy,代码行数:1,代码来源:CUSPARSEDriver.cs

示例12: cusparseSetMatType

 private static extern CUSPARSEStatus cusparseSetMatType(cusparseMatDescr descrA, cusparseMatrixType type);
开发者ID:JustasB,项目名称:cudafy,代码行数:1,代码来源:CUSPARSEDriver.cs

示例13: cusparseDestroyMatDescr

 private static extern CUSPARSEStatus cusparseDestroyMatDescr(cusparseMatDescr descrA);
开发者ID:JustasB,项目名称:cudafy,代码行数:1,代码来源:CUSPARSEDriver.cs

示例14: CusparseDcsc2dense

 public CUSPARSEStatus CusparseDcsc2dense(cusparseHandle handle, int m, int n, cusparseMatDescr descrA, IntPtr cscValA, IntPtr cscRowIndA, IntPtr cscColPtrA, IntPtr A, int lda)
 {
     return cusparseDcsc2dense(handle, m, n, descrA, cscValA, cscRowIndA, cscColPtrA, A, lda);
 }
开发者ID:JustasB,项目名称:cudafy,代码行数:4,代码来源:CUSPARSEDriver.cs

示例15: cusparseCreateMatDescr

 private static extern CUSPARSEStatus cusparseCreateMatDescr(ref cusparseMatDescr descrA);
开发者ID:JustasB,项目名称:cudafy,代码行数:1,代码来源:CUSPARSEDriver.cs


注:本文中的Cudafy.Maths.SPARSE.cusparseMatDescr类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。