Enable pragma for SIMD also when _OPENMP is defined

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2021-07-15 16:03:43 +02:00
parent f0fb6809e3
commit 88d4028a5a

View File

@ -21,7 +21,7 @@ namespace tesseract {
// Computes and returns the dot product of the two n-vectors u and v.
double DotProductNative(const double *u, const double *v, int n) {
double total = 0.0;
#if defined(OPENMP_SIMD)
#if defined(OPENMP_SIMD) || defined(_OPENMP)
#pragma omp simd reduction(+:total)
#endif
for (int k = 0; k < n; ++k) {