Skip to content

Commit

Permalink
Fix DotProductNative for TFloat
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Jul 14, 2021
1 parent ea18bd2 commit 38533ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/arch/dotproduct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ 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) {
double total = 0.0;
TFloat total = 0;
#if defined(OPENMP_SIMD)
#pragma omp simd reduction(+:total)
#pragma omp simdi reduction(+:total)
#endif
for (int k = 0; k < n; ++k) {
for (int k = 0; k < n; k++) {
total += u[k] * v[k];
}
return total;
Expand Down

0 comments on commit 38533ba

Please sign in to comment.