MCPcopy Create free account
hub / github.com/apache/arrow / CheckDeviceNum

Method CheckDeviceNum

cpp/src/arrow/gpu/cuda_context.cc:573–580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571 int num_devices() const { return num_devices_; }
572
573 Status CheckDeviceNum(int device_number) const {
574 if (device_number < 0 || device_number >= num_devices_) {
575 return Status::Invalid("Invalid Cuda device number ", device_number,
576 " (should be between 0 and ", num_devices_ - 1,
577 ", inclusive)");
578 }
579 return Status::OK();
580 }
581
582 protected:
583 Result<std::shared_ptr<CudaDevice>> MakeDevice(int device_number) {

Callers

nothing calls this directly

Calls 2

InvalidFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected