8 using boost::compute::device;
9 if (name ==
"BESTCPU") {
11 [](device
const& d) {
return d.type() & device::cpu; },
"CPU");
13 if (name ==
"BESTGPU") {
15 [](device
const& d) {
return d.type() & device::gpu; },
"GPU");
17 if (name ==
"" or name ==
"SYSTEM:DEFAULT") {
18 return boost::compute::system::default_device();
20 return boost::compute::system::find_device(name);
26 if (device.name().substr(0, 8) ==
"AMD SUMO" and cfg.
device_name() ==
"") {
Configure the OpenCL device / context options.
boost::compute::device device_selector(config const &cfg)
Select an OpenCL device matching the current configuration.
boost::compute::device best_device(Filter filter, char const *filter_name)
Return the best available device of the given type.
std::string device_name(JB_DEFAULT_device_name)
jb::config_attribute< config, std::string > device_name