Struct opencv::gapi::GCompiled

source ·
pub struct GCompiled { /* private fields */ }
Expand description

\addtogroup gapi_main_classes /

Represents a compiled computation (graph). Can only be used with image / data formats & resolutions it was compiled for, with some exceptions.

This class represents a product of graph compilation (calling cv::GComputation::compile()). Objects of this class actually do data processing, and graph execution is incapsulated into objects of this class. Execution model itself depends on kernels and backends which were using during the compilation, see @ref gapi_compile_args for details.

In a general case, GCompiled objects can be applied to data only in that formats/resolutions they were compiled for (see @ref gapi_meta_args). However, if the underlying backends allow, a compiled object can be reshaped to handle data (images) of different resolution, though formats and types must remain the same.

GCompiled is very similar to std::function<> in its semantics – running it looks like a function call in the user code.

At the moment, GCompiled objects are not reentrant – generally, the objects are stateful since graph execution itself is a stateful process and this state is now maintained in GCompiled’s own memory (not on the process stack).

At the same time, two different GCompiled objects produced from the single cv::GComputation are completely independent and can be used concurrently.

See also

GStreamingCompiled

Implementations

Constructs an empty object

Trait Implementations

Wrap the specified raw pointer Read more
Return an the underlying raw pointer while consuming this wrapper. Read more
Return the underlying raw pointer. Read more
Return the underlying mutable raw pointer Read more
Executes the destructor for this type. Read more
Prepare inner kernels states for a new video-stream. Read more
Check if compiled object is valid (non-empty) Read more
Check if the underlying backends support reshape or not. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.