示例#1
0
 public static extern cusparseStatus_t cusparseScsrmv(cusparseHandle_t handle,
                                                      cusparseOperation_t transA,
                                                      int m,
                                                      int n,
                                                      int nnz,
                                                      ref float alpha,
                                                      cusparseMatDescr_t descrA,
                                                      [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CudaMarshaler))] float[] csrValA,
                                                      [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CudaMarshaler))] int[] csrRowPtrA,
                                                      [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CudaMarshaler))] int[] csrColIndA,
                                                      [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CudaMarshaler))] float[] x,
                                                      ref float beta,
                                                      [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CudaMarshaler))] float[] b);
示例#2
0
 public static void Multiply(cusparseHandle_t handle,
                             cusparseOperation_t transA,
                             int m,
                             int n,
                             int nnz,
                             float alpha,
                             cusparseMatDescr_t descrA,
                             float[] csrValA,
                             int[] csrRowPtrA,
                             int[] csrColIndA,
                             float[] x,
                             float beta,
                             float[] b
                             )
 {
     cusparseScsrmv(handle, transA, m, n, nnz, ref alpha, descrA, csrValA, csrRowPtrA, csrColIndA, x, ref beta, b);
 }