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

Function CSR2CSC_get_buffersize

XM/include/Sparse/sparseformat.h:70–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68
69template <typename T>
70inline size_t CSR2CSC_get_buffersize(
71 DeviceSparseHandle& cusparse_H,
72 const DeviceSpMatCSR<T>& mat_csr, DeviceSpMatCSC<T>& mat_csc
73) {
74 size_t buffer_size;
75 CHECK_CUSPARSE( cusparseCsr2cscEx2_bufferSize(
76 cusparse_H.cusparse_handle,
77 mat_csr.row_size, mat_csr.col_size, mat_csr.nnz,
78 mat_csr.vals, mat_csr.row_ptrs, mat_csr.col_ids,
79 mat_csc.vals, mat_csc.col_ptrs, mat_csc.row_ids,
80 CudaTypeMapper<T>::value, CUSPARSE_ACTION_NUMERIC, CUSPARSE_INDEX_BASE_ZERO, CUSPARSE_CSR2CSC_ALG_DEFAULT,
81 &buffer_size
82 ) );
83 return buffer_size;
84}
85
86// suppose buffer already been allocated
87template <typename T>

Callers 1

CSR2CSCFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected