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

Method set_gpu_id

XM/include/Utils/memory.h:29–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27 DeviceStream(const size_s gpu_id): gpu_id(gpu_id), stream(NULL) {}
28
29 inline void set_gpu_id(const size_s gpu_id) {
30 this->gpu_id = gpu_id;
31 return;
32 }
33 inline void activate() {
34 CHECK_CUDA( cudaSetDevice(this->gpu_id) );
35 CHECK_CUDA( cudaStreamCreateWithFlags(&this->stream, cudaStreamNonBlocking) );

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected