@@ -88,14 +88,14 @@ class system
88
88
// / \throws no_device_found if no device with \p name is found.
89
89
static device find_device (const std::string &device_name = std::string(),
90
90
const std::string &platform_name = std::string(),
91
- device::type device_type = device::all,
91
+ device::device_type device_type = device::all,
92
92
uint_ min_version = 100)
93
93
{
94
94
BOOST_FOREACH (const device &device, devices ()){
95
95
std::string platform_name_ = device.platform ().name ();
96
96
if ((platform_name.empty () || platform_name_.find (platform_name.c_str ()) != std::string::npos)
97
97
&& (device_name.empty () || device.name ().find (device_name.c_str ()) != std::string::npos)
98
- && (device.get_type () & device_type)
98
+ && (device.type () & device_type)
99
99
&& device.get_version () >= min_version){
100
100
return device;
101
101
}
@@ -229,11 +229,11 @@ class system
229
229
continue ;
230
230
231
231
if (type && matches (std::string (" GPU" ), type))
232
- if (device.get_type () != device::gpu)
232
+ if (device.type () != device::gpu)
233
233
continue ;
234
234
235
235
if (type && matches (std::string (" CPU" ), type))
236
- if (device.get_type () != device::cpu)
236
+ if (device.type () != device::cpu)
237
237
continue ;
238
238
239
239
if (platform && !matches (device.platform ().name (), platform))
@@ -248,14 +248,14 @@ class system
248
248
249
249
// find the first gpu device
250
250
BOOST_FOREACH (const device &device, devices_){
251
- if (device.get_type () == device::gpu){
251
+ if (device.type () == device::gpu){
252
252
return device;
253
253
}
254
254
}
255
255
256
256
// find the first cpu device
257
257
BOOST_FOREACH (const device &device, devices_){
258
- if (device.get_type () == device::cpu){
258
+ if (device.type () == device::cpu){
259
259
return device;
260
260
}
261
261
}
0 commit comments