24.02.1
|
Go to the documentation of this file.
35 _legacy_tensor = std::make_unique<Tensor>();
43 if (_legacy_tensor ==
nullptr)
48 return _legacy_tensor->buffer();
55 _legacy_tensor->allocator()->allocate();
70 const auto st = _legacy_tensor->allocator()->import_memory(handle);
76 return _legacy_tensor.get();
Base class specifying the tensor interface.
StatusCode import(void *handle, ImportMemoryType type) override
Import external memory handle.
decltype(strategy::transforms) typedef type
void * map() override
Map tensor to a host pointer.
arm_compute::ITensor * tensor() const override
Get the legacy tensor object.
Target type() const
Target type accessor.
#define ARM_COMPUTE_LOG_ERROR_ACL(msg)
Interface for CPU tensor.
CpuTensor(IContext *ctx, const AclTensorDescriptor &desc)
Construct a new Cpu Tensor object.
StatusCode unmap() override
Unmap tensor.
#define ARM_COMPUTE_ASSERT(cond)
#define ARM_COMPUTE_UNUSED(...)
To avoid unused variables warnings.
TensorInfo convert_to_legacy_tensor_info(const AclTensorDescriptor &desc)
Convert a descriptor to a legacy format one.
Copyright (c) 2017-2024 Arm Limited.
StatusCode allocate()
Allocates tensor.