24.02.1
|
CPU tensor implementation class. More...
#include <CpuTensor.h>
Public Member Functions | |
CpuTensor (IContext *ctx, const AclTensorDescriptor &desc) | |
Construct a new Cpu Tensor object. More... | |
StatusCode | allocate () |
Allocates tensor. More... | |
void * | map () override |
Map tensor to a host pointer. More... | |
StatusCode | unmap () override |
Unmap tensor. More... | |
arm_compute::ITensor * | tensor () const override |
Get the legacy tensor object. More... | |
StatusCode | import (void *handle, ImportMemoryType type) override |
Import external memory handle. More... | |
Public Member Functions inherited from ITensorV2 | |
ITensorV2 (IContext *ctx) | |
Explict Operator Constructor. More... | |
virtual | ~ITensorV2 () |
Destructor. More... | |
bool | is_valid () const |
Checks if a queue is valid. More... | |
size_t | get_size () const |
Get the size of the tensor in byte. More... | |
AclTensorDescriptor | get_descriptor () const |
Get the descriptor of this tensor. More... | |
Additional Inherited Members | |
Data Fields inherited from AclTensor_ | |
arm_compute::detail::Header | header {arm_compute::detail::ObjectType::Tensor, nullptr} |
CPU tensor implementation class.
Definition at line 36 of file CpuTensor.h.
CpuTensor | ( | IContext * | ctx, |
const AclTensorDescriptor & | desc | ||
) |
Construct a new Cpu Tensor object.
[in] | ctx | Context to be used |
[in] | desc | Tensor descriptor |
Definition at line 32 of file CpuTensor.cpp.
References ARM_COMPUTE_ASSERT, arm_compute::detail::convert_to_legacy_tensor_info(), arm_compute::Cpu, and IContext::type().
StatusCode allocate | ( | ) |
Allocates tensor.
Definition at line 51 of file CpuTensor.cpp.
References ARM_COMPUTE_ASSERT, and arm_compute::Success.
|
overridevirtual |
Import external memory handle.
[in] | handle | Memory to import |
[in] | type | Type of imported memory |
Implements ITensorV2.
Definition at line 65 of file CpuTensor.cpp.
References ARM_COMPUTE_ASSERT, ARM_COMPUTE_UNUSED, arm_compute::RuntimeError, arm_compute::Success, and type.
|
overridevirtual |
Map tensor to a host pointer.
Implements ITensorV2.
Definition at line 39 of file CpuTensor.cpp.
References ARM_COMPUTE_ASSERT, and ARM_COMPUTE_LOG_ERROR_ACL.
|
overridevirtual |
Get the legacy tensor object.
Implements ITensorV2.
Definition at line 74 of file CpuTensor.cpp.
|
overridevirtual |
Unmap tensor.
Implements ITensorV2.
Definition at line 59 of file CpuTensor.cpp.
References arm_compute::Success.