| 555 | } |
| 556 | |
| 557 | ~DeviceSpMatCSC() { |
| 558 | CHECK_CUDA( cudaSetDevice(this->gpu_id) ); |
| 559 | if (this->col_ptrs != nullptr) { |
| 560 | CHECK_CUDA( cudaFree(this->col_ptrs) ); |
| 561 | this->col_ptrs = nullptr; |
| 562 | } |
| 563 | if (this->row_ids != nullptr) { |
| 564 | CHECK_CUDA( cudaFree(this->row_ids) ); |
| 565 | this->row_ids = nullptr; |
| 566 | } |
| 567 | if (this->vals != nullptr) { |
| 568 | CHECK_CUDA( cudaFree(this->vals) ); |
| 569 | this->vals = nullptr; |
| 570 | } |
| 571 | if (this->cusparse_descr != NULL) { |
| 572 | CHECK_CUSPARSE( cusparseDestroySpMat(this->cusparse_descr) ); |
| 573 | this->cusparse_descr = NULL; |
| 574 | } |
| 575 | // std::cout << "DeviceSpMatDoubleCSC destructor called!" << std::endl; |
| 576 | } |
| 577 | }; |
| 578 | |
| 579 | //sparse matrix wrapper on device: CSC format |
nothing calls this directly
no outgoing calls
no test coverage detected