| 476 | } |
| 477 | |
| 478 | ~DeviceDnTen() { |
| 479 | CHECK_CUDA(cudaSetDevice(this->gpu_id)); |
| 480 | if (this->vals != nullptr) { |
| 481 | CHECK_CUDA(cudaFree(this->vals)); |
| 482 | this->vals = nullptr; |
| 483 | } |
| 484 | if (this->cusparse_descr != NULL) { |
| 485 | CHECK_CUSPARSE(cusparseDestroyDnVec(this->cusparse_descr)); |
| 486 | this->cusparse_descr = NULL; |
| 487 | } |
| 488 | if (this->cusparse_descr_mat != NULL) { |
| 489 | CHECK_CUSPARSE(cusparseDestroyDnMat(this->cusparse_descr_mat)); |
| 490 | this->cusparse_descr_mat = NULL; |
| 491 | } |
| 492 | if (dimensions != nullptr) { |
| 493 | free(dimensions); |
| 494 | dimensions = nullptr; |
| 495 | } |
| 496 | if (vals_host != nullptr) { |
| 497 | free(vals_host); |
| 498 | vals_host = nullptr; |
| 499 | } |
| 500 | |
| 501 | } |
| 502 | }; |
| 503 | |
| 504 | //sparse matrix wrapper on device: CSC format |
nothing calls this directly
no outgoing calls
no test coverage detected