pub trait GKernelPackageTraitConst {
    fn as_raw_GKernelPackage(&self) -> *const c_void;

    fn get_transformations(&self) -> Result<Vector<GTransform>> { ... }
    fn get_kernel_ids(&self) -> Result<Vector<String>> { ... }
    fn includes_api(&self, id: &str) -> Result<bool> { ... }
    fn lookup(&self, id: &str) -> Result<Tuple<(GBackend, GKernelImpl)>> { ... }
    fn backends(&self) -> Result<Vector<GBackend>> { ... }
}
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().

Required Methods

Provided Methods

Returns vector of transformations included in the package

Returns

vector of transformations included in the package

Returns vector of kernel ids included in the package

Returns

vector of kernel ids included in the package

@private

@private

Lists all backends which are included into package

Returns

vector of backends

Implementors