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

Method ~DeviceDnTen

XM/include/Utils/memory.h:478–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected