Struct ocl::EventList [] [src]

pub struct EventList { /* fields omitted */ }

A list of events for coordinating enqueued commands.

Events contain status information about the command that created them. Used to coordinate the activity of multiple commands with more fine-grained control than the queue alone.

For access to individual events use get_clone and last_clone then either store or discard the result.

Methods

impl EventList
[src]

Returns a new, empty, EventList.

Adds an event to the list.

Removes the last event from the list and returns it.

Returns a new copy of an event by index.

Returns a copy of the last event in the list.

Sets a callback function, callback_receiver, to trigger upon completion of the last event added to the event list with an optional reference to user data.

Safety

user_data must be guaranteed to still exist if and when callback_receiver is ever called.

TODO: Create a safer type wrapper for callback_receiver. TODO: Move this method to Event.

Returns the number of events in the list.

Returns if there is no events.

Waits for all events in list to complete.

Methods from Deref<Target=EventListCore>

Pushes a new event onto the list.

Technically, copies event's contained pointer (a cl_event) then mem::forgets it. This seems preferrable to incrementing the reference count (with functions::retain_event) then letting event drop which just decrements it right back.

Removes the last event from the list and returns it.

Appends a new null element to the end of the list and returns a reference to it.

Returns an immutable reference to a pointer, do not deref and store it unless you will manage its associated reference count carefully.

Clones an event by index.

Clones the last event.

Clears each completed event from the list.

TODO: TEST THIS

Trait Implementations

impl Debug for EventList
[src]

Formats the value using the given formatter.

impl Clone for EventList
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl AsRef<EventListCore> for EventList
[src]

Performs the conversion.

impl Deref for EventList
[src]

The resulting type after dereferencing

The method called to dereference a value

impl DerefMut for EventList
[src]

The method called to mutably dereference a value

impl ClEventPtrNew for EventList
[src]

impl<'a> ClEventPtrNew for &'a mut EventList
[src]

impl ClWaitList for EventList
[src]