aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/Utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/Utils.cpp')
-rw-r--r--src/runtime/Utils.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/runtime/Utils.cpp b/src/runtime/Utils.cpp
index 81de782399..70494be05c 100644
--- a/src/runtime/Utils.cpp
+++ b/src/runtime/Utils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -23,16 +23,20 @@
*/
#include "arm_compute/runtime/Utils.h"
+#include "arm_compute/runtime/NEON/NEScheduler.h"
+
#include <map>
#include <string>
-using namespace arm_compute;
-
+namespace arm_compute
+{
+#ifndef DOXYGEN_SKIP_THIS
static const std::string information =
#include "arm_compute_version.embed"
;
+#endif /* DOXYGEN_SKIP_THIS */
-const std::string &arm_compute::string_from_scheduler_type(Scheduler::Type t)
+const std::string &string_from_scheduler_type(Scheduler::Type t)
{
static std::map<Scheduler::Type, const std::string> scheduler_type_map =
{
@@ -44,3 +48,17 @@ const std::string &arm_compute::string_from_scheduler_type(Scheduler::Type t)
return scheduler_type_map[t];
}
+
+void schedule_kernel_on_ctx(IRuntimeContext *ctx, ICPPKernel *kernel, const IScheduler::Hints &hints)
+{
+ if(ctx)
+ {
+ ARM_COMPUTE_ERROR_ON(ctx->scheduler() == nullptr);
+ ctx->scheduler()->schedule(kernel, hints);
+ }
+ else
+ {
+ NEScheduler::get().schedule(kernel, hints);
+ }
+}
+} // namespace arm_compute