aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CPP
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-09-24 12:10:46 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit2fd5d95446b3f89001313335cf129c30cf7951e7 (patch)
treefd79ad9aa1d769d0bfcb10c795d301b9258c46ee /src/runtime/CPP
parent36db7f5dac4a25f1eb918d9451fc406d999ff971 (diff)
downloadComputeLibrary-2fd5d95446b3f89001313335cf129c30cf7951e7.tar.gz
COMPMID-417: Fix CPPScheduler for empty windows
Change-Id: Ib4d6949ae0835a94a241d736913617cfe251af54 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88887 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com>
Diffstat (limited to 'src/runtime/CPP')
-rw-r--r--src/runtime/CPP/CPPScheduler.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/CPP/CPPScheduler.cpp b/src/runtime/CPP/CPPScheduler.cpp
index 7203146829..77aa044144 100644
--- a/src/runtime/CPP/CPPScheduler.cpp
+++ b/src/runtime/CPP/CPPScheduler.cpp
@@ -184,6 +184,11 @@ void CPPScheduler::schedule(ICPPKernel *kernel, unsigned int split_dimension)
const unsigned int num_iterations = max_window.num_iterations(split_dimension);
info.num_threads = std::min(num_iterations, _num_threads);
+ if(num_iterations == 0)
+ {
+ return;
+ }
+
if(!kernel->is_parallelisable() || info.num_threads == 1)
{
kernel->run(max_window, info);