#include <ie_infer_request.hpp>
Public Types | |
using | Ptr = std::shared_ptr< InferRequest > |
A smart pointer to the InferRequest object. | |
Public Member Functions | |
InferRequest ()=default | |
Default constructor. | |
~InferRequest () | |
Destructor. | |
void | SetBlob (const std::string &name, const Blob::Ptr &data) |
Sets input/output data to infer. More... | |
Blob::Ptr | GetBlob (const std::string &name) |
void | SetBlob (const std::string &name, const Blob::Ptr &data, const PreProcessInfo &info) |
Sets blob with a pre-process information. More... | |
const PreProcessInfo & | GetPreProcess (const std::string &name) const |
Gets pre-process for input data. More... | |
void | Infer () |
std::map< std::string, InferenceEngineProfileInfo > | GetPerformanceCounts () const |
void | SetInput (const BlobMap &inputs) |
Sets input data to infer. More... | |
void | SetOutput (const BlobMap &results) |
Sets data that will contain result of the inference. More... | |
void | SetBatch (const int batch) |
Sets new batch size when dynamic batching is enabled in executable network that created this request. More... | |
InferRequest (IInferRequest::Ptr request, InferenceEnginePluginPtr plg={}) | |
void | StartAsync () |
Start inference of specified input(s) in asynchronous mode. More... | |
StatusCode | Wait (int64_t millis_timeout) |
template<class T > | |
void | SetCompletionCallback (const T &callbackToSet) |
operator IInferRequest::Ptr & () | |
IInferRequest pointer to be used directly in CreateInferRequest functions. More... | |
bool | operator! () const noexcept |
Checks if current InferRequest object is not initialized. More... | |
operator bool () const noexcept | |
Checks if current InferRequest object is initialized. More... | |
This is an interface of asynchronous infer request.
Wraps IInferRequest It can throw exceptions safely for the application, where it is properly handled.
|
inlineexplicit |
constructs InferRequest from the initialized shared_pointer
request | Initialized shared pointer to IInferRequest interface |
plg | Plugin to use. This is required to ensure that InferRequest can work properly even if plugin object is destroyed. |
|
inline |
Gets input/output data for inference.
Wraps IInferRequest::GetBlob
name | A name of Blob to get |
name
. If a blob is not found, an exception is thrown.
|
inline |
Queries performance measures per layer to get feedback of what is the most time consuming layer.
Wraps IInferRequest::GetPerformanceCounts
|
inline |
Gets pre-process for input data.
name | Name of input blob. |
|
inline |
Infers specified input(s) in synchronous mode.
Wraps IInferRequest::Infer
|
inlineexplicitnoexcept |
Checks if current InferRequest object is initialized.
|
inline |
IInferRequest pointer to be used directly in CreateInferRequest functions.
|
inlinenoexcept |
Checks if current InferRequest object is not initialized.
|
inline |
Sets new batch size when dynamic batching is enabled in executable network that created this request.
batch | new batch size to be used by all the following inference calls for this request. |
|
inline |
Sets input/output data to infer.
name | Name of input or output blob. |
data | Reference to input or output blob. The type of a blob must match the network input precision and size. |
|
inline |
Sets blob with a pre-process information.
name | Name of input blob. |
data | A reference to input. The type of Blob must correspond to the network input precision and size. |
info | Preprocess info for blob. |
|
inline |
Sets a callback function that will be called on success or failure of asynchronous request.
Wraps IInferRequest::SetCompletionCallback
callbackToSet | Lambda callback object which will be called on processing finish. |
|
inline |
Sets input data to infer.
inputs | A reference to a map of input blobs accessed by input names. The type of Blob must correspond to the network input precision and size. |
|
inline |
Sets data that will contain result of the inference.
results | - a reference to a map of result blobs accessed by output names. The type of Blob must correspond to the network output precision and size. |
|
inline |
Start inference of specified input(s) in asynchronous mode.
|
inline |
Waits for the result to become available. Blocks until specified millis_timeout has elapsed or the result becomes available, whichever comes first.
Wraps IInferRequest::Wait
millis_timeout | Maximum duration in milliseconds to block for |