From 9ae0bd3829a34d4239521d9c7838089395c2336c Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Tue, 18 Feb 2014 13:16:19 +0100 Subject: clover: Some improvements for the intrusive pointer class. Define some additional convenience operators, clean up the implementation slightly, and rename it to 'intrusive_ptr' for reasons that will be obvious in the next commit. Tested-by: Tom Stellard --- src/gallium/state_trackers/clover/api/event.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gallium/state_trackers/clover/api') diff --git a/src/gallium/state_trackers/clover/api/event.cpp b/src/gallium/state_trackers/clover/api/event.cpp index 1aff2c50238..05534c74c99 100644 --- a/src/gallium/state_trackers/clover/api/event.cpp +++ b/src/gallium/state_trackers/clover/api/event.cpp @@ -72,7 +72,7 @@ clWaitForEvents(cl_uint num_evs, const cl_event *d_evs) try { // Create a temporary soft event that depends on all the events in // the wait list - ref_ptr sev = + intrusive_ptr sev = transfer(new soft_event(evs.front().ctx, evs, true)); // ...and wait on it. @@ -132,7 +132,7 @@ clSetEventCallback(cl_event d_ev, cl_int type, // Create a temporary soft event that depends on ev, with // pfn_notify as completion action. - ref_ptr sev = transfer( + intrusive_ptr sev = transfer( new soft_event(ev.ctx, { ev }, true, [=, &ev](event &) { ev.wait(); @@ -206,7 +206,7 @@ clEnqueueWaitForEvents(cl_command_queue d_q, cl_uint num_evs, // Create a hard event that depends on the events in the wait list: // subsequent commands in the same queue will be implicitly // serialized with respect to it -- hard events always are. - ref_ptr hev = transfer(new hard_event(q, 0, evs)); + intrusive_ptr hev = transfer(new hard_event(q, 0, evs)); return CL_SUCCESS; @@ -262,7 +262,7 @@ clFinish(cl_command_queue d_q) try { // Create a temporary hard event -- it implicitly depends on all // the previously queued hard events. - ref_ptr hev = transfer(new hard_event(q, 0, { })); + intrusive_ptr hev = transfer(new hard_event(q, 0, { })); // And wait on it. hev->wait(); -- cgit v1.2.3