24.02.1
|
#include <Acl.hpp>
Public Member Functions | |
Tensor (Context &ctx, const TensorDescriptor &desc, StatusCode *status=nullptr) | |
Constructor. More... | |
Tensor (Context &ctx, const TensorDescriptor &desc, bool allocate, StatusCode *status) | |
Constructor. More... | |
void * | map () |
Maps the backing memory of a given tensor that can be used by the host to access any contents. More... | |
StatusCode | unmap (void *handle) |
Unmaps tensor's memory. More... | |
StatusCode | import (void *handle, ImportType type) |
Import external memory to a given tensor object. More... | |
uint64_t | get_size () |
Get the size of the tensor in byte. More... | |
TensorDescriptor | get_descriptor () |
Get the descriptor of this tensor. More... | |
Public Member Functions inherited from ObjectBase< AclTensor_ > | |
~ObjectBase ()=default | |
Destructor. More... | |
ObjectBase (const ObjectBase< AclTensor_ > &)=default | |
Copy constructor. More... | |
ObjectBase (ObjectBase< AclTensor_ > &&)=default | |
Move Constructor. More... | |
ObjectBase< AclTensor_ > & | operator= (const ObjectBase< AclTensor_ > &)=default |
Copy assignment operator. More... | |
ObjectBase< AclTensor_ > & | operator= (ObjectBase< AclTensor_ > &&)=default |
Move assignment operator. More... | |
void | reset (AclTensor_ *val) |
Reset object value. More... | |
const AclTensor_ * | get () const |
Access uderlying object. More... | |
AclTensor_ * | get () |
Access uderlying object. More... | |
Tensor class.
Tensor is an mathematical construct that can represent an N-Dimensional space.
|
inline |
|
inline |
Constructor.
[in] | ctx | Context from where the tensor will be created from |
[in] | desc | Tensor descriptor to be used |
[in] | allocate | Flag to indicate if the tensor needs to be allocated |
[out] | status | Status information if requested |
Definition at line 601 of file Acl.hpp.
References AclCreateTensor(), ObjectBase< T >::get(), TensorDescriptor::get(), ObjectBase< AclTensor_ >::reset(), and tensor.
|
inline |
Get the descriptor of this tensor.
Definition at line 666 of file Acl.hpp.
References AclGetTensorDescriptor().
|
inline |
Get the size of the tensor in byte.
Definition at line 655 of file Acl.hpp.
References AclGetTensorSize().
|
inline |
Import external memory to a given tensor object.
[in] | handle | External memory handle |
[in] | type | Type of memory to be imported |
Definition at line 642 of file Acl.hpp.
References AclTensorImport(), and type.
|
inline |
Maps the backing memory of a given tensor that can be used by the host to access any contents.
Definition at line 616 of file Acl.hpp.
References AclMapTensor().
|
inline |
Unmaps tensor's memory.
[in] | handle | Handle to unmap |
Definition at line 629 of file Acl.hpp.
References AclUnmapTensor().