7 #include <arm_compute/core/CL/ICLTensor.h> 8 #include <arm_compute/core/ITensorInfo.h> 16 ICLTensorProxy(arm_compute::ICLTensor* iclTensor) : m_DelegateTensor(iclTensor) {}
22 void set(arm_compute::ICLTensor* iclTensor)
24 if(iclTensor !=
nullptr)
26 m_DelegateTensor = iclTensor;
31 arm_compute::ITensorInfo*
info()
const 33 ARM_COMPUTE_ERROR_ON(m_DelegateTensor ==
nullptr);
34 return m_DelegateTensor->info();
37 arm_compute::ITensorInfo*
info()
39 ARM_COMPUTE_ERROR_ON(m_DelegateTensor ==
nullptr);
40 return m_DelegateTensor->info();
45 ARM_COMPUTE_ERROR_ON(m_DelegateTensor ==
nullptr);
46 return m_DelegateTensor->buffer();
51 ARM_COMPUTE_ERROR_ON(m_DelegateTensor ==
nullptr);
52 return m_DelegateTensor->quantization();
57 ARM_COMPUTE_ERROR_ON(m_DelegateTensor ==
nullptr);
58 return m_DelegateTensor->cl_buffer();
62 uint8_t*
do_map(cl::CommandQueue& q,
bool blocking)
64 ARM_COMPUTE_ERROR_ON(m_DelegateTensor ==
nullptr);
65 m_DelegateTensor->map(q, blocking);
66 return m_DelegateTensor->buffer();
70 ARM_COMPUTE_ERROR_ON(m_DelegateTensor ==
nullptr);
71 return m_DelegateTensor->unmap(q);
75 arm_compute::ICLTensor* m_DelegateTensor{
nullptr };
ICLTensorProxy & operator=(const ICLTensorProxy &)=delete
ICLTensorProxy(arm_compute::ICLTensor *iclTensor)
Copyright (c) 2021 ARM Limited and Contributors.
arm_compute::CLQuantization quantization() const
const cl::Buffer & cl_buffer() const
arm_compute::ITensorInfo * info()
arm_compute::ITensorInfo * info() const
uint8_t * do_map(cl::CommandQueue &q, bool blocking)
void do_unmap(cl::CommandQueue &q)