24 #ifndef ARM_COMPUTE_CL_UTILS_CL_AUX_TENSOR_HANDLER_H 25 #define ARM_COMPUTE_CL_UTILS_CL_AUX_TENSOR_HANDLER_H 51 ICLTensor *packed_tensor = utils::cast::polymorphic_downcast<ICLTensor *>(pack.
get_tensor(slot_id));
63 _injected_tensor_pack = &
pack;
64 _injected_slot_id = slot_id;
88 if(_injected_tensor_pack)
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.
CLTensorAllocator * allocator()
Return a pointer to the tensor's allocator.
Copyright (c) 2017-2021 Arm Limited.
Status import_memory(cl::Buffer buffer)
Import an existing memory as a tensor's backing memory.
void remove_tensor(int id)
Remove the tensor stored with the given id.
size_t total_size() const override
Returns the total size of the tensor in bytes.
virtual ITensorInfo * info() const =0
Interface to be implemented by the child class to return the tensor's metadata.
CLAuxTensorHandler & operator=(const CLAuxTensorHandler)=delete
void allocate() override
Allocate size specified by TensorInfo of OpenCL memory.
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.
Interface for OpenCL tensor.
CLAuxTensorHandler(int slot_id, TensorInfo &info, ITensorPack &pack, bool pack_inject=false, bool bypass_alloc=false)
virtual size_t total_size() const =0
Returns the total size of the tensor in bytes.
virtual const cl::Buffer & cl_buffer() const =0
Interface to be implemented by the child class to return a reference to the OpenCL buffer containing ...
Store the tensor's metadata.
CLAuxTensorHandler(TensorInfo &info, ICLTensor &tensor)
void add_tensor(int id, ITensor *tensor)
Add tensor to the pack.
Basic implementation of the OpenCL tensor interface.