36 _legacy_tensor = std::make_unique<Tensor>();
44 if(_legacy_tensor ==
nullptr)
49 return _legacy_tensor->buffer();
56 _legacy_tensor->allocator()->allocate();
71 const auto st = _legacy_tensor->allocator()->import_memory(handle);
77 return _legacy_tensor.get();
#define ARM_COMPUTE_ASSERT(cond)
Base class specifying the tensor interface.
TensorInfo convert_to_legacy_tensor_info(const AclTensorDescriptor &desc)
Convert a descriptor to a legacy format one.
#define ARM_COMPUTE_LOG_ERROR_ACL(msg)
Log an error message to the logger.
decltype(strategy::transforms) typedef type
Interface for CPU tensor.
Copyright (c) 2017-2022 Arm Limited.
void * map() override
Map tensor to a host pointer.
StatusCode allocate()
Allocates tensor.
CpuTensor(IContext *ctx, const AclTensorDescriptor &desc)
Construct a new Cpu Tensor object.
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
arm_compute::ITensor * tensor() const override
Get the legacy tensor object.
StatusCode unmap() override
Unmap tensor.
Target type() const
Target type accessor.
StatusCode import(void *handle, ImportMemoryType type) override
Import external memory handle.