MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / DeviceIndexResolver

Class DeviceIndexResolver

python/cpp/utils.h:51–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49 };
50
51 class DeviceIndexResolver {
52 public:
53 std::vector<int> operator()(int device_index) const {
54 return {device_index};
55 }
56
57 std::vector<int> operator()(const std::vector<int>& device_index) const {
58 return device_index;
59 }
60 };
61
62 template <typename T>
63 class AsyncResult {

Callers 1

ReplicaPoolHelperMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected