aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/OMP
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-05-25 14:17:21 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:53:09 +0000
commit376c85f3d826526b8b197c55e22c10765a97631e (patch)
tree049c80a392a404b2b3b29e8a245b580ea34ad9d6 /src/runtime/OMP
parent8e74f4488daf1b628ca718396d5fc72fea95a83d (diff)
downloadComputeLibrary-376c85f3d826526b8b197c55e22c10765a97631e.tar.gz
COMPMID-1180: Add support for bucket multi-threading (Part2)
- Introduced some Hints allowing the function to set its favourite splitting method for a given workload - Implemented the bucket split (Disabled by default) Change-Id: I3a48dfb0bd0ec8b69a44d9c4a4c77ad3f6dc9827 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/133079 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/runtime/OMP')
-rw-r--r--src/runtime/OMP/OMPScheduler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/OMP/OMPScheduler.cpp b/src/runtime/OMP/OMPScheduler.cpp
index 795c96caf0..43a8a6de54 100644
--- a/src/runtime/OMP/OMPScheduler.cpp
+++ b/src/runtime/OMP/OMPScheduler.cpp
@@ -56,7 +56,7 @@ void OMPScheduler::set_num_threads(unsigned int num_threads)
_num_threads = (num_threads == 0) ? num_cores : num_threads;
}
-void OMPScheduler::schedule(ICPPKernel *kernel, unsigned int split_dimension)
+void OMPScheduler::schedule(ICPPKernel *kernel, const Hints &hints)
{
ARM_COMPUTE_ERROR_ON_MSG(!kernel, "The child class didn't set the kernel");
@@ -64,7 +64,7 @@ void OMPScheduler::schedule(ICPPKernel *kernel, unsigned int split_dimension)
info.cpu_info = &_cpu_info;
const Window &max_window = kernel->window();
- const unsigned int num_iterations = max_window.num_iterations(split_dimension);
+ const unsigned int num_iterations = max_window.num_iterations(hints.split_dimension());
info.num_threads = std::min(num_iterations, _num_threads);
if(!kernel->is_parallelisable() || info.num_threads == 1)
@@ -76,7 +76,7 @@ void OMPScheduler::schedule(ICPPKernel *kernel, unsigned int split_dimension)
#pragma omp parallel firstprivate(info) num_threads(info.num_threads)
{
const int tid = omp_get_thread_num();
- Window win = max_window.split_window(split_dimension, tid, info.num_threads);
+ Window win = max_window.split_window(hints.split_dimension(), tid, info.num_threads);
info.thread_id = tid;
kernel->run(win, info);
}