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:
authorhuangjq0617 <huangjq0617@users.noreply.github.com>2021-04-11 07:28:04 +0300
committerGitHub <noreply@github.com>2021-04-11 07:28:04 +0300
commita7c3a0b2ef0d3a9ffd952bb1eb97e680633d1515 (patch)
treeeec4a710ea12fb6478e7e50490907e9eb4a61cce /src
parentfdf9fe7d4a98268b5d451bc5b5944da959fbe8e2 (diff)
fix beam_search ABORT when enable openmp and OMP_NUM_THREADS > 1 (#767)
Diffstat (limited to 'src')
-rwxr-xr-xsrc/tensors/cpu/tensor_operators.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tensors/cpu/tensor_operators.cpp b/src/tensors/cpu/tensor_operators.cpp
index 1191a2be..d92adba8 100755
--- a/src/tensors/cpu/tensor_operators.cpp
+++ b/src/tensors/cpu/tensor_operators.cpp
@@ -261,12 +261,12 @@ void TransposeFirst3In4(Tensor out, Tensor in, const std::vector<int>& vAxis) {
// find the mapping between the transposed output dimensional indices (oi, oj, ok)
// and original input dimensional indices (i, j, k)
- int oi, oj, ok;
#pragma omp parallel for
for(int k = 0; k < l1; ++k) {
int shift = k * l2 * l3;
for(int j = 0; j < l2; ++j) {
for(int i = 0; i < l3; ++i) {
+ int oi, oj, ok;
if(vAxis[0] == 0) {
if(vAxis[1] == 1) {
oi = i; oj = j; ok = k;