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


C# cusparseIndexBase类代码示例

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


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

示例1: CudaSparseMatrixDescriptor

        /// <summary>
        /// Creates a new CudaSparseMatrixDescriptor
        /// </summary>
        public CudaSparseMatrixDescriptor(cusparseMatrixType matrixType, cusparseFillMode fillMode, cusparseDiagType diagType, cusparseIndexBase indexBase)
        {
            _descr = new cusparseMatDescr();
            res = CudaSparseNativeMethods.cusparseCreateMatDescr(ref _descr);
            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseCreateMatDescr", res));
            if (res != cusparseStatus.Success)
				throw new CudaSparseException(res);
			SetMatType(matrixType);
			SetMatFillMode(fillMode);
			SetMatDiagType(diagType);
			SetMatIndexBase(indexBase);
        }
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:15,代码来源:CudaSparseMatrixDescriptor.cs

示例2: CusparseDdoti

 public CUSPARSEStatus CusparseDdoti(cusparseHandle handle, int nnz, IntPtr xVal, IntPtr xInd, IntPtr y, ref double resultHost, cusparseIndexBase idxBase)
 {
     return cusparseDdoti(handle, nnz, xVal, xInd, y, ref resultHost, idxBase);
 }
开发者ID:JustasB,项目名称:cudafy,代码行数:4,代码来源:CUSPARSEDriver.cs

示例3: cusparseZgemvi

		public static extern cusparseStatus cusparseZgemvi(cusparseContext handle,
									cusparseOperation transA,
									int m,
									int n,
									CUdeviceptr alpha, /* host or device pointer */
									CUdeviceptr A,
									int lda,
									int nnz,
									CUdeviceptr xVal,
									CUdeviceptr xInd,
									CUdeviceptr beta, /* host or device pointer */
									CUdeviceptr y,
									cusparseIndexBase idxBase,
									CUdeviceptr pBuffer);
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:14,代码来源:CudaSparseNativeMethods.cs

示例4: cusparseSroti

		public static extern cusparseStatus cusparseSroti(cusparseContext handle, int nnz, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, ref float c, ref float s, cusparseIndexBase idxBase);
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:1,代码来源:CudaSparseNativeMethods.cs

示例5: cusparseXcsr2coo

		public static extern cusparseStatus cusparseXcsr2coo(cusparseContext handle, CUdeviceptr csrRowPtr, int nnz, int m, CUdeviceptr cooRowInd, cusparseIndexBase idxBase);
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:1,代码来源:CudaSparseNativeMethods.cs

示例6: cusparseZdotci

		public static extern cusparseStatus cusparseZdotci(cusparseContext handle, int nnz, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, CUdeviceptr resultDevHostPtr, cusparseIndexBase idxBase);
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:1,代码来源:CudaSparseNativeMethods.cs

示例7: cusparseZaxpyi

		public static extern cusparseStatus cusparseZaxpyi(cusparseContext handle, int nnz, CUdeviceptr alpha, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, cusparseIndexBase idxBase);
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:1,代码来源:CudaSparseNativeMethods.cs

示例8: cusparseSetMatIndexBase

		public static extern cusparseStatus cusparseSetMatIndexBase(cusparseMatDescr descrA, cusparseIndexBase indexBase);
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:1,代码来源:CudaSparseNativeMethods.cs

示例9: AXPY

 /// <summary>
 /// Multiplies the vector x in sparse format by the constant alpha and adds
 /// the result to the vector y in dense format.
 /// y = alpha * x + y
 /// </summary>
 /// <param name="alpha">constant multiplier.</param>
 /// <param name="vectorx">non-zero values of vector x.</param>
 /// <param name="indexx">indices corresponding to non‐zero values of vector x.</param>
 /// <param name="vectory">initial vector in dense format.</param>
 /// <param name="nnz">number of elements of the vector x (set to 0 for all elements).</param>
 /// <param name="ibase">The index base.</param>
 public abstract void AXPY(ref float alpha, float[] vectorx, int[] indexx, float[] vectory, int nnz = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:12,代码来源:GPGPUSPARSE.cs

示例10: CSR2COO

 /// <summary>
 /// Converts the array containing the compressed row pointers (corresponding to CSR format) into an array of uncompressed row indices ( corresponding to COO format).
 /// It can also be used to convert the array containing the compressed column pointers (corresponding to CSC format) into an array of uncompressed column indices (corresponding to COO format).
 /// </summary>
 /// <param name="nnz">number of non-zeros of the matrix in COO format; this is also the length of array cooRow</param>
 /// <param name="m">number of rows of the matrix A; m must be at least zero.</param>
 /// <param name="csrRow">array of compressed row pointers.</param>
 /// <param name="cooRow">array of umcompressed row indices.</param>
 /// <param name="idxBase">base index.</param>
 public abstract void CSR2COO(int nnz, int m, int[] csrRow, int[] cooRow, cusparseIndexBase idxBase = cusparseIndexBase.Zero);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:10,代码来源:GPGPUSPARSE.cs

示例11: CSR2CSC

 /// <summary>
 /// Converts the matrix in CSR format defined with the three arrays csrVal, csrRow and csrCol into matrix A in CSC format defined by array cscVal, cscRow, cscCol.
 /// The resultng matrix can also be seen as the transpose of the original sparse matrix. This routine can also be used to convert a matrix in CSC format into a matrix in CSR format.
 /// </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="nnz">number of non-zero elements of matrix A.</param>
 /// <param name="csrVal">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="csrRow">array of m+1 indices.</param>
 /// <param name="csrCol">array of nnz column indices.</param>
 /// <param name="cscVal">array of nnz elements, where nnz is the number of non-zero elements and can be obtained from csrCol[n] - csrCol[0]. if copyValues is non-zero, updated array.</param>
 /// <param name="cscRow">updated array of nnz row indices.</param>
 /// <param name="cscCol">updated array of n+1 index elements.</param>
 /// <param name="copyValues">if Symbloic, cscVal array is not filled.</param>
 /// <param name="bs">base index.</param>
 public abstract void CSR2CSC(int m, int n, int nnz, double[] csrVal, int[] csrRow, int[] csrCol, double[] cscVal, int[] cscRow, int[] cscCol, cusparseAction copyValues = cusparseAction.Numeric, cusparseIndexBase bs = cusparseIndexBase.Zero);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:16,代码来源:GPGPUSPARSE.cs

示例12: cusparseSetMatIndexBase

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

示例13: CusparseDsctr

 public CUSPARSEStatus CusparseDsctr(cusparseHandle handle, int nnz, IntPtr xVal, IntPtr xInd, IntPtr y, cusparseIndexBase ibase)
 {
     return cusparseDsctr(handle, nnz, xVal, xInd, y, ibase);
 }
开发者ID:JustasB,项目名称:cudafy,代码行数:4,代码来源:CUSPARSEDriver.cs

示例14: CusparseDroti

 public CUSPARSEStatus CusparseDroti(cusparseHandle handle, int nnz, IntPtr xVal, IntPtr xInd, IntPtr y, ref double c, ref double s, cusparseIndexBase idxBase)
 {
     return cusparseDroti_v2(handle, nnz, xVal, xInd, y, ref c, ref s, idxBase);
 }
开发者ID:JustasB,项目名称:cudafy,代码行数:4,代码来源:CUSPARSEDriver.cs

示例15: CusparseDgthrz

 public CUSPARSEStatus CusparseDgthrz(cusparseHandle handle, int nnz, IntPtr y, IntPtr xVal, IntPtr xInd, cusparseIndexBase ibase)
 {
     return cusparseDgthrz(handle, nnz, y, xVal, xInd, ibase);
 }
开发者ID:JustasB,项目名称:cudafy,代码行数:4,代码来源:CUSPARSEDriver.cs


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