Skip to content

Commit

Permalink
[apps] 🐛 Accumulate different neighbor contributions in lavaMD
Browse files Browse the repository at this point in the history
  • Loading branch information
mp-17 committed Nov 4, 2022
1 parent ad53df7 commit e591f8d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/lavamd/kernel/lavamd.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,16 @@ void kernel_vec(fp alpha, uint64_t n_boxes, box_str *box, FOUR_VECTOR *rv,
xfA_x = _MM_MACC_f32(xfA_x, xqB, xfxij, gvl);
xfA_y = _MM_MACC_f32(xfA_y, xqB, xfyij, gvl);
xfA_z = _MM_MACC_f32(xfA_z, xqB, xfzij, gvl);
} // for j
}

gvl = vsetvl_e32m1(NUMBER_PAR_PER_BOX);

// Accumulate final results
xfA_1_v = _MM_LOAD_f32(&fA[i].v, 1);
xfA_1_x = _MM_LOAD_f32(&fA[i].x, 1);
xfA_1_y = _MM_LOAD_f32(&fA[i].y, 1);
xfA_1_z = _MM_LOAD_f32(&fA[i].z, 1);

xfA_1_v = _MM_REDSUM_f32(xfA_1_v, xfA_v, xfA_1_v, gvl);
xfA_1_x = _MM_REDSUM_f32(xfA_1_x, xfA_x, xfA_1_x, gvl);
xfA_1_y = _MM_REDSUM_f32(xfA_1_y, xfA_y, xfA_1_y, gvl);
Expand Down

0 comments on commit e591f8d

Please sign in to comment.