aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CPP
diff options
context:
space:
mode:
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);