• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# cusparseIndexBase类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: SetMatIndexBase

		/// <summary>
		/// Sets matrix index base
		/// </summary>
		/// <param name="indexBase"></param>
		public void SetMatIndexBase(cusparseIndexBase indexBase)
		{
			res = CudaSparseNativeMethods.cusparseSetMatIndexBase(_descr, indexBase);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseSetMatIndexBase", res));
			if (res != cusparseStatus.Success)
				throw new CudaSparseException(res);
		}
开发者ID:lvaleriu,项目名称:managedCuda,代码行数:11,代码来源:CudaSparseMatrixDescriptor.cs


示例17: DOT

 /// <summary>
 /// Returns the dot product of a vector x in sparse format and vector y in dense format.
 /// For i = 0 to n-1
 ///     result += x[i] * y[i]
 /// </summary>
 /// <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">vector in dense format.</param>
 /// <param name="n">number of non-zero elements of the vector x (set to 0 for all non-zero elements).</param>
 /// <param name="ibase">The index base.</param>
 /// <returns>result.</returns>
 public abstract float DOT(float[] vectorx, int[] indexx, float[] vectory, int n = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:12,代码来源:GPGPUSPARSE.cs


示例18: cusparseCaxpyi

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


示例19: cusparseCdoti

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


示例20: GTHRZ

 /// <summary>
 /// Gathers the elements of the vector y listed by the index array indexx into the array vectorx, and zeroes those elements in the vector y.
 /// x[i] = y[i]
 /// y[i] = 0
 /// </summary>
 /// <param name="vectory">vector in dense format, of size greater than or equal to max(indexx)-idxBase+1.</param>
 /// <param name="vectorx">pre-allocated array in device memory of size greater than or equal to nnz.</param>
 /// <param name="indexx">indices corresponding to non-zero values of vector x.</param>
 /// <param name="nnz">number of non-zero elements of the vector x (set to 0 for all non-zero elements).</param>
 /// <param name="ibase">The index base.</param>
 public abstract void GTHRZ(float[] vectory, float[] vectorx, int[] indexx, int nnz = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero);
开发者ID:constructor-igor,项目名称:cudafy,代码行数:11,代码来源:GPGPUSPARSE.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# cusparseOperation类代码示例发布时间:2022-05-24
下一篇:
C# cusparseDirection类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap