MCPcopy Create free account
hub / github.com/boostorg/compute / get_devices

Method get_devices

include/boost/compute/program.hpp:182–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 }
181
182 std::vector<device> get_devices() const
183 {
184 std::vector<cl_device_id> device_ids =
185 get_info<std::vector<cl_device_id> >(CL_PROGRAM_DEVICES);
186
187 std::vector<device> devices;
188 for(size_t i = 0; i < device_ids.size(); i++){
189 devices.push_back(device(device_ids[i]));
190 }
191
192 return devices;
193 }
194
195 /// Returns the context for the program.
196 context get_context() const

Callers

nothing calls this directly

Calls 3

deviceClass · 0.85
push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected