question: public Pointer toDenseMatrix ( cusparseHandle cusparseHandle , cublasHandle cublasHandle , int rows , int cols ) throws DMLRuntimeException { long size = rows * cols * Sizeof . DOUBLE ; Pointer A = JCudaObject . allocate ( size ) ; cusparseDcsr2dense ( cusparseHandle , rows , cols , descr , val , rowPtr , colInd , A , rows ) ; return A ; }
target:  Copies this CSR matrix on the GPU to a dense row-major matrix on the GPU. This is a temporary matrix for operations such as  cusparseDcsrmv. Since the allocated matrix is temporary, bookkeeping is not updated. The called is responsible for calling "free" on the returned Pointer object