pub struct GKernelPackage { /* private fields */ }
Expand description
A container class for heterogeneous kernel implementation collections and graph transformations.
GKernelPackage is a special container class which stores kernel implementations and graph transformations. Objects of this class are created and passed to cv::GComputation::compile() to specify which kernels to use and which transformations to apply in the compiled graph. GKernelPackage may contain kernels of different backends, e.g. be heterogeneous.
The most easy way to create a kernel package is to use function cv::gapi::kernels(). This template functions takes kernel implementations in form of type list (variadic template) and generates a kernel package atop of that.
Kernel packages can be also generated programmatically, starting with an empty package (created with the default constructor) and then by populating it with kernels via call to GKernelPackage::include(). Note this method is also a template one since G-API kernel and transformation implementations are types, not objects.
Finally, two kernel packages can be combined into a new one with function cv::gapi::combine().
Trait Implementations§
source§impl Boxed for GKernelPackage
impl Boxed for GKernelPackage
source§unsafe fn from_raw(
ptr: <GKernelPackage as OpenCVFromExtern>::ExternReceive,
) -> Self
unsafe fn from_raw( ptr: <GKernelPackage as OpenCVFromExtern>::ExternReceive, ) -> Self
source§fn into_raw(
self,
) -> <GKernelPackage as OpenCVTypeExternContainer>::ExternSendMut
fn into_raw( self, ) -> <GKernelPackage as OpenCVTypeExternContainer>::ExternSendMut
source§fn as_raw(&self) -> <GKernelPackage as OpenCVTypeExternContainer>::ExternSend
fn as_raw(&self) -> <GKernelPackage as OpenCVTypeExternContainer>::ExternSend
source§fn as_raw_mut(
&mut self,
) -> <GKernelPackage as OpenCVTypeExternContainer>::ExternSendMut
fn as_raw_mut( &mut self, ) -> <GKernelPackage as OpenCVTypeExternContainer>::ExternSendMut
source§impl Clone for GKernelPackage
impl Clone for GKernelPackage
source§impl Debug for GKernelPackage
impl Debug for GKernelPackage
source§impl Default for GKernelPackage
impl Default for GKernelPackage
source§impl Drop for GKernelPackage
impl Drop for GKernelPackage
source§impl GKernelPackageTrait for GKernelPackage
impl GKernelPackageTrait for GKernelPackage
source§impl GKernelPackageTraitConst for GKernelPackage
impl GKernelPackageTraitConst for GKernelPackage
fn as_raw_GKernelPackage(&self) -> *const c_void
source§fn get_transformations(&self) -> Result<Vector<GTransform>>
fn get_transformations(&self) -> Result<Vector<GTransform>>
impl Send for GKernelPackage
Auto Trait Implementations§
impl Freeze for GKernelPackage
impl RefUnwindSafe for GKernelPackage
impl !Sync for GKernelPackage
impl Unpin for GKernelPackage
impl UnwindSafe for GKernelPackage
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
impl<Mat> ModifyInplace for Matwhere
Mat: Boxed,
source§unsafe fn modify_inplace<Res>(
&mut self,
f: impl FnOnce(&Mat, &mut Mat) -> Res,
) -> Res
unsafe fn modify_inplace<Res>( &mut self, f: impl FnOnce(&Mat, &mut Mat) -> Res, ) -> Res
Mat
or another similar object. By passing
a mutable reference to the Mat
to this function your closure will get called with the read reference and a write references
to the same Mat
. This is unsafe in a general case as it leads to having non-exclusive mutable access to the internal data,
but it can be useful for some performance sensitive operations. One example of an OpenCV function that allows such in-place
modification is imgproc::threshold
. Read more