[][src]Trait opencv::hub_prelude::KernelTrait

pub trait KernelTrait {
    pub fn as_raw_Kernel(&self) -> *const c_void;
pub fn as_raw_mut_Kernel(&mut self) -> *mut c_void; pub fn empty(&self) -> Result<bool> { ... }
pub fn create(&mut self, kname: &str, prog: &Program) -> Result<bool> { ... }
pub fn create_ext(
        &mut self,
        kname: &str,
        prog: &ProgramSource,
        buildopts: &str,
        errmsg: &mut String
    ) -> Result<bool> { ... }
pub fn set(
        &mut self,
        i: i32,
        value: *const c_void,
        sz: size_t
    ) -> Result<i32> { ... }
pub fn set_1(&mut self, i: i32, image_2d: &Image2D) -> Result<i32> { ... }
pub fn set_umat(&mut self, i: i32, m: &UMat) -> Result<i32> { ... }
pub fn set_kernel_arg(&mut self, i: i32, arg: &KernelArg) -> Result<i32> { ... }
pub fn run(
        &mut self,
        dims: i32,
        globalsize: &mut [size_t],
        localsize: &mut [size_t],
        sync: bool,
        q: &Queue
    ) -> Result<bool> { ... }
pub fn run_task(&mut self, sync: bool, q: &Queue) -> Result<bool> { ... }
pub fn run_profiling(
        &mut self,
        dims: i32,
        globalsize: &mut [size_t],
        localsize: &mut [size_t],
        q: &Queue
    ) -> Result<i64> { ... }
pub fn work_group_size(&self) -> Result<size_t> { ... }
pub fn prefered_work_group_size_multiple(&self) -> Result<size_t> { ... }
pub fn compile_work_group_size(&self, wsz: &mut [size_t]) -> Result<bool> { ... }
pub fn local_mem_size(&self) -> Result<size_t> { ... }
pub fn ptr(&self) -> Result<*mut c_void> { ... } }

Required methods

Loading content...

Provided methods

pub fn empty(&self) -> Result<bool>[src]

pub fn create(&mut self, kname: &str, prog: &Program) -> Result<bool>[src]

pub fn create_ext(
    &mut self,
    kname: &str,
    prog: &ProgramSource,
    buildopts: &str,
    errmsg: &mut String
) -> Result<bool>
[src]

pub fn set(&mut self, i: i32, value: *const c_void, sz: size_t) -> Result<i32>[src]

pub fn set_1(&mut self, i: i32, image_2d: &Image2D) -> Result<i32>[src]

pub fn set_umat(&mut self, i: i32, m: &UMat) -> Result<i32>[src]

pub fn set_kernel_arg(&mut self, i: i32, arg: &KernelArg) -> Result<i32>[src]

pub fn run(
    &mut self,
    dims: i32,
    globalsize: &mut [size_t],
    localsize: &mut [size_t],
    sync: bool,
    q: &Queue
) -> Result<bool>
[src]

Run the OpenCL kernel.

Parameters

  • dims: the work problem dimensions. It is the length of globalsize and localsize. It can be either 1, 2 or 3.
  • globalsize: work items for each dimension. It is not the final globalsize passed to OpenCL. Each dimension will be adjusted to the nearest integer divisible by the corresponding value in localsize. If localsize is NULL, it will still be adjusted depending on dims. The adjusted values are greater than or equal to the original values.
  • localsize: work-group size for each dimension.
  • sync: specify whether to wait for OpenCL computation to finish before return.
  • q: command queue

C++ default parameters

  • q: Queue()

pub fn run_task(&mut self, sync: bool, q: &Queue) -> Result<bool>[src]

pub fn run_profiling(
    &mut self,
    dims: i32,
    globalsize: &mut [size_t],
    localsize: &mut [size_t],
    q: &Queue
) -> Result<i64>
[src]

Similar to synchronized run() call with returning of kernel execution time Separate OpenCL command queue may be used (with CL_QUEUE_PROFILING_ENABLE)

Returns

Execution time in nanoseconds or negative number on error

C++ default parameters

  • q: Queue()

pub fn work_group_size(&self) -> Result<size_t>[src]

pub fn prefered_work_group_size_multiple(&self) -> Result<size_t>[src]

pub fn compile_work_group_size(&self, wsz: &mut [size_t]) -> Result<bool>[src]

pub fn local_mem_size(&self) -> Result<size_t>[src]

pub fn ptr(&self) -> Result<*mut c_void>[src]

Loading content...

Implementors

impl KernelTrait for Kernel[src]

Loading content...