24 #ifndef ARM_COMPUTE_CPU_UTILS_CPU_AUX_TENSOR_HANDLER_H 25 #define ARM_COMPUTE_CPU_UTILS_CPU_AUX_TENSOR_HANDLER_H 51 ITensor *packed_tensor = utils::cast::polymorphic_downcast<ITensor *>(pack.
get_tensor(slot_id));
63 _injected_tensor_pack = &
pack;
64 _injected_slot_id = slot_id;
88 if(_injected_tensor_pack)
CpuAuxTensorHandler(int slot_id, TensorInfo &info, ITensorPack &pack, bool pack_inject=false, bool bypass_alloc=false)
void soft_init(TensorInfo &input, size_t alignment=0)
Initialize a tensor based with a reference TensorInfo.
#define ARM_COMPUTE_LOG_INFO_WITH_FUNCNAME_ACL(msg)
Log an information message to the logger with function name before the message.
Interface for CPU tensor.
Copyright (c) 2017-2021 Arm Limited.
TensorAllocator * allocator()
Return a pointer to the tensor's allocator.
void remove_tensor(int id)
Remove the tensor stored with the given id.
CpuAuxTensorHandler & operator=(const CpuAuxTensorHandler)=delete
size_t total_size() const override
Returns the total size of the tensor in bytes.
virtual uint8_t * buffer() const =0
Interface to be implemented by the child class to return a pointer to CPU memory. ...
void allocate() override
Allocate size specified by TensorInfo of CPU memory.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
Basic implementation of the tensor interface.
ScaleKernelInfo info(interpolation_policy, default_border_mode, PixelValue(), sampling_policy, false)
ITensor * get_tensor(int id)
Get tensor of a given id from the pac.
virtual size_t total_size() const =0
Returns the total size of the tensor in bytes.
CpuAuxTensorHandler(TensorInfo &info, ITensor &tensor)
Status import_memory(void *memory)
Import an existing memory as a tensor's backing memory.
Store the tensor's metadata.
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.