diff options
author | Francisco Jerez <[email protected]> | 2013-09-16 18:26:04 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2013-10-21 10:47:02 -0700 |
commit | 49a49e0742dde4aa6d0c870d795a480425e85f52 (patch) | |
tree | f3ff522988d409e697910a62b97916941ec85164 /src/gallium/state_trackers/clover/api/device.cpp | |
parent | bff60c894a290260ab3dd2086445b44622a2800e (diff) |
clover: Switch platform objects to the new model.
Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api/device.cpp')
-rw-r--r-- | src/gallium/state_trackers/clover/api/device.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 495ac41f17e..9800779e81a 100644 --- a/src/gallium/state_trackers/clover/api/device.cpp +++ b/src/gallium/state_trackers/clover/api/device.cpp @@ -27,9 +27,10 @@ using namespace clover; PUBLIC cl_int -clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type, +clGetDeviceIDs(cl_platform_id d_platform, cl_device_type device_type, cl_uint num_entries, cl_device_id *devices, cl_uint *num_devices) { + auto &platform = obj(d_platform); std::vector<cl_device_id> devs; if ((!num_entries && devices) || @@ -37,9 +38,9 @@ clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type, return CL_INVALID_VALUE; // Collect matching devices - for (device &dev : *platform) { + for (device &dev : platform) { if (((device_type & CL_DEVICE_TYPE_DEFAULT) && - &dev == &platform->front()) || + &dev == &platform.front()) || (device_type & dev.type())) devs.push_back(&dev); } @@ -254,7 +255,7 @@ clGetDeviceInfo(cl_device_id dev, cl_device_info param, break; case CL_DEVICE_PLATFORM: - buf.as_scalar<cl_platform_id>() = &dev->platform; + buf.as_scalar<cl_platform_id>() = desc(dev->platform); break; case CL_DEVICE_HOST_UNIFIED_MEMORY: |