aboutsummaryrefslogtreecommitdiff
path: root/tests/NEON
diff options
context:
space:
mode:
Diffstat (limited to 'tests/NEON')
-rw-r--r--tests/NEON/Helper.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/NEON/Helper.h b/tests/NEON/Helper.h
index 4efab17fca..8bd11cc57b 100644
--- a/tests/NEON/Helper.h
+++ b/tests/NEON/Helper.h
@@ -25,6 +25,8 @@
#define __ARM_COMPUTE_TEST_NEON_HELPER_H__
#include "arm_compute/runtime/Array.h"
+#include "arm_compute/runtime/NEON/INESimpleFunction.h"
+#include "support/ToolchainSupport.h"
#include "tests/Globals.h"
#include <algorithm>
@@ -48,6 +50,20 @@ void fill_tensors(D &&dist, std::initializer_list<int> seeds, T &&tensor, Ts &&.
}
}
+// This template synthetizes an INESimpleFunction which runs the given kernel K
+template <typename K>
+class NESynthetizeFunction : public INESimpleFunction
+{
+public:
+ template <typename... Args>
+ void configure(Args &&... args)
+ {
+ auto k = arm_compute::support::cpp14::make_unique<K>();
+ k->configure(std::forward<Args>(args)...);
+ _kernel = std::move(k);
+ }
+};
+
} // namespace test
} // namespace arm_compute
#endif /* __ARM_COMPUTE_TEST_NEON_HELPER_H__ */