[−][src]Struct open_cl_low_level::kernel::ClKernel
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]
&mut self,
arg_index: usize,
arg: &mut T
) -> Output<()>
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]
unsafe fn kernel_ptr(&self) -> cl_kernel
[src]
unsafe fn info<T: Copy>(&self, flag: KernelInfo) -> Output<ClPointer<T>>
[src]
unsafe fn function_name(&self) -> Output<String>
[src]
unsafe fn num_args(&self) -> Output<u32>
[src]
unsafe fn reference_count(&self) -> Output<u32>
[src]
unsafe fn context(&self) -> Output<ClContext>
[src]
unsafe fn program(&self) -> Output<ClProgram>
[src]
unsafe fn attributes(&self) -> Output<String>
[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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,