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

Method set_gpu_id

XM/include/Utils/memory.h:57–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55 DeviceBlasHandle(const size_s gpu_id): gpu_id(gpu_id), cublas_handle(NULL) {}
56
57 inline void set_gpu_id(const size_s gpu_id) {
58 this->gpu_id = gpu_id;
59 return;
60 }
61 inline void activate() {
62 CHECK_CUDA( cudaSetDevice(this->gpu_id) );
63 CHECK_CUBLAS( cublasCreate_v2(&this->cublas_handle) );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected