This class represents an abstraction for GPU plugin remote blob which can be shared with user-supplied OpenCL buffer. The plugin object derived from this class can be obtained with CreateBlob() call.
More...
|
| ClBufferBlob (const TensorDesc &tensorDesc) |
| Creates a ClBufferBlob object with the specified dimensions and layout. More...
|
|
cl_mem | get () |
| Returns the underlying OpenCL memory object handle.
|
|
| operator cl_mem () |
| OpenCL memory handle conversion operator.
|
|
| operator cl::Buffer () |
| Standard Khronos cl::Buffer wrapper conversion operator. More...
|
|
| ClBlob (const TensorDesc &tensorDesc) |
| Creates a ClBlob object with the specified dimensions and layout. More...
|
|
virtual | ~RemoteBlob ()=default |
| RemoteBlob virtual destructor.
|
|
| RemoteBlob (const TensorDesc &tensorDesc) |
| Constructor. Creates an empty RemoteBlob object with the specified precision. More...
|
|
size_t | element_size () const noexcept override |
| Returns the number of bytes per element.
|
|
virtual ParamMap | getParams () const =0 |
| Returns a map of device-specific parameters required for low-level operations with underlying object. Parameters include device/context/surface/buffer handles, access flags, etc. Contents of the map returned depend on remote execution context that is currently set on the device (working scenario). Abstract method. More...
|
|
virtual std::string | getDeviceName () const noexcept=0 |
| Returns name of the device on which underlying object is allocated. Abstract method. More...
|
|
virtual std::shared_ptr< RemoteContext > | getContext () const noexcept=0 |
| Returns device context which underlying object belongs to. Abstract method. More...
|
|
virtual | ~MemoryBlob () |
| MemoryBlob virtual destructor.
|
|
| MemoryBlob (const TensorDesc &tensorDesc) |
| Constructor. Creates an empty MemoryBlob object with the specified precision. More...
|
|
const TensorDesc & | getTensorDesc () const noexcept override |
| Returns the tensor description.
|
|
TensorDesc & | getTensorDesc () noexcept override |
| Returns the tensor description.
|
|
size_t | size () const noexcept override |
| Returns the total number of elements, which is a product of all the dimensions. More...
|
|
size_t | byteSize () const noexcept override |
| Returns the size of the current Blob in bytes calculated as size() * element_size() . More...
|
|
void | allocate () noexcept override=0 |
| Allocates memory to store the data. More...
|
|
bool | deallocate () noexcept override=0 |
| Releases previously allocated data. More...
|
|
LockedMemory< void > | buffer () noexcept override=0 |
| Gets access to the allocated memory. More...
|
|
LockedMemory< const void > | cbuffer () const noexcept override=0 |
| Gets read-only access to the allocated memory. More...
|
|
virtual LockedMemory< void > | rwmap () noexcept=0 |
| Gets read/write access to the memory in virtual space of the process. The function returns object which retains mapped memory. The memory been addressed in the MemoryBlob in general case can be allocated on remote device. This function maps remote memory to the memory in the virtual process space and after destruction of the LockedMemory will upload changed content to the accelerator. More...
|
|
virtual LockedMemory< const void > | rmap () const noexcept=0 |
| Gets read only access to the memory in virtual space of the process. The function returns object which retains mapped memory. More...
|
|
virtual LockedMemory< void > | wmap () noexcept=0 |
| Gets "write only direction" access to the memory in virtual space of the process. The function returns object which retains memory to be uploaded on device. More...
|
|
virtual | ~Blob () |
| Blob virtual destructor.
|
|
template<typename T , typename std::enable_if<!std::is_pointer< T >::value &&!std::is_reference< T >::value, int >::type = 0, typename std::enable_if< std::is_base_of< Blob, T >::value, int >::type = 0> |
bool | is () noexcept |
| Checks if the Blob object can be cast to the type T*. More...
|
|
template<typename T , typename std::enable_if<!std::is_pointer< T >::value &&!std::is_reference< T >::value, int >::type = 0, typename std::enable_if< std::is_base_of< Blob, T >::value, int >::type = 0> |
bool | is () const noexcept |
| Checks if the Blob object can be cast to the type const T*. More...
|
|
template<typename T , typename std::enable_if<!std::is_pointer< T >::value &&!std::is_reference< T >::value, int >::type = 0, typename std::enable_if< std::is_base_of< Blob, T >::value, int >::type = 0> |
T * | as () noexcept |
| Casts this Blob object to the type T*. More...
|
|
template<typename T , typename std::enable_if<!std::is_pointer< T >::value &&!std::is_reference< T >::value, int >::type = 0, typename std::enable_if< std::is_base_of< Blob, T >::value, int >::type = 0> |
const T * | as () const noexcept |
| Casts this Blob object to the type const T*. More...
|
|
| Blob (const TensorDesc &tensorDesc) |
| Constructor. Creates an empty Blob object with the specified precision. More...
|
|
virtual Blob::Ptr | createROI (const ROI &roi) const |
| Creates a blob describing given ROI object based on the current blob with memory sharing. More...
|
|
|
static Ptr | CreateFromData (const DataPtr &data) |
| Creates a TBlob<> object from a Data node. More...
|
|
const std::shared_ptr< IAllocator > & | getAllocator () const noexcept override=0 |
| Gets the allocator for allocator-based blobs. More...
|
|
void * | getHandle () const noexcept override=0 |
| Gets the handle to allocated memory. More...
|
|
template<typename Result , typename Tmp > |
Result | _ObjFromParams (const ParamMap ¶ms, const std::string &handle_Key, const std::string &type_Key, const std::string &obj_T1, const std::string &obj_T2="__") const |
| Template function that returns specified object parameter typecasted to desired user type.
|
|
template<typename Result > |
Result | _ObjFromParamSimple (const ParamMap ¶ms, const std::string &handle_Key) const |
| Same as _ObjFromParams(), but should be used if check for object type is not required.
|
|
std::string | _StrFromParams (const ParamMap ¶ms, std::string Key) const |
| Template function that extracts string value from map entry under specified key.
|
|
static size_t | product (const SizeVector &dims) noexcept |
| Multiplies the dimension vector values. More...
|
|
TensorDesc | tensorDesc |
| The tensor descriptor of the given blob.
|
|