[−][src]Trait opencl_core::Waitlist
The low level trait for synchronously waiting for events.
Safety
Due to multiple dangerous memory safety concerns with using events this trait and it's functions are all unsafe. Mismanagement of the reference count, lifetime, context, or resuse of an event is undefined behavior.
Required methods
unsafe fn fill_waitlist(&self, wl: &mut Vec<*mut _cl_event>)
Copies the waitlist's (self) events into the passed mutable vector.
Safety
Due to the movement of cl_event from one container to another, this function is unsafe failure to correctly track reference counts of cl_event objects can lead to memory leaks and/or segfaults.
Note: When the vec that the events are given to Drops these events will not be released.
unsafe fn new_waitlist(&self) -> Vec<*mut _cl_event>
Consumes the waitlist into a vector of cl_events.
Safety
Due to the movement of cl_event from one container to another, this function is unsafe failure to correctly track reference counts of cl_event objects can lead to memory leaks and/or segfaults.
Note: When the vec that the events are given to Drops these events will not be released.
Provided methods
unsafe fn wait(self) -> Result<(), Error>
Synchronously waits (blocks the thread) until all events in the waitlist are complete.
Safety
Due to call to OpenCL's FFI with raw pointer (or Vec of raw pointers) this call will cause undefined behavior if any of the events is not in correct state, if the context of the events has been freed, if any of the events is a null pointer, if the queue the event was created with is freed, and a plethora of other conditions.
Note: When the vec that the events are given to Drops these events will not be released.
Implementations on Foreign Types
impl<'_> Waitlist for &'_ [ObjectWrapper<*mut _cl_event>]
[src]
unsafe fn fill_waitlist(&self, wait_list: &mut Vec<*mut _cl_event>)
[src]
unsafe fn new_waitlist(&self) -> Vec<*mut _cl_event>
[src]
impl<'_> Waitlist for &'_ ObjectWrapper<*mut _cl_event>
[src]
unsafe fn fill_waitlist(&self, wait_list: &mut Vec<*mut _cl_event>)
[src]
unsafe fn new_waitlist(&self) -> Vec<*mut _cl_event>
[src]
impl<W> Waitlist for Option<W> where
W: Waitlist,
[src]
W: Waitlist,
unsafe fn fill_waitlist(&self, wait_list: &mut Vec<*mut _cl_event>)
[src]
unsafe fn new_waitlist(&self) -> Vec<*mut _cl_event>
[src]
impl<'_> Waitlist for &'_ [*mut _cl_event]
[src]
unsafe fn fill_waitlist(&self, wait_list: &mut Vec<*mut _cl_event>)
[src]
unsafe fn new_waitlist(&self) -> Vec<*mut _cl_event>
[src]
Implementors
impl Waitlist for CommandQueueOptions
[src]
unsafe fn fill_waitlist(&self, waitlist: &mut Vec<*mut _cl_event>)
[src]
Fill waitlist extends the waitlist from the CommandQueueOptions' waitlist.
unsafe fn new_waitlist(&self) -> Vec<*mut _cl_event>
[src]
Creates a waitlist Vec<cl_event> for using in OpenCL FFI.