aboutsummaryrefslogtreecommitdiff
path: root/src/common/IContext.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-08-03 08:24:00 +0100
committerSheri Zhang <sheri.zhang@arm.com>2021-08-04 08:56:33 +0000
commit4164814a099773c0a512889473c980bc148e590f (patch)
tree7ee27bbd40724635f5bf22bc9ec28b3a1a4d1ac9 /src/common/IContext.h
parent6e90c12e3067c482524a08bf322f42de6d9d27b9 (diff)
downloadComputeLibrary-4164814a099773c0a512889473c980bc148e590f.tar.gz
Implement Operator API
Resolves: COMPMID-4512 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: Id12130365fa3fe2261160931dcc7affb6b467186 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6031 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/common/IContext.h')
-rw-r--r--src/common/IContext.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/common/IContext.h b/src/common/IContext.h
index 31f39da06d..1ae46c57de 100644
--- a/src/common/IContext.h
+++ b/src/common/IContext.h
@@ -44,6 +44,7 @@ namespace arm_compute
// Forward declarations
class ITensorV2;
class IQueue;
+class IOperator;
/**< Context interface */
class IContext : public AclContext_
@@ -53,13 +54,11 @@ 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
@@ -68,19 +67,16 @@ 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
@@ -89,7 +85,6 @@ public:
{
return _refcount;
}
-
/** Checks if an object is valid
*
* @return True if sucessful otherwise false
@@ -98,7 +93,6 @@ public:
{
return header.type == detail::ObjectType::Context;
}
-
/** Create a tensor object
*
* @param[in] desc Descriptor to use
@@ -107,7 +101,6 @@ public:
* @return A pointer to the created tensor object
*/
virtual ITensorV2 *create_tensor(const AclTensorDescriptor &desc, bool allocate) = 0;
-
/** Create a queue object
*
* @param[in] options Queue options to be used
@@ -115,6 +108,10 @@ public:
* @return A pointer to the created queue object
*/
virtual IQueue *create_queue(const AclQueueOptions *options) = 0;
+ virtual std::tuple<IOperator *, StatusCode> create_activation(const AclTensorDescriptor &src,
+ const AclTensorDescriptor &dst,
+ const AclActivationDescriptor &act,
+ bool is_validate) = 0;
private:
Target _target; /**< Target type of context */