pub struct Kernel { /* private fields */ }
Implementations§
source§impl Kernel
impl Kernel
pub fn default() -> Kernel
pub fn new(kname: &str, prog: &Program) -> Result<Kernel>
sourcepub fn new_1(
kname: &str,
prog: &ProgramSource,
buildopts: &str,
errmsg: &mut String
) -> Result<Kernel>
pub fn new_1( kname: &str, prog: &ProgramSource, buildopts: &str, errmsg: &mut String ) -> Result<Kernel>
C++ default parameters
- buildopts: String()
- errmsg: 0
sourcepub fn new_def(kname: &str, prog: &ProgramSource) -> Result<Kernel>
pub fn new_def(kname: &str, prog: &ProgramSource) -> Result<Kernel>
Note
This alternative version of [new] function uses the following default values for its arguments:
- buildopts: String()
- errmsg: 0
pub fn copy(k: &Kernel) -> Result<Kernel>
pub fn copy_mut(k: Kernel) -> Kernel
Trait Implementations§
source§impl Boxed for Kernel
impl Boxed for Kernel
source§impl KernelTrait for Kernel
impl KernelTrait for Kernel
fn as_raw_mut_Kernel(&mut self) -> *mut c_void
fn create(&mut self, kname: &str, prog: &Program) -> Result<bool>
source§fn create_ext(
&mut self,
kname: &str,
prog: &ProgramSource,
buildopts: &str,
errmsg: &mut String
) -> Result<bool>
fn create_ext( &mut self, kname: &str, prog: &ProgramSource, buildopts: &str, errmsg: &mut String ) -> Result<bool>
C++ default parameters Read more
source§fn create_ext_def(
&mut self,
kname: &str,
prog: &ProgramSource,
buildopts: &str
) -> Result<bool>
fn create_ext_def( &mut self, kname: &str, prog: &ProgramSource, buildopts: &str ) -> Result<bool>
Note Read more
unsafe fn set( &mut self, i: i32, value: *const c_void, sz: size_t ) -> Result<i32>
fn set_1(&mut self, i: i32, image_2d: &Image2D) -> Result<i32>
fn set_umat(&mut self, i: i32, m: &UMat) -> Result<i32>
fn set_kernel_arg(&mut self, i: i32, arg: &KernelArg) -> Result<i32>
source§fn run(
&mut self,
dims: i32,
globalsize: &mut [size_t],
localsize: &mut [size_t],
sync: bool,
q: &Queue
) -> Result<bool>
fn run( &mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool, q: &Queue ) -> Result<bool>
Run the OpenCL kernel (globalsize value may be adjusted) Read more
source§fn run_def(
&mut self,
dims: i32,
globalsize: &mut [size_t],
localsize: &mut [size_t],
sync: bool
) -> Result<bool>
fn run_def( &mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool ) -> Result<bool>
Run the OpenCL kernel (globalsize value may be adjusted) Read more
source§fn run_(
&mut self,
dims: i32,
globalsize: &mut [size_t],
localsize: &mut [size_t],
sync: bool,
q: &Queue
) -> Result<bool>
fn run_( &mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool, q: &Queue ) -> Result<bool>
Run the OpenCL kernel Read more
source§fn run__def(
&mut self,
dims: i32,
globalsize: &mut [size_t],
localsize: &mut [size_t],
sync: bool
) -> Result<bool>
fn run__def( &mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool ) -> Result<bool>
Run the OpenCL kernel Read more
source§fn run_task(&mut self, sync: bool, q: &Queue) -> Result<bool>
fn run_task(&mut self, sync: bool, q: &Queue) -> Result<bool>
C++ default parameters Read more
source§impl KernelTraitConst for Kernel
impl KernelTraitConst for Kernel
fn as_raw_Kernel(&self) -> *const c_void
fn empty(&self) -> Result<bool>
fn work_group_size(&self) -> Result<size_t>
fn prefered_work_group_size_multiple(&self) -> Result<size_t>
fn compile_work_group_size(&self, wsz: &mut [size_t]) -> Result<bool>
fn local_mem_size(&self) -> Result<size_t>
fn ptr(&self) -> Result<*mut c_void>
impl Send for Kernel
Auto Trait Implementations§
impl RefUnwindSafe for Kernel
impl !Sync for Kernel
impl Unpin for Kernel
impl UnwindSafe for Kernel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more