code: public static int cusparseSnnz(
          cusparseHandle handle, 
          int dirA, 
          int m, 
          int n, 
          cusparseMatDescr descrA, 
          Pointer A, 
          int lda, 
          Pointer nnzPerRowCol, 
          Pointer nnzTotalDevHostPtr)
      {
          return checkResult(cusparseSnnzNative(handle, dirA, m, n, descrA, A, lda, nnzPerRowCol, nnzTotalDevHostPtr));
      }
docs: Description: This routine finds the total number of non-zero elements and
  the number of non-zero elements per row or column in the dense matrix A.