24.02.1
|
#include "arm_compute/AclTypes.h"
Go to the source code of this file.
Functions | |
AclStatus | AclCreateContext (AclContext *ctx, AclTarget target, const AclContextOptions *options) |
__cplusplus More... | |
AclStatus | AclDestroyContext (AclContext ctx) |
Destroy a given context object. More... | |
AclStatus | AclCreateQueue (AclQueue *queue, AclContext ctx, const AclQueueOptions *options) |
Create an operator queue. More... | |
AclStatus | AclQueueFinish (AclQueue queue) |
Wait until all elements on the queue have been completed. More... | |
AclStatus | AclDestroyQueue (AclQueue queue) |
Destroy a given queue object. More... | |
AclStatus | AclCreateTensor (AclTensor *tensor, AclContext ctx, const AclTensorDescriptor *desc, bool allocate) |
Create a Tensor object. More... | |
AclStatus | AclMapTensor (AclTensor tensor, void **handle) |
Map a tensor's backing memory to the host. More... | |
AclStatus | AclUnmapTensor (AclTensor tensor, void *handle) |
Unmap the tensor's backing memory. More... | |
AclStatus | AclTensorImport (AclTensor tensor, void *handle, AclImportMemoryType type) |
Import external memory to a given tensor object. More... | |
AclStatus | AclDestroyTensor (AclTensor tensor) |
Destroy a given tensor object. More... | |
AclStatus | AclCreateTensorPack (AclTensorPack *pack, AclContext ctx) |
Creates a tensor pack. More... | |
AclStatus | AclPackTensor (AclTensorPack pack, AclTensor tensor, int32_t slot_id) |
Add a tensor to a tensor pack. More... | |
AclStatus | AclPackTensors (AclTensorPack pack, AclTensor *tensors, int32_t *slot_ids, size_t num_tensors) |
A list of tensors to a tensor pack. More... | |
AclStatus | AclDestroyTensorPack (AclTensorPack pack) |
Destroy a given tensor pack object. More... | |
AclStatus | AclRunOperator (AclOperator op, AclQueue queue, AclTensorPack tensors) |
Eager execution of a given operator on a list of inputs and outputs. More... | |
AclStatus | AclDestroyOperator (AclOperator op) |
Destroy a given operator object. More... | |
AclStatus AclCreateContext | ( | AclContext * | ctx, |
AclTarget | target, | ||
const AclContextOptions * | options | ||
) |
__cplusplus
Create a context object
Context is responsible for retaining internal information and work as an aggregate service mechanism
[in,out] | ctx | A valid non-zero context object if no failure occurs |
[in] | target | Target to create the context for |
[in] | options | Context options to be used for all the kernels that are created under the context |
Returns:
Definition at line 79 of file AclContext.cpp.
References AclInvalidArgument, AclOutOfMemory, AclSuccess, AclUnsupportedTarget, and ARM_COMPUTE_LOG_ERROR_WITH_FUNCNAME_ACL.
Referenced by Context::Context(), and arm_compute::test::validation::TEST_CASE().
AclStatus AclCreateQueue | ( | AclQueue * | queue, |
AclContext | ctx, | ||
const AclQueueOptions * | options | ||
) |
Create an operator queue.
Queue is responsible for any scheduling related activities
[in,out] | queue | A valid non-zero queue object is not failures occur |
[in] | ctx | Context to be used |
[in] | options | Queue options to be used for the operators using the queue |
Returns:
Definition at line 45 of file AclQueue.cpp.
References AclInvalidArgument, AclOutOfMemory, AclSuccess, ARM_COMPUTE_LOG_ERROR_ACL, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), and arm_compute::detail::validate_internal_context().
Referenced by Queue::Queue().
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().
AclStatus AclCreateTensorPack | ( | AclTensorPack * | pack, |
AclContext | ctx | ||
) |
Creates a tensor pack.
Tensor packs are used to create a collection of tensors that can be passed around for operator execution
[in,out] | pack | A valid non-zero tensor pack object if no failures occur |
[in] | ctx | Context to be used |
Returns:
Definition at line 51 of file AclTensorPack.cpp.
References AclOutOfMemory, AclSuccess, ARM_COMPUTE_LOG_ERROR_WITH_FUNCNAME_ACL, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), arm_compute::test::validation::pack, and arm_compute::detail::validate_internal_context().
Referenced by TensorPack::TensorPack().
AclStatus AclDestroyContext | ( | AclContext | ctx | ) |
Destroy a given context object.
[in] | ctx | A valid context object to destroy |
Returns:
Definition at line 104 of file AclContext.cpp.
References ARM_COMPUTE_LOG_ERROR_WITH_FUNCNAME_ACL, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), IContext::refcount(), and arm_compute::detail::validate_internal_context().
AclStatus AclDestroyOperator | ( | AclOperator | op | ) |
Destroy a given operator object.
[in,out] | op | A valid operator object to destroy |
Returns:
Definition at line 53 of file AclOperator.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), and arm_compute::detail::validate_internal_operator().
Destroy a given queue object.
[in] | queue | A valid context object to destroy |
Returns:
Definition at line 87 of file AclQueue.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), and arm_compute::detail::validate_internal_queue().
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 AclDestroyTensorPack | ( | AclTensorPack | pack | ) |
Destroy a given tensor pack object.
[in,out] | pack | A valid tensor pack object to destroy |
Returns:
Definition at line 96 of file AclTensorPack.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), arm_compute::test::validation::pack, and arm_compute::detail::validate_internal_pack().
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 AclPackTensor | ( | AclTensorPack | pack, |
AclTensor | tensor, | ||
int32_t | slot_id | ||
) |
Add a tensor to a tensor pack.
[in,out] | pack | Pack to append a tensor to |
[in] | tensor | Tensor to pack |
[in] | slot_id | Slot of the operator that the tensors corresponds to |
Returns:
Definition at line 71 of file AclTensorPack.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), arm_compute::test::validation::pack, and arm_compute::detail::validate_internal_pack().
Referenced by TensorPack::add().
AclStatus AclPackTensors | ( | AclTensorPack | pack, |
AclTensor * | tensors, | ||
int32_t * | slot_ids, | ||
size_t | num_tensors | ||
) |
A list of tensors to a tensor pack.
[in,out] | pack | Pack to append the tensors to |
[in] | tensors | Tensors to append to the pack |
[in] | slot_ids | Slot IDs of each tensors to the operators |
[in] | num_tensors | Number of tensors that are passed |
Returns:
Definition at line 82 of file AclTensorPack.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), arm_compute::test::validation::pack, and arm_compute::detail::validate_internal_pack().
Referenced by TensorPack::add().
Wait until all elements on the queue have been completed.
[in] | queue | Queue to wait on completion |
Returns:
Definition at line 72 of file AclQueue.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), and arm_compute::detail::validate_internal_queue().
Referenced by Queue::finish().
AclStatus AclRunOperator | ( | AclOperator | op, |
AclQueue | queue, | ||
AclTensorPack | tensors | ||
) |
Eager execution of a given operator on a list of inputs and outputs.
[in] | op | Operator to execute |
[in] | queue | Queue to schedule the operator on |
[in,out] | tensors | A list of input and outputs tensors to execute the operator on |
Returns:
Definition at line 31 of file AclOperator.cpp.
References AclSuccess, ARM_COMPUTE_RETURN_CENUM_ON_FAILURE, arm_compute::get_internal(), arm_compute::test::validation::pack, arm_compute::Success, arm_compute::detail::validate_internal_operator(), arm_compute::detail::validate_internal_pack(), and arm_compute::detail::validate_internal_queue().
Referenced by Operator::run().
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().