aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/runtime/IFunction.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-05-02 14:07:55 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:51:17 +0000
commite043767d068da389308507011d944e6db9e4d676 (patch)
tree30c8965d8d03d141c7630420c6e945f78485efc7 /arm_compute/runtime/IFunction.h
parent019634f8befde24b19bae9b749e75a9f3ae44801 (diff)
downloadComputeLibrary-e043767d068da389308507011d944e6db9e4d676.tar.gz
COMPMID-920: Introduce prepare() stage
Change-Id: I08ddb7f6e061178e7566518b48e4e18f8f078596 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129825 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'arm_compute/runtime/IFunction.h')
-rw-r--r--arm_compute/runtime/IFunction.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/arm_compute/runtime/IFunction.h b/arm_compute/runtime/IFunction.h
index a4e7ed15e0..f64b2be998 100644
--- a/arm_compute/runtime/IFunction.h
+++ b/arm_compute/runtime/IFunction.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2017 ARM Limited.
+ * Copyright (c) 2016-2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -30,6 +30,8 @@ namespace arm_compute
class IFunction
{
public:
+ /** Destructor */
+ virtual ~IFunction() = default;
/** Run the kernels contained in the function
*
* For NEON kernels:
@@ -43,12 +45,18 @@ public:
* - The queue is then flushed.
*
* @note The function will not block until the kernels are executed. It is the user's responsibility to wait.
+ * @note Will call prepare() on first run if hasn't been done
*/
virtual void run() = 0;
- /** Destructor
+ /** Prepare the function for executing
+ *
+ * Any one off pre-processing step required by the function is handled here
*
+ * @note Prepare stage might not need all the function's buffers' backing memory to be available in order to execute
*/
- virtual ~IFunction() = default;
+ virtual void prepare()
+ {
+ }
};
}
#endif /*__ARM_COMPUTE_IFUNCTION_H__ */