Struct opencl3::event::Event

source ·
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

source

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

source

pub fn get(&self) -> cl_event

Get the underlying OpenCL cl_event.

source

pub fn wait(&self) -> Result<()>

Wait for the event to complete.

source

pub fn command_execution_status(&self) -> Result<CommandExecutionStatus>

source

pub fn command_type(&self) -> Result<EventCommandType>

source

pub fn reference_count(&self) -> Result<cl_uint>

source

pub fn command_queue(&self) -> Result<cl_command_queue>

source

pub fn context(&self) -> Result<cl_context>

source

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.

source

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<()>

source

pub fn profiling_command_queued(&self) -> Result<cl_ulong>

source

pub fn profiling_command_submit(&self) -> Result<cl_ulong>

source

pub fn profiling_command_start(&self) -> Result<cl_ulong>

source

pub fn profiling_command_end(&self) -> Result<cl_ulong>

source

pub fn profiling_command_complete(&self) -> Result<cl_ulong>

CL_VERSION_2_0

source

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§

source§

impl Debug for Event

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Event

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<*mut c_void> for Event

source§

fn from(event: cl_event) -> Self

Converts to this type from the input type.
source§

impl From<Event> for cl_event

source§

fn from(value: Event) -> Self

Converts to this type from the input type.
source§

impl Send for Event

source§

impl Sync for Event

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.