From d1d7722cfc5ee130115d8d195068a98b16102a21 Mon Sep 17 00:00:00 2001 From: Michalis Spyrou Date: Wed, 8 Apr 2020 14:10:15 +0100 Subject: COMPMID-3314: Enable OpenMP in the reference tests Change-Id: I05b5fedb998317144e0dd13a6377a97207b27f46 Signed-off-by: Michalis Spyrou Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/3024 Tested-by: Arm Jenkins Reviewed-by: Michele Di Giorgio Comments-Addressed: Arm Jenkins --- tests/validation/reference/ArithmeticOperations.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tests/validation/reference/ArithmeticOperations.cpp') diff --git a/tests/validation/reference/ArithmeticOperations.cpp b/tests/validation/reference/ArithmeticOperations.cpp index d86833fefa..fd32f45cfa 100644 --- a/tests/validation/reference/ArithmeticOperations.cpp +++ b/tests/validation/reference/ArithmeticOperations.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2019 ARM Limited. + * Copyright (c) 2017-2020 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -62,13 +62,16 @@ struct BroadcastUnroll id_src1.set(dim - 1, 0); id_src2.set(dim - 1, 0); id_dst.set(dim - 1, 0); - - for(size_t i = 0; i < dst.shape()[dim - 1]; ++i, ++id_dst[dim - 1]) +#if defined(_OPENMP) + #pragma omp parallel for +#endif /* _OPENMP */ + for(size_t i = 0; i < dst.shape()[dim - 1]; ++i) { BroadcastUnroll < dim - 1 >::unroll(op, src1, src2, dst, convert_policy, id_src1, id_src2, id_dst); id_src1[dim - 1] += !src1_is_broadcast; id_src2[dim - 1] += !src2_is_broadcast; + ++id_dst[dim - 1]; } } }; -- cgit v1.2.1