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

Method ~DeviceSpMatCOO

XM/include/Utils/memory.h:728–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

726 }
727
728 ~DeviceSpMatCOO() {
729 CHECK_CUDA( cudaSetDevice(this->gpu_id) );
730 if (this->col_ids != nullptr) {
731 CHECK_CUDA( cudaFree(this->col_ids) );
732 this->col_ids = nullptr;
733 }
734 if (this->row_ids != nullptr) {
735 CHECK_CUDA( cudaFree(this->row_ids) );
736 this->row_ids = nullptr;
737 }
738 if (this->vals != nullptr) {
739 CHECK_CUDA( cudaFree(this->vals) );
740 this->vals = nullptr;
741 }
742 if (this->cusparse_descr != NULL) {
743 CHECK_CUSPARSE( cusparseDestroySpMat(this->cusparse_descr) );
744 this->cusparse_descr = NULL;
745 }
746 // std::cout << "DeviceSpMatDoubleCSC destructor called!" << std::endl;
747 }
748};
749
750

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected