コード例 #1
0
ファイル: DenseMatrix.cs プロジェクト: zhongkaifu/managedCuda
 /// <summary>
 /// </summary>
 public DenseMatrix(long aRows, long aCols, long aLd, Order aOrder, CudaDeviceVariable <dataT> values)
 {
     rows     = aRows;
     cols     = aCols;
     ld       = aLd;
     order    = aOrder;
     descr    = new cusparseDnMatDescr();
     typeData = CudaDataTypeTranslator.GetType(typeof(dataT));
     res      = CudaSparseNativeMethods.cusparseCreateDnMat(ref descr, rows, cols, ld, values.DevicePointer, typeData, order);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseCreateDnMat", res));
     if (res != cusparseStatus.Success)
     {
         throw new CudaSparseException(res);
     }
 }