13 #include <cpp_interfaces/base/ie_variable_state_base.hpp>
14 #include <cpp_interfaces/interface/ie_iinfer_async_request_internal.hpp>
25 std::shared_ptr<IAsyncInferRequestInternal> _impl;
32 explicit InferRequestBase(std::shared_ptr<IAsyncInferRequestInternal> impl): _impl(impl) {}
35 OV_ITT_SCOPED_TASK(itt::domains::Plugin,
"Infer");
39 StatusCode Cancel(ResponseDesc* resp) noexcept
override {
40 OV_ITT_SCOPED_TASK(itt::domains::Plugin,
"Cancel");
44 StatusCode GetPerformanceCounts(std::map<std::string, InferenceEngineProfileInfo>& perfMap,
45 ResponseDesc* resp)
const noexcept
override {
46 TO_STATUS(perfMap = _impl->GetPerformanceCounts());
49 StatusCode SetBlob(
const char* name,
const Blob::Ptr& data, ResponseDesc* resp) noexcept
override {
53 StatusCode SetBlob(
const char* name,
const Blob::Ptr& data,
const PreProcessInfo& info, ResponseDesc* resp) noexcept
override {
54 TO_STATUS(_impl->SetBlob(name, data, info));
57 StatusCode GetBlob(
const char* name,
Blob::Ptr& data, ResponseDesc* resp) noexcept
override {
61 StatusCode GetPreProcess(
const char* name,
const PreProcessInfo** info, ResponseDesc *resp)
const noexcept
override {
62 TO_STATUS(*info = &(_impl->GetPreProcess(name)));
65 StatusCode StartAsync(ResponseDesc* resp) noexcept
override {
66 OV_ITT_SCOPED_TASK(itt::domains::Plugin,
"StartAsync");
70 StatusCode Wait(int64_t millis_timeout, ResponseDesc* resp) noexcept
override {
71 OV_ITT_SCOPED_TASK(itt::domains::Plugin,
"Wait");
79 StatusCode GetUserData(
void** data, ResponseDesc* resp) noexcept
override {
83 StatusCode SetUserData(
void* data, ResponseDesc* resp) noexcept
override {
87 void Release() noexcept
override {
91 StatusCode SetBatch(
int batch_size, ResponseDesc* resp) noexcept
override {
95 IE_SUPPRESS_DEPRECATED_START
98 auto v = _impl->QueryState();
99 if (idx >= v.size()) {
100 return OUT_OF_BOUNDS;
102 pState = std::make_shared<VariableStateBase>(v[idx]);
104 }
catch (
const std::exception& ex) {
110 IE_SUPPRESS_DEPRECATED_END
std::shared_ptr< Blob > Ptr
void(* CompletionCallback)(InferenceEngine::IInferRequest::Ptr context, InferenceEngine::StatusCode code)
std::shared_ptr< IVariableState > Ptr
Inference request noexcept wrapper which accepts IAsyncInferRequestInternal derived instance which ca...
Definition: ie_infer_async_request_base.hpp:24
InferRequestBase(std::shared_ptr< IAsyncInferRequestInternal > impl)
Constructor with actual underlying implementation.
Definition: ie_infer_async_request_base.hpp:32
Wrappers from c++ function to c-style one.
#define NO_EXCEPT_CALL_RETURN_STATUS(x)
Returns a status code of a called function, handles exeptions and converts to a status code.
Definition: exception2status.hpp:64
#define TO_STATUS_NO_RESP(x)
Converts C++ exceptioned function call into a status code. Does not work with a ResponseDesc object.
Definition: exception2status.hpp:47
#define TO_STATUS(x)
Converts C++ exceptioned function call into a c-style one.
Definition: exception2status.hpp:29
Inference Engine Plugin API namespace.
Defines openvino domains for tracing.
A description buffer wrapping StatusCode and ResponseDesc.
Definition: description_buffer.hpp:24