[][src]Struct fil_ocl_core::types::abs::Kernel

#[repr(C)]
pub struct Kernel(_);

cl_kernel

Thread Safety

Currently not thread safe: does not implement Send or Sync. It's probably possible to implement one or both with some work but it's potentially problematic on certain (all?) platforms due to issues while setting arguments. If you need to transfer a kernel you're better off creating another one in the other thread or using some other mechanism such as channels to manipulate kernels in other threads. This issue will be revisited in the future (please provide input by filing an issue if you have any thoughts on the matter).

[UPDATE]: Enabling Send for a while to test.

Methods

impl Kernel[src]

pub unsafe fn from_raw_create_ptr(ptr: cl_kernel) -> Kernel[src]

Only call this when passing the original newly created pointer directly from clCreate.... Do not use this to clone or copy.

pub unsafe fn from_raw_copied_ptr(ptr: cl_kernel) -> Kernel[src]

Only call this when passing a copied pointer such as from an clGet*****Info function.

pub fn as_ptr(&self) -> cl_kernel[src]

Returns a pointer, do not store it.

pub fn program(&self) -> OclCoreResult<Program>[src]

Returns the program associated with this kernel.

pub fn devices(&self) -> OclCoreResult<Vec<DeviceId>>[src]

Trait Implementations

impl ClVersions for Kernel[src]

impl Send for Kernel[src]

impl Drop for Kernel[src]

impl Clone for Kernel[src]

impl Debug for Kernel[src]

Auto Trait Implementations

impl !Sync for Kernel

impl Unpin for Kernel

impl UnwindSafe for Kernel

impl RefUnwindSafe for Kernel

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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