[][src]Struct open_cl_low_level::kernel::ClKernel

pub struct ClKernel { /* fields omitted */ }

ClKernel is a low-level object wrapper for cl_kernel. ClKernel implements Drop that utilizes clRetainKernel and Clone that utilizes clReleaseKernel.

Safety

Using ClKernel in an invalid state is undefined behavior.

Lifetime Dependencies

ClKernel depends on cl_program and, by proxy, cl_context.

Methods

impl ClKernel[src]

pub unsafe fn new(object: cl_kernel) -> Output<ClKernel>[src]

Creates a ClKernel after checking that the cl_kernel is a non-null pointer.

Safety

Providing a non-null pointer will return an Err Result, but providing an invalid cl_kernel is not safe.

pub unsafe fn unchecked_new(object: cl_kernel) -> ClKernel[src]

Creates a ClKernel without checking that the cl_kernel is a null pointer.

Safety

Providing a null pointer or an otherwise invalid cl_kernel is not safe.

pub unsafe fn create(program: &ClProgram, name: &str) -> Output<ClKernel>[src]

Creates a wrapped cl_kernel object.

Safety

Calling this function with an invalid ClProgram is undefined behavior.

pub unsafe fn set_arg<T: KernelArg>(
    &mut self,
    arg_index: usize,
    arg: &mut T
) -> Output<()>
[src]

Set adds and arg to a kernel at a given index.

Safety

Calling this function on invalid kernel or with invalid arg is undefined behavior.

Trait Implementations

impl Clone for ClKernel[src]

impl Drop for ClKernel[src]

impl KernelPtr for ClKernel[src]

Auto Trait Implementations

impl RefUnwindSafe for ClKernel

impl !Send for ClKernel

impl !Sync for ClKernel

impl Unpin for ClKernel

impl UnwindSafe for ClKernel

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.