Struct ocl_core::types::abs::Kernel [−][src]
#[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]
impl Kernel
pub unsafe fn from_raw_create_ptr(ptr: cl_kernel) -> Kernel
[src]
pub unsafe fn from_raw_create_ptr(ptr: cl_kernel) -> Kernel
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]
pub unsafe fn from_raw_copied_ptr(ptr: cl_kernel) -> Kernel
Only call this when passing a copied pointer such as from an
clGet*****Info
function.
pub fn as_ptr(&self) -> cl_kernel
[src]
pub fn as_ptr(&self) -> cl_kernel
Returns a pointer, do not store it.
pub fn program(&self) -> OclCoreResult<Program>
[src]
pub fn program(&self) -> OclCoreResult<Program>
Returns the program associated with this kernel.
pub fn devices(&self) -> OclCoreResult<Vec<DeviceId>>
[src]
pub fn devices(&self) -> OclCoreResult<Vec<DeviceId>>
Trait Implementations
impl Debug for Kernel
[src]
impl Debug for Kernel
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Kernel
[src]
impl Clone for Kernel
fn clone(&self) -> Kernel
[src]
fn clone(&self) -> Kernel
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Drop for Kernel
[src]
impl Drop for Kernel
impl ClVersions for Kernel
[src]
impl ClVersions for Kernel
fn device_versions(&self) -> OclCoreResult<Vec<OpenclVersion>>
[src]
fn device_versions(&self) -> OclCoreResult<Vec<OpenclVersion>>
fn platform_version(&self) -> OclCoreResult<OpenclVersion>
[src]
fn platform_version(&self) -> OclCoreResult<OpenclVersion>
fn verify_device_versions(
&self,
required_version: [u16; 2]
) -> OclCoreResult<()>
[src]
fn verify_device_versions(
&self,
required_version: [u16; 2]
) -> OclCoreResult<()>
fn verify_platform_version(
&self,
required_version: [u16; 2]
) -> OclCoreResult<()>
[src]
fn verify_platform_version(
&self,
required_version: [u16; 2]
) -> OclCoreResult<()>
impl Send for Kernel
[src]
impl Send for Kernel