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

Method ~DeviceSpMatCSC

XM/include/Utils/memory.h:557–576  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected