pub struct Event { /* private fields */ }
Expand description
An OpenCL event object.
Has methods to return information from calls to clGetEventInfo and
clGetEventProfilingInfo with the appropriate parameters.
Implements the Drop trait to call release_event when the object is dropped.
Implementations§
source§impl Event
impl Event
sourcepub fn new(event: cl_event) -> Self
pub fn new(event: cl_event) -> Self
Create an Event from an OpenCL cl_event.
event
- a valid OpenCL cl_event.
returns the new Event
pub fn command_execution_status(&self) -> Result<CommandExecutionStatus>
pub fn command_type(&self) -> Result<EventCommandType>
pub fn reference_count(&self) -> Result<cl_uint>
pub fn command_queue(&self) -> Result<cl_command_queue>
pub fn context(&self) -> Result<cl_context>
sourcepub fn get_data(&self, param_name: cl_event_info) -> Result<Vec<u8>>
pub fn get_data(&self, param_name: cl_event_info) -> Result<Vec<u8>>
Get data about an OpenCL event. Calls clGetEventInfo to get the desired data about the event.
pub fn set_callback( &self, command_exec_callback_type: cl_int, pfn_notify: extern "C" fn(_: cl_event, _: cl_int, _: *mut c_void), user_data: *mut c_void ) -> Result<()>
pub fn profiling_command_queued(&self) -> Result<cl_ulong>
pub fn profiling_command_submit(&self) -> Result<cl_ulong>
pub fn profiling_command_start(&self) -> Result<cl_ulong>
pub fn profiling_command_end(&self) -> Result<cl_ulong>
sourcepub fn profiling_command_complete(&self) -> Result<cl_ulong>
pub fn profiling_command_complete(&self) -> Result<cl_ulong>
CL_VERSION_2_0
sourcepub fn profiling_data(&self, param_name: cl_profiling_info) -> Result<Vec<u8>>
pub fn profiling_data(&self, param_name: cl_profiling_info) -> Result<Vec<u8>>
Get profiling data about an OpenCL event. Calls clGetEventProfilingInfo to get the desired profiling data about the event.
Trait Implementations§
impl Send for Event
impl Sync for Event
Auto Trait Implementations§
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more