aboutsummaryrefslogtreecommitdiff
path: root/tests/main.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-10-25 18:25:17 +0100
committerGeorgios Pinitas <georgios.pinitas@arm.com>2019-11-01 17:26:05 +0000
commit7ae80a928564eba96c4fef0b91b1c50e1647fb8d (patch)
tree18a6a38e9d61f09f46cc08ba231802eb4519b846 /tests/main.cpp
parentbfd75d64b99342a6cb46380f7173c39026ed7ea2 (diff)
downloadComputeLibrary-7ae80a928564eba96c4fef0b91b1c50e1647fb8d.tar.gz
COMPMID-2549: Add GLES Runtime Context interfaces.
* Creates interfaces and concrete classes * Ports GCActivationalLayer * Adapts test framework and relevant tests Change-Id: Ide36cd65ebf185958db3c4a5bebd630fcb2f39b3 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/c/2199 Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'tests/main.cpp')
-rw-r--r--tests/main.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index 415dba0405..5757249188 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -92,10 +92,6 @@ bool file_exists(const std::string &filename)
int main(int argc, char **argv)
{
-#ifdef ARM_COMPUTE_GC
- GCScheduler::get().default_init();
-#endif /* ARM_COMPUTE_GC */
-
framework::Framework &framework = framework::Framework::get();
utils::CommandLineParser parser;
@@ -173,6 +169,20 @@ int main(int argc, char **argv)
parameters = support::cpp14::make_unique<ParametersLibrary>();
parameters->set_cpu_ctx(std::move(cpu_ctx));
+#ifdef ARM_COMPUTE_GC
+ // Setup OpenGL context
+ {
+ auto gles_ctx = support::cpp14::make_unique<GCRuntimeContext>();
+ ARM_COMPUTE_ERROR_ON(gles_ctx == nullptr);
+ {
+ // Legacy singletons API: This has been deprecated and the singletons will be removed
+ // Setup singleton for backward compatibility
+ GCScheduler::get().default_init();
+ }
+ parameters->set_gc_ctx(std::move(gles_ctx));
+ };
+#endif /* ARM_COMPUTE_GC */
+
#ifdef ARM_COMPUTE_CL
CLTuner cl_tuner(false);
// Create GPU context
@@ -186,7 +196,7 @@ int main(int argc, char **argv)
// Setup singleton for backward compatibility
CLScheduler::get().init(gpu_scheduler->context(), gpu_scheduler->queue(), cl_ctx->kernel_library().get_device(), &cl_tuner);
}
- parameters->set_gpu_ctx(std::move(cl_ctx));
+ parameters->set_cl_ctx(std::move(cl_ctx));
if(enable_tuner->is_set())
{