-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patha.cpp
More file actions
31 lines (24 loc) · 755 Bytes
/
Copy patha.cpp
File metadata and controls
31 lines (24 loc) · 755 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <boost/compute.hpp>
namespace compute = boost::compute;
namespace boost {
namespace compute {
void print_device(const device& device) {
std::cout << device.name() << std::endl;
}
}
}
int main()
{
// get the default device
compute::device device = compute::system::default_device();
// print the device's name
std::cout << "hello from device : " << device.name() << " , and vendor : " << device.vendor() << std::endl;
std::cout << "profile : " << device.profile() << std::endl;
compute::print_device(device);
// platform
for(const auto &platform : boost::compute::system::platforms()){
std::cout << "platform name : " << platform.name() << std::endl;
}
return 0;
}