diff options
author | Francisco Jerez <[email protected]> | 2014-02-18 13:16:19 +0100 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2014-02-21 12:51:22 +0100 |
commit | 9ae0bd3829a34d4239521d9c7838089395c2336c (patch) | |
tree | 2cbac7b2a4ceed8a186e3210aa694d458e53d42d /src/gallium/state_trackers/clover/api | |
parent | 198cd136b94b2ddfb8e2d50e567f3e391eb93915 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api')
-rw-r--r-- | src/gallium/state_trackers/clover/api/event.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<soft_event> sev = + intrusive_ptr<soft_event> 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<soft_event> sev = transfer( + intrusive_ptr<soft_event> 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<hard_event> hev = transfer(new hard_event(q, 0, evs)); + intrusive_ptr<hard_event> 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<hard_event> hev = transfer(new hard_event(q, 0, { })); + intrusive_ptr<hard_event> hev = transfer(new hard_event(q, 0, { })); // And wait on it. hev->wait(); |