コード例 #1
0
ファイル: CudaSPARSE.cs プロジェクト: rblenis/cudafy
        public override void CSR2COO(int nnz, int m, int[] csrRow, int[] cooRow, cusparseIndexBase idxBase = cusparseIndexBase.Zero)
        {
            CUdeviceptr ptrcsr = GetDeviceMemory(csrRow);
            CUdeviceptr ptrcoo = GetDeviceMemory(cooRow);

            LastStatus = _driver.CusparseXcsr2coo(_sparse, ptrcsr.Pointer, nnz, m, ptrcoo.Pointer, idxBase);
        }
コード例 #2
0
        /// <summary>
        /// Returns matrix index base.
        /// </summary>
        /// <returns></returns>
        public cusparseIndexBase GetMatIndexBase()
        {
            cusparseIndexBase indexBase = CudaSparseNativeMethods.cusparseGetMatIndexBase(_descr);

            Debug.WriteLine(String.Format("{0:G}, {1}: {2}", DateTime.Now, "cusparseGetMatIndexBase", res));
            return(indexBase);
        }
コード例 #3
0
 /// <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);
     }
 }
コード例 #4
0
        /// <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);
        }
コード例 #5
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 public CUSPARSEStatus CusparseDaxpyi(cusparseHandle handle, int nnz, ref double alpha, IntPtr xVal, IntPtr xInd, IntPtr y, cusparseIndexBase idxBase)
 {
     return(cusparseDaxpyi_v2(handle, nnz, ref alpha, xVal, xInd, y, idxBase));
 }
コード例 #6
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 private static extern CUSPARSEStatus cusparseDsctr(cusparseHandle handle, int nnz, IntPtr xVal, IntPtr xInd, IntPtr y, cusparseIndexBase ibase);
コード例 #7
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 public CUSPARSEStatus CusparseDcsr2csc(cusparseHandle handle, int m, int n, int nnz, IntPtr csrVal, IntPtr csrRowPtr, IntPtr csrColInd, IntPtr cscVal, IntPtr cscRowInd, IntPtr cscColPtr, cusparseAction copyvalues, cusparseIndexBase bs)
 {
     return(cusparseDcsr2csc_v2(handle, m, n, nnz, csrVal, csrRowPtr, csrColInd, cscVal, cscRowInd, cscColPtr, copyvalues, bs));
 }
コード例 #8
0
		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);
コード例 #9
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 private static extern CUSPARSEStatus cusparseDdoti(cusparseHandle handle, int nnz, IntPtr xVal, IntPtr xInd, IntPtr y, ref double resultHost, cusparseIndexBase idxBase);
コード例 #10
0
		/// <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);
		}
コード例 #11
0
		public static extern cusparseStatus cusparseXcsr2coo(cusparseContext handle, CUdeviceptr csrRowPtr, int nnz, int m, CUdeviceptr cooRowInd, cusparseIndexBase idxBase);
コード例 #12
0
ファイル: CudaSPARSE.cs プロジェクト: rblenis/cudafy
        public override void AXPY(ref float alpha, float[] vectorx, int[] indexx, float[] vectory, int n = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero)
        {
            CUdeviceptr ptrx  = GetDeviceMemory(vectorx, ref n);
            CUdeviceptr ptry  = GetDeviceMemory(vectory);
            CUdeviceptr ptrix = GetDeviceMemory(indexx);

            LastStatus = _driver.CusparseSaxpyi(_sparse, n, ref alpha, ptrx.Pointer, ptrix.Pointer, ptry.Pointer, ibase);
        }
コード例 #13
0
ファイル: CudaSPARSE.cs プロジェクト: rblenis/cudafy
        public override double DOT(double[] vectorx, int[] indexx, double[] vectory, int n = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero)
        {
            CUdeviceptr ptrx  = GetDeviceMemory(vectorx, ref n);
            CUdeviceptr ptry  = GetDeviceMemory(vectory);
            CUdeviceptr ptrix = GetDeviceMemory(indexx);

            double result = 0;

            LastStatus = _driver.CusparseDdoti(_sparse, n, ptrx.Pointer, ptrix.Pointer, ptry.Pointer, ref result, ibase);
            return(result);
        }
コード例 #14
0
ファイル: CudaSPARSE.cs プロジェクト: rblenis/cudafy
        public override 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)
        {
            CUdeviceptr ptrcsrv = GetDeviceMemory(csrVal);
            CUdeviceptr ptrcsrr = GetDeviceMemory(csrRow);
            CUdeviceptr ptrcsrc = GetDeviceMemory(csrCol);

            CUdeviceptr ptrcscv = GetDeviceMemory(cscVal);
            CUdeviceptr ptrcscr = GetDeviceMemory(cscRow);
            CUdeviceptr ptrcscc = GetDeviceMemory(cscCol);

            LastStatus = _driver.CusparseDcsr2csc(_sparse, m, n, nnz, ptrcsrv.Pointer, ptrcsrr.Pointer, ptrcsrc.Pointer, ptrcscv.Pointer, ptrcscr.Pointer, ptrcscc.Pointer, copyValues, bs);
        }
コード例 #15
0
ファイル: CUSPARSEDriver.cs プロジェクト: JustasB/cudafy
 public CUSPARSEStatus CusparseDaxpyi(cusparseHandle handle, int nnz, ref double alpha, IntPtr xVal, IntPtr xInd, IntPtr y, cusparseIndexBase idxBase)
 {
     return cusparseDaxpyi_v2(handle, nnz, ref alpha, xVal, xInd, y, idxBase);
 }
コード例 #16
0
ファイル: CUSPARSEDriver.cs プロジェクト: JustasB/cudafy
 private static extern CUSPARSEStatus cusparseSetMatIndexBase(cusparseMatDescr descrA, cusparseIndexBase ibase);
コード例 #17
0
ファイル: CUSPARSEDriver.cs プロジェクト: JustasB/cudafy
 public CUSPARSEStatus CusparseDsctr(cusparseHandle handle, int nnz, IntPtr xVal, IntPtr xInd, IntPtr y, cusparseIndexBase ibase)
 {
     return cusparseDsctr(handle, nnz, xVal, xInd, y, ibase);
 }
コード例 #18
0
ファイル: CUSPARSEDriver.cs プロジェクト: JustasB/cudafy
 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);
 }
コード例 #19
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 public CUSPARSEStatus CusparseDgthrz(cusparseHandle handle, int nnz, IntPtr y, IntPtr xVal, IntPtr xInd, cusparseIndexBase ibase)
 {
     return(cusparseDgthrz(handle, nnz, y, xVal, xInd, ibase));
 }
コード例 #20
0
ファイル: CudaSPARSE.cs プロジェクト: rblenis/cudafy
        public override void ROT(float[] vectorx, int[] indexx, float[] vectory, ref float c, ref float s, int n = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero)
        {
            CUdeviceptr ptrx  = GetDeviceMemory(vectorx, ref n);
            CUdeviceptr ptry  = GetDeviceMemory(vectory);
            CUdeviceptr ptrix = GetDeviceMemory(indexx);

            LastStatus = _driver.CusparseSroti(_sparse, n, ptrx.Pointer, ptrix.Pointer, ptry.Pointer, ref c, ref s, ibase);
        }
コード例 #21
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 public CUSPARSEStatus CusparseDsctr(cusparseHandle handle, int nnz, IntPtr xVal, IntPtr xInd, IntPtr y, cusparseIndexBase ibase)
 {
     return(cusparseDsctr(handle, nnz, xVal, xInd, y, ibase));
 }
コード例 #22
0
ファイル: CudaSPARSE.cs プロジェクト: rblenis/cudafy
        public override void SCTR(double[] vectorx, int[] indexx, double[] vectory, int n = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero)
        {
            CUdeviceptr ptrx  = GetDeviceMemory(vectorx, ref n);
            CUdeviceptr ptry  = GetDeviceMemory(vectory);
            CUdeviceptr ptrix = GetDeviceMemory(indexx);

            LastStatus = _driver.CusparseDsctr(_sparse, n, ptrx.Pointer, ptrix.Pointer, ptry.Pointer, ibase);
        }
コード例 #23
0
ファイル: CUSPARSEDriver.cs プロジェクト: JustasB/cudafy
 public CUSPARSEStatus CusparseDgthrz(cusparseHandle handle, int nnz, IntPtr y, IntPtr xVal, IntPtr xInd, cusparseIndexBase ibase)
 {
     return cusparseDgthrz(handle, nnz, y, xVal, xInd, ibase);
 }
コード例 #24
0
 /// <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);
コード例 #25
0
		public static extern cusparseStatus cusparseSroti(cusparseContext handle, int nnz, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, ref float c, ref float s, cusparseIndexBase idxBase);
コード例 #26
0
 /// <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);
コード例 #27
0
 /// <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);
 }
コード例 #28
0
 /// <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);
コード例 #29
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 private static extern CUSPARSEStatus cusparseDroti_v2(cusparseHandle handle, int nnz, IntPtr xVal, IntPtr xInd, IntPtr y, ref double c, ref double s, cusparseIndexBase idxBase);
コード例 #30
0
 /// <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 double alpha, double[] vectorx, int[] indexx, double[] vectory, int nnz = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero);
コード例 #31
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 public CUSPARSEStatus CusparseSetMatIndexBase(cusparseMatDescr descrA, cusparseIndexBase ibase)
 {
     return(cusparseSetMatIndexBase(descrA, ibase));
 }
コード例 #32
0
 /// <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);
コード例 #33
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 public CUSPARSEStatus CusparseXcsr2coo(cusparseHandle handle, IntPtr csrRowPtr, int nnz, int m, IntPtr cooRowInd, cusparseIndexBase idxBase)
 {
     return(cusparseXcsr2coo(handle, csrRowPtr, nnz, m, cooRowInd, idxBase));
 }
コード例 #34
0
 /// <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 double DOT(double[] vectorx, int[] indexx, double[] vectory, int n = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero);
コード例 #35
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 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));
 }
コード例 #36
0
		public static extern cusparseStatus cusparseSetMatIndexBase(cusparseMatDescr descrA, cusparseIndexBase indexBase);
コード例 #37
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 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));
 }
コード例 #38
0
		public static extern cusparseStatus cusparseZaxpyi(cusparseContext handle, int nnz, CUdeviceptr alpha, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, cusparseIndexBase idxBase);
コード例 #39
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 private static extern CUSPARSEStatus cusparseSetMatIndexBase(cusparseMatDescr descrA, cusparseIndexBase ibase);
コード例 #40
0
		public static extern cusparseStatus cusparseZdotci(cusparseContext handle, int nnz, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, CUdeviceptr resultDevHostPtr, cusparseIndexBase idxBase);
コード例 #41
0
 /// <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);
コード例 #42
0
ファイル: CUSPARSEDriver.cs プロジェクト: JustasB/cudafy
 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);
 }
コード例 #43
0
		public static extern cusparseStatus cusparseCaxpyi(cusparseContext handle, int nnz, ref cuFloatComplex alpha, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, cusparseIndexBase idxBase);
コード例 #44
0
 /// <summary>
 /// Applies givens rotation, defined by values c and s, to vectors x in sparse and y in dense format.
 /// x[i] = c * x[i] + s * y[i];
 /// y[i] = c * y[i] - s * x[i];
 /// </summary>
 /// <param name="vectorx">non-zero values of the vector x.</param>
 /// <param name="indexx">indices correspoding to non-zero values of vector x.</param>
 /// <param name="vectory">vector in dense format.</param>
 /// <param name="c">scalar</param>
 /// <param name="s">scalar</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 ROT(float[] vectorx, int[] indexx, float[] vectory, ref float c, ref float s, int nnz = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero);
コード例 #45
0
		public static extern cusparseStatus cusparseCdoti(cusparseContext handle, int nnz, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, ref cuFloatComplex resultDevHostPtr, cusparseIndexBase idxBase);
コード例 #46
0
 /// <summary>
 /// Applies givens rotation, defined by values c and s, to vectors x in sparse and y in dense format.
 /// x[i] = c * x[i] + s * y[i];
 /// y[i] = c * y[i] - s * x[i];
 /// </summary>
 /// <param name="vectorx">non-zero values of the vector x.</param>
 /// <param name="indexx">indices correspoding to non-zero values of vector x.</param>
 /// <param name="vectory">vector in dense format.</param>
 /// <param name="c">scalar</param>
 /// <param name="s">scalar</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 ROT(double[] vectorx, int[] indexx, double[] vectory, ref double c, ref double s, int nnz = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero);
コード例 #47
0
		public static extern cusparseStatus cusparseZgthrz(cusparseContext handle, int nnz, CUdeviceptr y, CUdeviceptr xVal, CUdeviceptr xInd, cusparseIndexBase idxBase);
コード例 #48
0
 /// <summary>
 /// Scatters the vector x in sparse format into the vector y in dense format.
 /// It modifies only the lements of y whose indices are listed in the array indexx.
 /// y[i] = x[i]
 /// </summary>
 /// <param name="vectorx">non-zero values of vector x.</param>
 /// <param name="indexx">indices correspoding to non-zero values of vector x.</param>
 /// <param name="vectory">pre-allocated vector in dense format, of size greater than or equal to max(indexx)-ibase+1.</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 SCTR(double[] vectorx, int[] indexx, double[] vectory, int nnz = 0, cusparseIndexBase ibase = cusparseIndexBase.Zero);
コード例 #49
0
		public static extern cusparseStatus cusparseZcsr2csc(cusparseContext handle, int m, int n, int nnz, CUdeviceptr csrVal, CUdeviceptr csrRowPtr, CUdeviceptr csrColInd, CUdeviceptr cscVal, CUdeviceptr cscRowInd, CUdeviceptr cscColPtr, cusparseAction copyValues, cusparseIndexBase idxBase);
コード例 #50
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 private static extern CUSPARSEStatus cusparseDcsr2csc_v2(cusparseHandle handle, int m, int n, int nnz, IntPtr csrVal, IntPtr csrRowPtr, IntPtr csrColInd, IntPtr cscVal, IntPtr cscRowInd, IntPtr cscColPtr, cusparseAction copyvalues, cusparseIndexBase bs);
コード例 #51
0
		public static extern cusparseStatus cusparseDroti(cusparseContext handle, int nnz, CUdeviceptr xVal, CUdeviceptr xInd, CUdeviceptr y, CUdeviceptr c, CUdeviceptr s, cusparseIndexBase idxBase);
コード例 #52
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 private static extern CUSPARSEStatus cusparseXcsr2coo(cusparseHandle handle, IntPtr csrRowPtr, int nnz, int m, IntPtr cooRowInd, cusparseIndexBase idxBase);
コード例 #53
0
		public static extern cusparseStatus cusparseZgebsr2gebsc(cusparseContext handle,
											  int mb,
											  int nb,
											  int nnzb,
											  CUdeviceptr bsrVal,
											  CUdeviceptr bsrRowPtr,
											  CUdeviceptr bsrColInd,
											  int rowBlockDim,
											  int colBlockDim,
											  CUdeviceptr bscVal,
											  CUdeviceptr bscRowInd,
											  CUdeviceptr bscColPtr,
											  cusparseAction copyValues,
											  cusparseIndexBase baseIdx,
											  CUdeviceptr pBuffer);
コード例 #54
0
ファイル: CUSPARSEDriver.cs プロジェクト: ingted/Cudafy
 private static extern CUSPARSEStatus cusparseDaxpyi_v2(cusparseHandle handle, int nnz, ref double alpha, IntPtr xVal, IntPtr xInd, IntPtr y, cusparseIndexBase idxBase);