26 using ParamMap = std::map<std::string, Parameter>;
36 using Ptr = std::shared_ptr<RemoteBlob>;
41 using CPtr = std::shared_ptr<const RemoteBlob>;
85 virtual std::shared_ptr<RemoteContext>
getContext()
const noexcept = 0;
99 using Ptr = std::shared_ptr<RemoteContext>;
104 using CPtr = std::shared_ptr<const RemoteContext>;
117 template <
typename T,
118 typename std::enable_if<!std::is_pointer<T>::value && !std::is_reference<T>::value,
int>::type = 0,
119 typename std::enable_if<std::is_base_of<RemoteContext, T>::value,
int>::type = 0>
121 return dynamic_cast<T*
>(
this) !=
nullptr;
130 template <
typename T,
131 typename std::enable_if<!std::is_pointer<T>::value && !std::is_reference<T>::value,
int>::type = 0,
132 typename std::enable_if<std::is_base_of<RemoteContext, T>::value,
int>::type = 0>
133 bool is() const noexcept {
134 return dynamic_cast<const T*
>(
this) !=
nullptr;
143 template <
typename T,
144 typename std::enable_if<!std::is_pointer<T>::value && !std::is_reference<T>::value,
int>::type = 0,
145 typename std::enable_if<std::is_base_of<RemoteContext, T>::value,
int>::type = 0>
147 return dynamic_cast<T*
>(
this);
156 template <
typename T,
157 typename std::enable_if<!std::is_pointer<T>::value && !std::is_reference<T>::value,
int>::type = 0,
158 typename std::enable_if<std::is_base_of<RemoteContext, T>::value,
int>::type = 0>
159 const T *
as() const noexcept {
160 return dynamic_cast<const T*
>(
this);
201 return ctx->CreateBlob(desc);
std::shared_ptr< const RemoteContext > CPtr
A smart pointer to the const RemoteContext object.
Definition: ie_remote_context.hpp:104
TensorDesc tensorDesc
The tensor descriptor of the given blob.
Definition: ie_blob.h:206
Definition: cldnn_config.hpp:16
RemoteBlob(const TensorDesc &tensorDesc)
Constructor. Creates an empty RemoteBlob object with the specified precision.
Definition: ie_remote_context.hpp:52
A header file for Blob and generic TBlob<>
size_t size() const
Returns size of single element of that precision in bits.
Definition: ie_precision.hpp:199
std::shared_ptr< RemoteBlob > Ptr
A smart pointer to the RemoteBlob object.
Definition: ie_remote_context.hpp:36
virtual std::string getDeviceName() const noexcept=0
Returns name of the device on which underlying object is allocated. Abstract method.
virtual std::shared_ptr< RemoteContext > getContext() const noexcept=0
Returns device context which underlying object belongs to. Abstract method.
size_t element_size() const noexcept override
Returns the number of bytes per element.
Definition: ie_remote_context.hpp:57
This class defines Tensor description.
Definition: ie_layouts.h:153
std::shared_ptr< const Blob > CPtr
A smart pointer to the const Blob object.
Definition: ie_blob.h:47
InferenceEngine::TBlob< Type >::Ptr make_shared_blob(const TensorDesc &tensorDesc)
Creates a blob with the given tensor descriptor.
Definition: ie_blob.h:782
std::map< std::string, Parameter > ParamMap
An std::map object containing low-level object parameters of classes that are derived from RemoteBlob...
Definition: ie_remote_context.hpp:26
std::shared_ptr< Blob > Ptr
A smart pointer containing Blob object.
Definition: ie_blob.h:42
bool is() const noexcept
Checks if the RemoteContext object can be cast to the type const T*.
Definition: ie_remote_context.hpp:133
This class implements a container object that represents a tensor in memory (host and remote/accelera...
Definition: ie_blob.h:271
const T * as() const noexcept
Casts this RemoteContext object to the type const T*.
Definition: ie_remote_context.hpp:159
A header file for the Parameter class.
This class represents an Inference Engine abstraction for remote (non-CPU) accelerator device-specifi...
Definition: ie_remote_context.hpp:94
virtual ParamMap getParams() const =0
Returns a map of device-specific parameters required for low-level operations with underlying object...
virtual ~RemoteBlob()=default
RemoteBlob virtual destructor.
bool is() noexcept
Checks if the RemoteContext object can be cast to the type T*.
Definition: ie_remote_context.hpp:120
std::map< std::string, std::string > params
Map of pairs: (parameter name, parameter value)
Definition: ie_layers.h:367
std::shared_ptr< RemoteContext > Ptr
A smart pointer to the RemoteContext object.
Definition: ie_remote_context.hpp:99
const Precision & getPrecision() const
Returns the memory precision.
Definition: ie_layouts.h:242
T * as() noexcept
Casts this RemoteContext object to the type T*.
Definition: ie_remote_context.hpp:146
This class represents an Inference Engine abstraction to the memory allocated on the remote (non-CPU)...
Definition: ie_remote_context.hpp:31