| 86 | // suppose buffer already been allocated |
| 87 | template <typename T> |
| 88 | inline void CSR2CSC( |
| 89 | DeviceSparseHandle& cusparse_H, |
| 90 | const DeviceSpMatCSR<T>& mat_csr, DeviceSpMatCSC<T>& mat_csc |
| 91 | ) { |
| 92 | size_t buffer_size = CSR2CSC_get_buffersize(cusparse_H, mat_csr, mat_csc); |
| 93 | void* buffer; |
| 94 | CHECK_CUDA( cudaMalloc(&buffer, buffer_size) ); |
| 95 | CHECK_CUSPARSE( cusparseCsr2cscEx2( |
| 96 | cusparse_H.cusparse_handle, |
| 97 | mat_csr.row_size, mat_csr.col_size, mat_csr.nnz, |
| 98 | mat_csr.vals, mat_csr.row_ptrs, mat_csr.col_ids, |
| 99 | mat_csc.vals, mat_csc.col_ptrs, mat_csc.row_ids, |
| 100 | CudaTypeMapper<T>::value, CUSPARSE_ACTION_NUMERIC, CUSPARSE_INDEX_BASE_ZERO, CUSPARSE_CSR2CSC_ALG_DEFAULT, |
| 101 | buffer |
| 102 | ) ); |
| 103 | return; |
| 104 | } |
| 105 | |
| 106 | |
| 107 |
nothing calls this directly
no test coverage detected