Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenneth Heafield <kpu@users.noreply.github.com>2021-03-03 04:26:49 +0300
committerGitHub <noreply@github.com>2021-03-03 04:26:49 +0300
commitaf3aa314d052bd619c09d34bd058702625b0db52 (patch)
tree49f845d4b56ed7477eb44ef40aa532d86c81b4f5 /src
parentd92b74f67a6cd44b2fddcd22f90a0cada968fb22 (diff)
Fix OMP compilation (#824)
* Fix omp variable names
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tensors/cpu/tensor_operators.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tensors/cpu/tensor_operators.cpp b/src/tensors/cpu/tensor_operators.cpp
index 3eded6b2..1191a2be 100755
--- a/src/tensors/cpu/tensor_operators.cpp
+++ b/src/tensors/cpu/tensor_operators.cpp
@@ -914,13 +914,13 @@ void CrossEntropyPick(Tensor out, Tensor in, Tensor labelIndices, float labelSmo
}
float sumexp = 0.f;
- #pragma omp simd reduction(+ : sum)
+ #pragma omp simd reduction(+ : sumexp)
for(int i = 0; i < cols; ++i) {
sumexp += std::exp(sp[i] - max);
}
float mean = 0.f;
- #pragma omp simd reduction(+ : sum)
+ #pragma omp simd reduction(+ : mean)
for(int i = 0; i < cols; ++i) {
mean += sp[i] - max;
}