Wrapper of asynchronous inference request to support thread-safe execution. More...
#include <ie_infer_async_request_thread_safe_internal.hpp>
Public Types | |
typedef std::shared_ptr< AsyncInferRequestThreadSafeInternal > | Ptr |
A shared pointer to a AsyncInferRequestThreadSafeInternal implementation. | |
Public Types inherited from InferenceEngine::IAsyncInferRequestInternal | |
typedef std::shared_ptr< IAsyncInferRequestInternal > | Ptr |
A shared pointer to IAsyncInferRequestInternal interface. | |
Public Types inherited from InferenceEngine::IInferRequestInternal | |
typedef std::shared_ptr< IInferRequestInternal > | Ptr |
A shared pointer to a IInferRequestInternal interface. | |
Public Member Functions | |
AsyncInferRequestThreadSafeInternal () | |
Constructs a new instance. | |
void | StartAsync () override |
Start inference of specified input(s) in asynchronous mode. More... | |
void | GetUserData (void **data) override |
Get arbitrary data for the request. More... | |
void | SetUserData (void *data) override |
Set arbitrary data for the request. More... | |
void | SetCompletionCallback (IInferRequest::CompletionCallback callback) override |
Set callback function which will be called on success or failure of asynchronous request. More... | |
void | Infer () override |
Infers specified input(s) in synchronous mode. More... | |
void | GetPerformanceCounts (std::map< std::string, InferenceEngineProfileInfo > &perfMap) const override |
Queries performance measures per layer to get feedback of what is the most time consuming layer. Note: not all plugins may provide meaningful data. More... | |
void | SetBlob (const char *name, const Blob::Ptr &data) override |
Set input/output data to infer. More... | |
void | SetBlob (const char *name, const Blob::Ptr &data, const PreProcessInfo &info) override |
Sets pre-process for input data. More... | |
void | GetBlob (const char *name, Blob::Ptr &data) override |
Get input/output data to infer. More... | |
void | GetPreProcess (const char *name, const PreProcessInfo **info) const override |
Gets pre-process for input data. More... | |
void | SetBatch (int batch) override |
Sets new batch size when dynamic batching is enabled in executable network that created this request. More... | |
Public Member Functions inherited from InferenceEngine::IAsyncInferRequestInternal | |
virtual | ~IAsyncInferRequestInternal ()=default |
A virtual destructor. | |
virtual StatusCode | Wait (int64_t millis_timeout)=0 |
Waits for the result to become available. Blocks until specified millis_timeout has elapsed or the result becomes available, whichever comes first. More... | |
Public Member Functions inherited from InferenceEngine::IInferRequestInternal | |
virtual | ~IInferRequestInternal ()=default |
Destroys the object. | |
Protected Member Functions | |
virtual bool | isRequestBusy () const |
Determines if request busy. More... | |
virtual bool | setIsRequestBusy (bool isBusy) |
Sets the is request busy. More... | |
void | CheckBusy () const |
Checks whether an inference request is busy and calls ThrowBusy if true | |
virtual void | StartAsync_ThreadUnsafe ()=0 |
Starts an asynchronous pipeline thread unsafe. More... | |
virtual void | GetUserData_ThreadUnsafe (void **data)=0 |
Gets the user data thread unsafe. More... | |
virtual void | SetUserData_ThreadUnsafe (void *data)=0 |
Sets the user data thread unsafe. More... | |
virtual void | SetCompletionCallback_ThreadUnsafe (IInferRequest::CompletionCallback callback)=0 |
Sets the completion callback thread unsafe. More... | |
virtual void | Infer_ThreadUnsafe ()=0 |
Performs inference of pipeline in syncronous mode. More... | |
virtual void | GetPerformanceCounts_ThreadUnsafe (std::map< std::string, InferenceEngineProfileInfo > &perfMap) const =0 |
Gets the performance counts thread unsafe. More... | |
virtual void | SetBlob_ThreadUnsafe (const char *name, const Blob::Ptr &data)=0 |
Sets the blob thread unsafe. More... | |
virtual void | SetBlob_ThreadUnsafe (const char *name, const Blob::Ptr &data, const PreProcessInfo &info)=0 |
Sets the blob with preprocessing information thread unsafe. More... | |
virtual void | GetBlob_ThreadUnsafe (const char *name, Blob::Ptr &data)=0 |
Gets the input or output blob thread unsafe. More... | |
virtual void | GetPreProcess_ThreadUnsafe (const char *name, const PreProcessInfo **info) const =0 |
Gets the preprocessing information thread unsafe. More... | |
virtual void | SetBatch_ThreadUnsafe (int batch)=0 |
Sets the dynamic batch thread unsafe. More... | |
Static Protected Member Functions | |
static void | ThrowBusy () |
Throws an exception that an inference request is busy. | |
Wrapper of asynchronous inference request to support thread-safe execution.
|
inlineoverridevirtual |
Get input/output data to infer.
name | - a name of input or output blob. |
data | - a reference to input or output blob. The type of Blob must correspond to the network input precision and size. |
Implements InferenceEngine::IInferRequestInternal.
|
protectedpure virtual |
Gets the input or output blob thread unsafe.
[in] | name | The name of input / output data to get a blob for |
data | The data |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineoverridevirtual |
Queries performance measures per layer to get feedback of what is the most time consuming layer. Note: not all plugins may provide meaningful data.
perfMap | - a map of layer names to profiling information for that layer. |
Implements InferenceEngine::IInferRequestInternal.
|
protectedpure virtual |
Gets the performance counts thread unsafe.
perfMap | The performance map |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineoverridevirtual |
Gets pre-process for input data.
name | Name of input blob. |
info | pointer to a pointer to PreProcessInfo structure |
Implements InferenceEngine::IInferRequestInternal.
|
protectedpure virtual |
Gets the preprocessing information thread unsafe.
[in] | name | The name of input / output data to get a processing information for |
info | The preprocessing information |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineoverridevirtual |
Get arbitrary data for the request.
data | A pointer to a pointer to arbitrary data |
Implements InferenceEngine::IAsyncInferRequestInternal.
|
protectedpure virtual |
Gets the user data thread unsafe.
data | The user data |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineoverridevirtual |
Infers specified input(s) in synchronous mode.
Implements InferenceEngine::IInferRequestInternal.
|
protectedpure virtual |
Performs inference of pipeline in syncronous mode.
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineprotectedvirtual |
Determines if request busy.
True
if request busy, false
otherwise.
|
inlineoverridevirtual |
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. |
Implements InferenceEngine::IInferRequestInternal.
|
protectedpure virtual |
Sets the dynamic batch thread unsafe.
[in] | batch | The dynamic batch value |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineoverridevirtual |
Set input/output data to infer.
name | - a name of input or output blob. |
data | - a reference to input or output blob. The type of Blob must correspond to the network input precision and size. |
Implements InferenceEngine::IInferRequestInternal.
|
inlineoverridevirtual |
Sets pre-process for input data.
name | Name of input blob. |
data | - a reference to input or output blob. The type of Blob must correspond to the network input precision and size. |
info | Preprocess info for blob. |
Implements InferenceEngine::IInferRequestInternal.
|
protectedpure virtual |
Sets the blob thread unsafe.
[in] | name | The name of input / output data to set a blob to |
[in] | data | The blob to set |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
protectedpure virtual |
Sets the blob with preprocessing information thread unsafe.
[in] | name | The name of input / output data to set a blob to |
[in] | data | The blob to set |
[in] | info | The preprocessing information |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineoverridevirtual |
Set callback function which will be called on success or failure of asynchronous request.
callback | - function to be called with the following description: |
Implements InferenceEngine::IAsyncInferRequestInternal.
|
protectedpure virtual |
Sets the completion callback thread unsafe.
[in] | callback | The callback to set |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineprotectedvirtual |
Sets the is request busy.
[in] | isBusy | Indicates if busy |
True
is case of success, false
otherwise.
|
inlineoverridevirtual |
Set arbitrary data for the request.
data | A pointer to a pointer to arbitrary data |
Implements InferenceEngine::IAsyncInferRequestInternal.
|
protectedpure virtual |
Sets the user data thread unsafe.
data | The user data |
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.
|
inlineoverridevirtual |
Start inference of specified input(s) in asynchronous mode.
Implements InferenceEngine::IAsyncInferRequestInternal.
|
protectedpure virtual |
Starts an asynchronous pipeline thread unsafe.
Implemented in InferenceEngine::AsyncInferRequestThreadSafeDefault.