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

Method GetMapper

cpp/src/arrow/device.cc:314–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312 }
313
314 Result<DeviceMapper> GetMapper(DeviceAllocationType device_type) {
315 std::lock_guard<std::mutex> lock(lock_);
316 auto it = registry_.find(device_type);
317 if (it == registry_.end()) {
318 return Status::KeyError("Device type ", static_cast<int>(device_type),
319 "is not registered");
320 }
321 return it->second;
322 }
323
324 private:
325 std::mutex lock_;

Callers 1

GetDeviceMapperFunction · 0.80

Calls 3

KeyErrorFunction · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected