diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-03-18 10:59:40 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2021-04-28 17:05:40 +0000 |
commit | c3c352e60050f3deacad767e429a88dc24b31af0 (patch) | |
tree | ad30a0ba717a742caf5e4dcb9d89389cfdc134b0 /src/common/IContext.h | |
parent | e2535154fa34ac0290ec3daaa44545be0b2b4606 (diff) | |
download | ComputeLibrary-c3c352e60050f3deacad767e429a88dc24b31af0.tar.gz |
Add Queue support
Queues are responsible for scheduling operators and performing other
runtime related activities like for example tuning.
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: I0366d9048470d277b8cbf59fa42f95c0ae57c5c9
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5487
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/common/IContext.h')
-rw-r--r-- | src/common/IContext.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/common/IContext.h b/src/common/IContext.h index ee234795cf..31f39da06d 100644 --- a/src/common/IContext.h +++ b/src/common/IContext.h @@ -43,6 +43,7 @@ namespace arm_compute { // Forward declarations class ITensorV2; +class IQueue; /**< Context interface */ class IContext : public AclContext_ @@ -52,11 +53,13 @@ public: : AclContext_(), _target(target), _refcount(0) { } + /** Virtual Destructor */ virtual ~IContext() { header.type = detail::ObjectType::Invalid; }; + /** Target type accessor * * @return Target that the context is associated with @@ -65,16 +68,19 @@ public: { return _target; } + /** Increment context refcount */ void inc_ref() const { ++_refcount; } + /** Decrement context refcount */ void dec_ref() const { --_refcount; } + /** Reference counter accessor * * @return The number of references pointing to this object @@ -83,6 +89,7 @@ public: { return _refcount; } + /** Checks if an object is valid * * @return True if sucessful otherwise false @@ -91,6 +98,7 @@ public: { return header.type == detail::ObjectType::Context; } + /** Create a tensor object * * @param[in] desc Descriptor to use @@ -100,6 +108,14 @@ public: */ virtual ITensorV2 *create_tensor(const AclTensorDescriptor &desc, bool allocate) = 0; + /** Create a queue object + * + * @param[in] options Queue options to be used + * + * @return A pointer to the created queue object + */ + virtual IQueue *create_queue(const AclQueueOptions *options) = 0; + private: Target _target; /**< Target type of context */ mutable std::atomic<int> _refcount; /**< Reference counter */ |