Skip to content

Commit

Permalink
fix idx_dft counter for parallel loop
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Jul 8, 2021
1 parent 7aeea74 commit f5d61dd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ void dft_chunk::update_dft(double time) {

int numcmp = fc->f[c][1] ? 2 : 1;

size_t idx_dft = 0;
PLOOP_OVER_IVECS(fc->gv, is, ie, idx) {
size_t idx_dft = (loop_i1 * loop_n2 + loop_i2) * loop_n3 + loop_i3;
double w;
if (include_dV_and_interp_weights) {
w = IVEC_LOOP_WEIGHT(s0, s1, e0, e1, dV0 + dV1 * loop_i2);
Expand Down Expand Up @@ -255,7 +255,6 @@ void dft_chunk::update_dft(double time) {
for (int i = 0; i < Nomega; ++i)
dft[Nomega * idx_dft + i] += dft_phase[i] * fr;
}
idx_dft++;
}
}

Expand Down

0 comments on commit f5d61dd

Please sign in to comment.