Skip to content

Commit

Permalink
Looks like defined(_OPENMP) is what's known in the MSVC(2019) world…
Browse files Browse the repository at this point in the history
…: added that one as another enabling condition since benchmarks have shown MSVC2019's `/openmp:experimental` to deliver. :-) (See tesseract-ocr#3486 benchmark reports on @stweil's DotProductNative() implementation)
  • Loading branch information
GerHobbelt committed Jul 13, 2021
1 parent 3eae6d7 commit d025c78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arch/dotproduct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace tesseract {
// Computes and returns the dot product of the two n-vectors u and v.
TFloat DotProductNative(const TFloat *u, const TFloat *v, int n) {
TFloat total = 0;
#if defined(OPENMP_SIMD)
#if defined(OPENMP_SIMD) || defined(_OPENMP)
#pragma omp simd reduction(+:total)
#endif
for (int k = 0; k < n; k++) {
Expand Down

0 comments on commit d025c78

Please sign in to comment.