24.02.1
|
Tensor packing service. More...
#include <TensorPack.h>
Public Member Functions | |
TensorPack (IContext *ctx) | |
Constructor. More... | |
~TensorPack () | |
Destructor. More... | |
AclStatus | add_tensor (ITensorV2 *tensor, int32_t slot_id) |
Add tensor to the pack. More... | |
size_t | size () const |
Pack size accessor. More... | |
bool | empty () const |
Checks if pack is empty. More... | |
bool | is_valid () const |
Checks if an object is valid. More... | |
arm_compute::ITensor * | get_tensor (int32_t slot_id) |
Get tensor of a given id from the pac. More... | |
arm_compute::ITensorPack & | get_tensor_pack () |
Get legacy tensor pack. More... | |
Additional Inherited Members | |
Data Fields inherited from AclTensorPack_ | |
arm_compute::detail::Header | header {arm_compute::detail::ObjectType::TensorPack, nullptr} |
Tensor packing service.
Class is responsible for creating and managing a collection of tensors. Tensor packs can be passed to operators to be part of the mutable data of the execution.
Definition at line 51 of file TensorPack.h.
|
explicit |
Constructor.
[in] | ctx | Context to be used |
Definition at line 31 of file TensorPack.cpp.
References ARM_COMPUTE_ASSERT_NOT_NULLPTR, Header::ctx, AclTensorPack_::header, and IContext::inc_ref().
~TensorPack | ( | ) |
Destructor.
Definition at line 38 of file TensorPack.cpp.
References Header::ctx, IContext::dec_ref(), AclTensorPack_::header, arm_compute::detail::Invalid, and Header::type.
Add tensor to the pack.
[in] | tensor | Tensor to add |
[in] | slot_id | Slot identification in respect to the operator of the tensor to add |
Definition at line 44 of file TensorPack.cpp.
References AclSuccess, ITensorPack::add_tensor(), and tensor.
bool empty | ( | ) | const |
Checks if pack is empty.
Definition at line 55 of file TensorPack.cpp.
References ITensorPack::empty().
arm_compute::ITensor * get_tensor | ( | int32_t | slot_id | ) |
Get tensor of a given id from the pac.
[in] | slot_id | Slot identification of tensor to extract |
Definition at line 65 of file TensorPack.cpp.
References ITensorPack::get_tensor().
arm_compute::ITensorPack & get_tensor_pack | ( | ) |
bool is_valid | ( | ) | const |
Checks if an object is valid.
Definition at line 60 of file TensorPack.cpp.
References AclTensorPack_::header, arm_compute::detail::TensorPack, and Header::type.
size_t size | ( | ) | const |
Pack size accessor.
Definition at line 50 of file TensorPack.cpp.
References ITensorPack::size().