diff options
Diffstat (limited to 'src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp')
-rw-r--r-- | src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp b/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp index 3a15b28d92..fa06a0078b 100644 --- a/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp +++ b/src/core/NEON/kernels/arm_conv/pooling/pooling_depthfirst_generic.hpp @@ -159,6 +159,12 @@ class PoolingDepthfirstGeneric : public PoolingCommon<typename strategy::operand end_out_height = output_height; } + if(start_channel >= end_channel) + { + // Early exit in case of multiple threads parallelising on channels + return; + } + // Cast input and output pointers into the right types const TInput *const inptr = static_cast<const TInput *>(_input) + start_channel; TOutput *const outptr = static_cast<TOutput *>(_output) + start_channel; |