[][src]Struct open_cl_low_level::command_queue::ClCommandQueue

pub struct ClCommandQueue { /* fields omitted */ }

Methods

impl ClCommandQueue[src]

pub unsafe fn new(cq: cl_command_queue) -> Output<ClCommandQueue>[src]

Builds a ClCommandQueue after checking for null-pointer.

pub unsafe fn unchecked_new(object: cl_command_queue) -> ClCommandQueue[src]

Builds a ClCommandQueue without checking for null-pointer.

pub unsafe fn retain_new(cq: cl_command_queue) -> Output<ClCommandQueue>[src]

After checking for null-pointer and retaining the cl_command_queue builds a ClCommandQueue.

Safety

Calling this function with a cl_command_queue in an invalid state is undefined behavior.

pub unsafe fn create(
    context: &ClContext,
    device: &ClDeviceID,
    opt_props: Option<CommandQueueProperties>
) -> Output<ClCommandQueue>
[src]

Create a new ClCommandQueue in the given ClContext on the given ClDeviceID with the given CommandQueueProperties (optional).

Safety

Calling this function with an invalid ClContext or ClDeviceID is undefined behavior.

pub unsafe fn create_from_raw_pointers(
    context: cl_context,
    device: cl_device_id,
    props: cl_command_queue_properties
) -> Output<ClCommandQueue>
[src]

Creates a ClCommandQueue from raw ClObject pointers.

Safety

Passing an invalid ClObject is undefined behavior.

pub unsafe fn create_copy(&self) -> Output<ClCommandQueue>[src]

Creates a copy of a ClCommandQueue. The copy is, in fact, a completely differnt ClCommandQueue that has the same cl_context and cl_device_id as the original.

Safety

Calling this function on an invalid ClCommandQueue is undefined behavior.

pub unsafe fn write_buffer<'a, T: ClNumber, H: Into<VecOrSlice<'a, T>>>(
    &mut self,
    mem: &mut ClMem<T>,
    host_buffer: H,
    opts: Option<CommandQueueOptions>
) -> Output<ClEvent>
[src]

write_buffer is used to move data from the host buffer (buffer: &[T]) to the mutable OpenCL cl_mem pointer.

pub unsafe fn read_buffer<'a, T: ClNumber, H: Into<MutVecOrSlice<'a, T>>>(
    &mut self,
    mem: &ClMem<T>,
    host_buffer: H,
    opts: Option<CommandQueueOptions>
) -> Output<BufferReadEvent<T>>
[src]

Copies data from a ClMem buffer to a &mut [T] or mut Vec.

pub unsafe fn enqueue_kernel(
    &mut self,
    kernel: &mut ClKernel,
    work: &Work,
    opts: Option<CommandQueueOptions>
) -> Output<ClEvent>
[src]

Enqueues a ClKernel onto a the ClCommandQueue.

Safety

Usage of invalid ClObjects is undefined behavior.

pub unsafe fn finish(&mut self) -> Output<()>[src]

Trait Implementations

impl CommandQueuePtr for ClCommandQueue[src]

unsafe fn command_queue_ptr(&self) -> cl_command_queue[src]

The ffi-usable cl_command_queue pointer.

Safety

Usage of invalid ClObjects is undefined behavior.

impl Debug for ClCommandQueue[src]

Clone is highly unsafe without ensuring Sync and Send

impl Drop for ClCommandQueue[src]

fn drop(&mut self)[src]

Drops the ClCommandQueue by releasing and thereby decrementing the reference count of the cl_command_queue.

impl Eq for ClCommandQueue[src]

impl PartialEq<ClCommandQueue> for ClCommandQueue[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.