2
0
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:
Kyle Lutz
2014-12-13 11:25:11 -08:00
parent a29f453687
commit 2bab2c5ee7
8 changed files with 26 additions and 20 deletions

View File

@@ -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;