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

Method set_gpu_id

XM/include/Utils/memory.h:162–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 DeviceSparseHandle(const size_s gpu_id): gpu_id(gpu_id), cusparse_handle(NULL) {}
161
162 inline void set_gpu_id(const size_s gpu_id) {
163 this->gpu_id = gpu_id;
164 return;
165 }
166 inline void activate() {
167 CHECK_CUDA( cudaSetDevice(this->gpu_id) );
168 CHECK_CUSPARSE( cusparseCreate(&this->cusparse_handle) );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected