MCPcopy Create free account
hub / github.com/ComputationalRobotics/XM-code / CSC2CSR_get_buffersize

Function CSC2CSR_get_buffersize

XM/include/Sparse/sparseformat.h:33–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31// here we assume mat_csr's memory has already been allocated
32template <typename T>
33inline size_t CSC2CSR_get_buffersize(
34 DeviceSparseHandle& cusparse_H,
35 const DeviceSpMatCSC<T>& mat_csc, DeviceSpMatCSR<T>& mat_csr
36) {
37 size_t buffer_size;
38 CHECK_CUSPARSE( cusparseCsr2cscEx2_bufferSize(
39 cusparse_H.cusparse_handle,
40 mat_csc.col_size, mat_csc.row_size, mat_csc.nnz,
41 mat_csc.vals, mat_csc.col_ptrs, mat_csc.row_ids,
42 mat_csr.vals, mat_csr.row_ptrs, mat_csr.col_ids,
43 CudaTypeMapper<T>::value, CUSPARSE_ACTION_NUMERIC, CUSPARSE_INDEX_BASE_ZERO, CUSPARSE_CSR2CSC_ALG_DEFAULT,
44 &buffer_size
45 ) );
46 return buffer_size;
47}
48
49// suppose buffer already been allocated
50template <typename T>

Callers 1

CSC2CSRFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected