Skip to content

Commit

Permalink
Merge pull request #406 from Cytnx-dev/fix-OMP
Browse files Browse the repository at this point in the history
fix-OMP compile issue
  • Loading branch information
jeffry1829 authored Mar 7, 2024
2 parents 4907ced + 656c751 commit da532f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/backend/utils_internal_cpu/Movemem_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ namespace cytnx {
newshape[i] = old_shape[mapper[i]];
}
std::vector<cytnx_int64> shifter_new(old_shape.size());
std::vector<cytnx_int64> shifter_old(old_shape.size());

for (cytnx_int64 i = old_shape.size() - 1; i >= 0; i--) {
shifter_old[i] = accu_old;
shifter_new[i] = accu_new;
accu_old *= old_shape[i];
accu_new *= newshape[i];
Expand Down Expand Up @@ -227,8 +229,10 @@ namespace cytnx {
newshape[i] = old_shape[mapper[i]];
}
std::vector<cytnx_int64> shifter_new(old_shape.size());
std::vector<cytnx_int64> shifter_old(old_shape.size());

for (cytnx_int64 i = old_shape.size() - 1; i >= 0; i--) {
shifter_old[i] = accu_old;
shifter_new[i] = accu_new;
accu_old *= old_shape[i];
accu_new *= newshape[i];
Expand Down Expand Up @@ -370,8 +374,10 @@ namespace cytnx {
newshape[i] = old_shape[mapper[i]];
}
std::vector<cytnx_int64> shifter_new(old_shape.size());
std::vector<cytnx_int64> shifter_old(old_shape.size());

for (cytnx_int64 i = old_shape.size() - 1; i >= 0; i--) {
shifter_old[i] = accu_old;
shifter_new[i] = accu_new;
accu_old *= old_shape[i];
accu_new *= newshape[i];
Expand Down Expand Up @@ -512,8 +518,10 @@ namespace cytnx {
newshape[i] = old_shape[mapper[i]];
}
std::vector<cytnx_int64> shifter_new(old_shape.size());
std::vector<cytnx_int64> shifter_old(old_shape.size());

for (cytnx_int64 i = old_shape.size() - 1; i >= 0; i--) {
shifter_old[i] = accu_old;
shifter_new[i] = accu_new;
accu_old *= old_shape[i];
accu_new *= newshape[i];
Expand Down

0 comments on commit da532f7

Please sign in to comment.