MCPcopy Create free account
hub / github.com/apache/singa / GetDefaultDevice

Method GetDefaultDevice

include/singa/core/device.h:314–318  ·  view source on GitHub ↗

Return the default host device

Source from the content-addressed store, hash-verified

312 public:
313 /// Return the default host device
314 static std::shared_ptr<Device> GetDefaultDevice() {
315 // cannot reset cpu device, which leads to error
316 // defaultDevice->Reset();
317 return defaultDevice;
318 }
319
320#ifdef USE_CUDA
321 /// Return the number of total available GPUs

Callers 2

create_cpu_deviceFunction · 0.80
device.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected