aboutsummaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
Diffstat (limited to 'tests/framework')
-rw-r--r--tests/framework/Framework.cpp2
-rw-r--r--tests/framework/ParametersLibrary.cpp19
-rw-r--r--tests/framework/ParametersLibrary.h15
3 files changed, 28 insertions, 8 deletions
diff --git a/tests/framework/Framework.cpp b/tests/framework/Framework.cpp
index 5d1600e083..0b2ded8a3c 100644
--- a/tests/framework/Framework.cpp
+++ b/tests/framework/Framework.cpp
@@ -576,7 +576,7 @@ bool Framework::run()
}
if(parameters)
{
- parameters->set_gpu_ctx(std::move(cl_ctx));
+ parameters->set_cl_ctx(std::move(cl_ctx));
}
}
#endif // ARM_COMPUTE_CL
diff --git a/tests/framework/ParametersLibrary.cpp b/tests/framework/ParametersLibrary.cpp
index 65a09eeb64..4af4179bda 100644
--- a/tests/framework/ParametersLibrary.cpp
+++ b/tests/framework/ParametersLibrary.cpp
@@ -32,9 +32,14 @@ void ParametersLibrary::set_cpu_ctx(std::unique_ptr<IRuntimeContext> cpu_ctx)
_cpu_ctx = std::move(cpu_ctx);
}
-void ParametersLibrary::set_gpu_ctx(std::unique_ptr<IRuntimeContext> gpu_ctx)
+void ParametersLibrary::set_cl_ctx(std::unique_ptr<IRuntimeContext> cl_ctx)
{
- _gpu_ctx = std::move(gpu_ctx);
+ _cl_ctx = std::move(cl_ctx);
+}
+
+void ParametersLibrary::set_gc_ctx(std::unique_ptr<IRuntimeContext> gc_ctx)
+{
+ _gc_ctx = std::move(gc_ctx);
}
template <>
@@ -47,8 +52,16 @@ typename ContextType<Tensor>::type *ParametersLibrary::get_ctx<Tensor>()
template <>
typename ContextType<CLTensor>::type *ParametersLibrary::get_ctx<CLTensor>()
{
- return static_cast<typename ContextType<CLTensor>::type *>(_gpu_ctx.get());
+ return static_cast<typename ContextType<CLTensor>::type *>(_cl_ctx.get());
}
#endif /* ARM_COMPUTE_CL */
+
+#if ARM_COMPUTE_GC
+template <>
+typename ContextType<GCTensor>::type *ParametersLibrary::get_ctx<GCTensor>()
+{
+ return static_cast<typename ContextType<GCTensor>::type *>(_gc_ctx.get());
+}
+#endif /* ARM_COMPUTE_GC */
} // namespace test
} // namespace arm_compute
diff --git a/tests/framework/ParametersLibrary.h b/tests/framework/ParametersLibrary.h
index 4079ab25b9..d5039fc26c 100644
--- a/tests/framework/ParametersLibrary.h
+++ b/tests/framework/ParametersLibrary.h
@@ -31,6 +31,7 @@
#include "arm_compute/runtime/CL/CLTensor.h"
#endif /* ARM_COMPUTE_CL */
#ifdef ARM_COMPUTE_GC
+#include "arm_compute/runtime/GLES_COMPUTE/GCRuntimeContext.h"
#include "arm_compute/runtime/GLES_COMPUTE/GCTensor.h"
#endif /* ARM_COMPUTE_GC */
@@ -64,7 +65,7 @@ struct ContextType<CLTensor>
template <>
struct ContextType<GCTensor>
{
- using type = IRuntimeContext;
+ using type = GCRuntimeContext;
};
#endif /* ARM_COMPUTE_GC */
@@ -81,9 +82,14 @@ public:
void set_cpu_ctx(std::unique_ptr<IRuntimeContext> cpu_ctx);
/** Set gpu context to be used by the tests
*
- * @param[in] gpu_ctx GPU context to use
+ * @param[in] cl_ctx GPU context to use
+ */
+ void set_cl_ctx(std::unique_ptr<IRuntimeContext> cl_ctx);
+ /** Set gpu context to be used by the tests
+ *
+ * @param[in] gc_ctx GPU context to use
*/
- void set_gpu_ctx(std::unique_ptr<IRuntimeContext> gpu_ctx);
+ void set_gc_ctx(std::unique_ptr<IRuntimeContext> gc_ctx);
/** Get context given a tensor type
*
* @tparam TensorType
@@ -98,7 +104,8 @@ public:
private:
std::unique_ptr<IRuntimeContext> _cpu_ctx{ nullptr };
- std::unique_ptr<IRuntimeContext> _gpu_ctx{ nullptr };
+ std::unique_ptr<IRuntimeContext> _cl_ctx{ nullptr };
+ std::unique_ptr<IRuntimeContext> _gc_ctx{ nullptr };
};
} // namespace test
} // namespace arm_compute