         const void           *x, const void           *beta, 
         void           *y);
 
+typedef cusparseStatus_t (*cusparse_crs_spmmv_cm_kernel_t) (cusparseHandle_t handle, cusparseOperation_t transA, 
+        int m, int n, int k, int nnz, const void           *alpha, 
+        const cusparseMatDescr_t descrA, 
+        const void           *csrValA, 
+        const void *csrRowPtrA, const void *csrColIndA,
+        const void           *x, int ldx, const void           *beta, 
+        void           *y, int ldy);
+
+typedef cusparseStatus_t (*cusparse_crs_spmmv_rm_kernel_t) (cusparseHandle_t handle, cusparseOperation_t transA,
+        cusparseOperation_t transB,
+        int m, int n, int k, int nnz, const void           *alpha, 
+        const cusparseMatDescr_t descrA, 
+        const void           *csrValA, 
+        const void *csrRowPtrA, const void *csrColIndA,
+        const void           *x, int ldx, const void           *beta, 
+        void           *y, int ldy);
+
     template<typename dt1, typename dt2>
-static ghost_error_t ghost_cu_crsspmv_tmpl(ghost_sparsemat_t *mat, ghost_densemat_t * lhs, ghost_densemat_t * rhs, ghost_spmv_flags_t options, va_list argp, crskernel_t crskernel)
-{
-    if (options & GHOST_SPMV_DOT_ANY) {
-        ERROR_LOG("Localdot not implemented!");
-        return GHOST_ERR_NOT_IMPLEMENTED;
-    }
-    if (options & GHOST_SPMV_SHIFT) {
-        ERROR_LOG("Shift not implemented!");
-        return GHOST_ERR_NOT_IMPLEMENTED;
-    }
-
+static ghost_error_t ghost_cu_crsspmv_tmpl(ghost_sparsemat_t *mat, ghost_densemat_t * lhs, ghost_densemat_t * rhs, ghost_spmv_flags_t options, va_list argp, cusparse_crs_spmv_kernel_t crskernel)
+{
     cusparseHandle_t cusparse_handle;
     cusparseMatDescr_t descr;
 

#include <cuda_runtime.h>
#include <cusparse_v2.h>

typedef cusparseStatus_t (*crskernel_t) (cusparseHandle_t handle, cusparseOperation_t transA, 
        int m, int n, int nnz, const void           *alpha, 
        const cusparseMatDescr_t descrA, 
        const void           *csrValA, 

        rhscompact->destroy(rhscompact);
    }

    return ret;


    /*cusparseHandle_t cusparse_handle;
