pub struct Kernel { /* private fields */ }
Implementations§
source§impl Kernel
impl Kernel
pub fn default() -> Kernel
pub fn new(kname: &str, prog: &impl ProgramTraitConst) -> Result<Kernel>
sourcepub fn new_1(
kname: &str,
prog: &impl ProgramSourceTraitConst,
buildopts: &str,
errmsg: &mut String
) -> Result<Kernel>
pub fn new_1( kname: &str, prog: &impl ProgramSourceTraitConst, buildopts: &str, errmsg: &mut String ) -> Result<Kernel>
§C++ default parameters
- buildopts: String()
- errmsg: 0
sourcepub fn new_def(
kname: &str,
prog: &impl ProgramSourceTraitConst
) -> Result<Kernel>
pub fn new_def( kname: &str, prog: &impl ProgramSourceTraitConst ) -> 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: &impl KernelTraitConst) -> Result<Kernel>
pub fn copy_mut(k: Kernel) -> Kernel
Trait Implementations§
source§impl Boxed for Kernel
impl Boxed for Kernel
source§unsafe fn from_raw(ptr: <Kernel as OpenCVType<'_>>::ExternReceive) -> Self
unsafe fn from_raw(ptr: <Kernel as OpenCVType<'_>>::ExternReceive) -> Self
Wrap the specified raw pointer Read more
source§fn into_raw(self) -> <Kernel as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw(self) -> <Kernel as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying raw pointer while consuming this wrapper. Read more
source§fn as_raw(&self) -> <Kernel as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <Kernel as OpenCVTypeExternContainer>::ExternSend
Return the underlying raw pointer. Read more
source§fn as_raw_mut(&mut self) -> <Kernel as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut(&mut self) -> <Kernel as OpenCVTypeExternContainer>::ExternSendMut
Return the underlying mutable raw pointer Read more
source§impl KernelTrait for Kernel
impl KernelTrait for Kernel
fn as_raw_mut_Kernel(&mut self) -> *mut c_void
fn set(&mut self, k: &impl KernelTraitConst) -> Result<()>
fn set_1(&mut self, k: Kernel)
fn create(&mut self, kname: &str, prog: &impl ProgramTraitConst) -> Result<bool>
source§fn create_ext(
&mut self,
kname: &str,
prog: &impl ProgramSourceTraitConst,
buildopts: &str,
errmsg: &mut String
) -> Result<bool>
fn create_ext( &mut self, kname: &str, prog: &impl ProgramSourceTraitConst, buildopts: &str, errmsg: &mut String ) -> Result<bool>
C++ default parameters Read more
source§fn create_ext_def(
&mut self,
kname: &str,
prog: &impl ProgramSourceTraitConst,
buildopts: &str
) -> Result<bool>
fn create_ext_def( &mut self, kname: &str, prog: &impl ProgramSourceTraitConst, buildopts: &str ) -> Result<bool>
Note Read more
unsafe fn set_2( &mut self, i: i32, value: *const c_void, sz: size_t ) -> Result<i32>
fn set_3(&mut self, i: i32, image_2d: &impl Image2DTraitConst) -> Result<i32>
fn set_umat(&mut self, i: i32, m: &impl UMatTraitConst) -> Result<i32>
fn set_kernel_arg( &mut self, i: i32, arg: &impl KernelArgTraitConst ) -> Result<i32>
source§fn run(
&mut self,
dims: i32,
globalsize: &mut [size_t],
localsize: &mut [size_t],
sync: bool,
q: &impl QueueTraitConst
) -> Result<bool>
fn run( &mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool, q: &impl QueueTraitConst ) -> 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: &impl QueueTraitConst
) -> Result<bool>
fn run_( &mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], sync: bool, q: &impl QueueTraitConst ) -> 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: &impl QueueTraitConst) -> Result<bool>
fn run_task(&mut self, sync: bool, q: &impl QueueTraitConst) -> Result<bool>
C++ default parameters Read more
source§fn run_profiling(
&mut self,
dims: i32,
globalsize: &mut [size_t],
localsize: &mut [size_t],
q: &impl QueueTraitConst
) -> Result<i64>
fn run_profiling( &mut self, dims: i32, globalsize: &mut [size_t], localsize: &mut [size_t], q: &impl QueueTraitConst ) -> Result<i64>
Similar to synchronized run_() call with returning of kernel execution time 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 Freeze for Kernel
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