mirror of
https://github.com/boostorg/compute.git
synced 2026-01-21 04:42:41 +00:00
Add device::platform() method
This commit is contained in:
@@ -30,10 +30,9 @@ int main()
|
||||
compute::device device = compute::system::default_device();
|
||||
compute::context context(device);
|
||||
compute::command_queue queue(context, device);
|
||||
compute::platform platform(device.get_info<CL_DEVICE_PLATFORM>());
|
||||
|
||||
// check the platform vendor string
|
||||
if(platform.vendor() != "Advanced Micro Devices, Inc."){
|
||||
if(device.platform().vendor() != "Advanced Micro Devices, Inc."){
|
||||
std::cerr << "error: static C++ kernel language is only "
|
||||
<< "supported on AMD devices."
|
||||
<< std::endl;
|
||||
|
||||
Reference in New Issue
Block a user