24.02.1
|
#include "arm_compute/AclEntrypoints.h"
#include "arm_compute/AclUtils.h"
#include "arm_compute/core/Error.h"
#include "src/common/ITensorV2.h"
#include "src/common/utils/Macros.h"
Go to the source code of this file.
Functions | |
AclStatus | AclCreateTensor (AclTensor *external_tensor, AclContext external_ctx, const AclTensorDescriptor *desc, bool allocate) |
Create a Tensor object. More... | |
AclStatus | AclMapTensor (AclTensor external_tensor, void **handle) |
Map a tensor's backing memory to the host. More... | |
AclStatus | AclUnmapTensor (AclTensor external_tensor, void *handle) |
Unmap the tensor's backing memory. More... | |
AclStatus | AclTensorImport (AclTensor external_tensor, void *handle, AclImportMemoryType type) |
Import external memory to a given tensor object. More... | |
AclStatus | AclDestroyTensor (AclTensor external_tensor) |
Destroy a given tensor object. More... | |
AclStatus | AclGetTensorSize (AclTensor tensor, uint64_t *size) |
__cplusplus More... | |
AclStatus | AclGetTensorDescriptor (AclTensor tensor, AclTensorDescriptor *desc) |
Get the descriptor of this tensor. More... | |
AclStatus AclCreateTensor | ( | AclTensor * | tensor, |
AclContext | ctx, | ||
const AclTensorDescriptor * | desc, | ||
bool | allocate | ||
) |
Create a Tensor object.
Tensor is a generalized matrix construct that can represent up to ND dimensionality (where N = 6 for Compute Library) The object holds a backing memory along-side to operate on
[in,out] | tensor | A valid non-zero tensor object if no failures occur |
[in] | ctx | Context to be used |
[in] | desc | Tensor representation meta-data |
[in] | allocate | Instructs allocation of the tensor objects |
Returns:
Definition at line 71 of file AclTensor.cpp.
References AclInvalidArgument, AclOutOfMemory, AclSuccess, ARM_COMPUTE_LOG_ERROR_ACL, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, IContext::create_tensor(), arm_compute::get_internal(), tensor, and arm_compute::detail::validate_internal_context().
Referenced by Tensor::Tensor().
Destroy a given tensor object.
[in,out] | tensor | A valid tensor object to be destroyed |
Returns:
Definition at line 144 of file AclTensor.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), tensor, and arm_compute::detail::validate_internal_tensor().
AclStatus AclGetTensorDescriptor | ( | AclTensor | tensor, |
AclTensorDescriptor * | desc | ||
) |
Get the descriptor of this tensor.
[in] | tensor | A tensor in interest |
[out] | desc | The descriptor of the tensor |
Definition at line 175 of file AclTensor.cpp.
References AclInvalidArgument, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, and tensor.
Referenced by Tensor::get_descriptor().
__cplusplus
Get the size of the existing tensor in byte
[in] | tensor | A tensor in interest |
[out] | size | The size of the tensor |
Definition at line 158 of file AclTensor.cpp.
References AclInvalidArgument, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, and tensor.
Referenced by Tensor::get_size().
Map a tensor's backing memory to the host.
[in] | tensor | Tensor to be mapped |
[in,out] | handle | A handle to the underlying backing memory |
Returns:
Definition at line 97 of file AclTensor.cpp.
References AclInvalidArgument, AclSuccess, ARM_COMPUTE_LOG_ERROR_ACL, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), CLTensor::map(), tensor, and arm_compute::detail::validate_internal_tensor().
Referenced by Tensor::map().
AclStatus AclTensorImport | ( | AclTensor | tensor, |
void * | handle, | ||
AclImportMemoryType | type | ||
) |
Import external memory to a given tensor object.
[in,out] | tensor | Tensor to import memory to |
[in] | handle | Backing memory to be imported |
[in] | type | Type of the imported memory |
Returns:
Definition at line 130 of file AclTensor.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), tensor, type, and arm_compute::detail::validate_internal_tensor().
Referenced by Tensor::import().
Unmap the tensor's backing memory.
[in] | tensor | tensor to unmap memory from |
[in] | handle | Backing memory to be unmapped |
Returns:
Definition at line 116 of file AclTensor.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, ARM_COMPUTE_UNUSED, arm_compute::get_internal(), tensor, CLTensor::unmap(), and arm_compute::detail::validate_internal_tensor().
Referenced by Tensor::unmap().