Skip to content

Commit

Permalink
fix-OMP compile issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffry1829 committed Jan 28, 2024
1 parent c93b318 commit 656c751
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 656c751

Please sign in to comment.