diff options
author | Francisco Jerez <[email protected]> | 2013-09-16 21:11:16 -0700 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2013-10-21 10:47:03 -0700 |
commit | 369419f761f26dffd61fd614e5e28bb4cd02e867 (patch) | |
tree | 8d8387eea481b971e9a6aec88addbfcf143d4fcd /src/gallium/state_trackers/clover/api | |
parent | c6e7a0d0d38d415a515f1e2ddcce5583d73d2937 (diff) |
clover: Define a few convenience equality operators.
Tested-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r-- | src/gallium/state_trackers/clover/api/device.cpp | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/api/event.cpp | 4 | ||||
-rw-r--r-- | src/gallium/state_trackers/clover/api/kernel.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/state_trackers/clover/api/device.cpp b/src/gallium/state_trackers/clover/api/device.cpp index 7e99f740684..dd7ef408f22 100644 --- a/src/gallium/state_trackers/clover/api/device.cpp +++ b/src/gallium/state_trackers/clover/api/device.cpp @@ -40,7 +40,7 @@ clGetDeviceIDs(cl_platform_id d_platform, cl_device_type device_type, // Collect matching devices for (device &dev : platform) { if (((device_type & CL_DEVICE_TYPE_DEFAULT) && - &dev == &platform.front()) || + dev == platform.front()) || (device_type & dev.type())) d_devs.push_back(desc(dev)); } diff --git a/src/gallium/state_trackers/clover/api/event.cpp b/src/gallium/state_trackers/clover/api/event.cpp index 1395c54db08..4ed96b06313 100644 --- a/src/gallium/state_trackers/clover/api/event.cpp +++ b/src/gallium/state_trackers/clover/api/event.cpp @@ -63,7 +63,7 @@ clWaitForEvents(cl_uint num_evs, const cl_event *d_evs) try { auto evs = objs(d_evs, num_evs); for (auto &ev : evs) { - if (&ev.ctx != &evs.front().ctx) + if (ev.ctx != evs.front().ctx) throw error(CL_INVALID_CONTEXT); if (ev.status() < 0) @@ -199,7 +199,7 @@ clEnqueueWaitForEvents(cl_command_queue d_q, cl_uint num_evs, auto evs = objs(d_evs, num_evs); for (auto &ev : evs) { - if (&ev.ctx != &q.ctx) + if (ev.ctx != q.ctx) throw error(CL_INVALID_CONTEXT); } diff --git a/src/gallium/state_trackers/clover/api/kernel.cpp b/src/gallium/state_trackers/clover/api/kernel.cpp index 15b4c14e1d9..dd742c3bb05 100644 --- a/src/gallium/state_trackers/clover/api/kernel.cpp +++ b/src/gallium/state_trackers/clover/api/kernel.cpp @@ -202,9 +202,9 @@ namespace { void validate_common(command_queue &q, kernel &kern, const ref_vector<event> &deps) { - if (&kern.prog.ctx != &q.ctx || + if (kern.prog.ctx != q.ctx || any_of([&](const event &ev) { - return &ev.ctx != &q.ctx; + return ev.ctx != q.ctx; }, deps)) throw error(CL_INVALID_CONTEXT); |