|
|
TBlob (const TensorDesc &tensorDesc) |
|
Creates a TBlob object with the specified dimensions and layout but does not allocate the memory. Use the allocate() method to allocate memory. More...
|
|
|
TBlob (const TensorDesc &tensorDesc, T *ptr, size_t data_size=0) |
|
The constructor creates a TBlob object with the specified dimensions and layout on the pre-allocated memory. The allocate() call is not required. More...
|
|
|
TBlob (const TensorDesc &tensorDesc, const std::shared_ptr< IAllocator > &alloc) |
|
Creates a TBlob object with the specified dimensions, layout and custom memory allocator but does not allocate the memory. More...
|
|
|
TBlob (Precision p, Layout l) |
|
Creates a TBlob object with the specified precision and type, but does not allocate the memory. Use the allocate() method to allocate memory. More...
|
|
|
TBlob (Precision p, Layout l, const SizeVector &dims) |
|
Creates a TBlob object with the specified dimensions but does not allocate the memory. Use the allocate() method to allocate memory. More...
|
|
|
TBlob (Precision p, Layout l, const SizeVector &dims, T *ptr, size_t data_size=0) |
|
The constructor creates a TBlob object with the specified dimensions on the pre-allocated memory. Therefore, the allocate() call is not required. More...
|
|
|
TBlob (Precision p, Layout l, const SizeVector &dims, std::shared_ptr< IAllocator > alloc) |
|
Constructor. Creates a TBlob object with the specified precision, layout, dimensions and custom memory allocator. More...
|
|
|
TBlob (const TBlob< T > &blob) |
|
The copy constructor data is reallocated and copied from the source to the target blob. More...
|
|
|
TBlob (TBlob< T > &&blob) |
|
A move constructor. More...
|
|
TBlob & |
operator= (const TBlob &blob) |
|
Copy operator for the TBlob object. More...
|
|
virtual |
~TBlob () |
|
Virtual destructor.
|
|
size_t |
element_size () const noexcept override |
|
Gets the size of the given type. More...
|
|
virtual LockedMemory< T > |
data () noexcept |
|
Creates an new empty rvalue LockedMemory object. More...
|
|
virtual LockedMemory< const T > |
readOnly () const noexcept |
|
Creates a new empty rvalue read-only LockedMemory object. More...
|
|
void |
set (const std::vector< T > &that) |
|
Copies data from the given vector to the blob. More...
|
|
void |
allocate () noexcept override |
|
Allocates or reallocates memory.
|
|
bool |
deallocate () noexcept override |
|
Frees all allocated data.
|
|
LockedMemory< void > |
buffer () noexcept override |
|
Creates a new LockedMemory instance holding void pointer. More...
|
|
LockedMemory< const void > |
cbuffer () const noexcept override |
|
Creates a new LockedMemory instance holding constant void pointer. More...
|
|
details::BlobIterator< T > |
begin () |
|
Gets BlobIterator for the data. Enables a ranged loop support for the TBlob object. More...
|
|
details::BlobIterator< T > |
end () |
|
Gets BlobIterator for the end of data. Enables a ranged loop support for the TBlob object. More...
|
|
details::BlobIterator< const T > |
begin () const |
|
Gets a const BlobIterator for the read-only data. Enables a ranged loop support for the TBlob object. More...
|
|
details::BlobIterator< const T > |
end () const |
|
Gets a const BlobIterator for the end of read-only data. Enables a ranged loop support for the TBlob object. More...
|
|
virtual |
~MemoryBlob ()=default |
|
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.
|
|
size_t |
byteSize () const noexcept override |
|
Returns the size of the current Blob in bytes.
|
|
Precision |
type () const noexcept |
|
Returns the tensor precision of the current Blob object. More...
|
|
Precision |
precision () const noexcept |
|
Returns the tensor precision of the current Blob object. More...
|
|
Layout |
layout () const noexcept |
|
Returns the tensor layout of the current Blob object. More...
|
|
virtual |
~Blob ()=default |
|
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*. Use InferenceEngine::as() to operate with shared Blob objects instead of raw pointers. 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*. Use InferenceEngine::as() to operate with shared Blob objects instead of raw pointers. More...
|
|
|
Blob (const TensorDesc &tensorDesc) |
|
Constructor. Creates an empty Blob object with the specified precision. More...
|
|
|
Blob (Precision p) |
|
Constructor. Creates an empty Blob object with the specified precision. More...
|
|
|
Blob (Precision p, Layout l) |
|
The constructor creates an empty Blob object with the specified precision and layout. More...
|
|
|
Blob (Precision p, const SizeVector &dims) |
|
The constructor creates an empty Blob object with the specified precision and dimensions. More...
|
|
|
Blob (Precision p, Layout l, const SizeVector &dims) |
|
The constructor creates an empty Blob object with the specified precision, layout and dimensions. More...
|
|
size_t |
Resize (const SizeVector &dims, Layout layout=Layout::ANY) noexcept |
|
Changes Tensor size to the specified dimensions. If it was allocated, the previous data is deallocated and lost. More...
|
|
size_t |
Reshape (const SizeVector &dims, Layout layout=Layout::ANY) noexcept |
|
Changes tensor size to the specified dimensions without changing memory. The total size remains unchanged as well as the memory layout. More...
|
|
const SizeVector |
dims () const noexcept |
|
Returns the tensor dimensions vector with reversed order. More...
|
|
template<typename T, typename = std::enable_if<std::is_pod<T>::value>>
class InferenceEngine::TBlob< T, typename >
Represents real host memory allocated for a Tensor/Blob per C type.