/// <summary>
        /// Returns matrix diagonal type
        /// </summary>
        /// <returns></returns>
        public cusparseDiagType GetMatDiagType()
        {
            cusparseDiagType diagType = CudaSparseNativeMethods.cusparseGetMatDiagType(_descr);

            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseGetMatDiagType", res));
            return(diagType);
        }
Ejemplo n.º 2
0
 public void SetAttribute(cusparseDiagType diagType)
 {
     res = CudaSparseNativeMethods.cusparseSpMatSetAttribute(descr, cusparseSpMatAttribute.DiagType, ref diagType, sizeof(cusparseDiagType));
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseSpMatSetAttribute", res));
     if (res != cusparseStatus.Success)
     {
         throw new CudaSparseException(res);
     }
 }
 /// <summary>
 /// Sets matrix diagonal type
 /// </summary>
 /// <param name="diagType"></param>
 public void SetMatDiagType(cusparseDiagType diagType)
 {
     res = CudaSparseNativeMethods.cusparseSetMatDiagType(_descr, diagType);
     Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseSetMatDiagType", res));
     if (res != cusparseStatus.Success)
     {
         throw new CudaSparseException(res);
     }
 }
        /// <summary>
        /// When the matrix descriptor is created, its fields are initialized to: 
		/// CUSPARSE_MATRIXYPE_GENERAL
		/// CUSPARSE_INDEX_BASE_ZERO
        /// </summary>
        public CudaSparseMatrixDescriptor(cusparseFillMode fillMode, cusparseDiagType diagType)
        {
            _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);
			SetMatFillMode(fillMode);
			SetMatDiagType(diagType);
        }
 /// <summary>
 /// When the matrix descriptor is created, its fields are initialized to:
 /// CUSPARSE_MATRIXYPE_GENERAL
 /// CUSPARSE_INDEX_BASE_ZERO
 /// </summary>
 public CudaSparseMatrixDescriptor(cusparseFillMode fillMode, cusparseDiagType diagType)
 {
     _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);
     }
     SetMatFillMode(fillMode);
     SetMatDiagType(diagType);
 }
		public static extern cusparseStatus cusparseSetMatDiagType(cusparseMatDescr descrA, cusparseDiagType diagType);
		/// <summary>
		/// Sets matrix diagonal type
		/// </summary>
		/// <param name="diagType"></param>
		public void SetMatDiagType(cusparseDiagType diagType)
		{
			res = CudaSparseNativeMethods.cusparseSetMatDiagType(_descr, diagType);
			Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseSetMatDiagType", res));
			if (res != cusparseStatus.Success)
				throw new CudaSparseException(res);
		}
Ejemplo n.º 8
0
 private static extern CUSPARSEStatus cusparseSetMatDiagType(cusparseMatDescr descrA, cusparseDiagType diagType);
Ejemplo n.º 9
0
 public CUSPARSEStatus CusparseSetMatDiagType(cusparseMatDescr descrA, cusparseDiagType diagType)
 {
     return(cusparseSetMatDiagType(descrA, diagType));
 }
Ejemplo n.º 10
0
 private static extern CUSPARSEStatus cusparseSetMatDiagType(cusparseMatDescr descrA, cusparseDiagType diagType);
Ejemplo n.º 11
0
 public CUSPARSEStatus CusparseSetMatDiagType(cusparseMatDescr descrA, cusparseDiagType diagType)
 {
     return cusparseSetMatDiagType(descrA, diagType);
 }