code: public static int cusparseSdense2csr(
          cusparseHandle handle, 
          int m, 
          int n, 
          cusparseMatDescr descrA, 
          Pointer A, 
          int lda, 
          Pointer nnzPerRow, 
          Pointer csrSortedValA, 
          Pointer csrSortedRowPtrA, 
          Pointer csrSortedColIndA)
      {
          return checkResult(cusparseSdense2csrNative(handle, m, n, descrA, A, lda, nnzPerRow, csrSortedValA, csrSortedRowPtrA, csrSortedColIndA));
      }
docs: Description: This routine converts a dense matrix to a sparse matrix
  in the CSR storage format, using the information computed by the
  nnz routine.