Skip to content

Commit

Permalink
Fix SIMD store index
Browse files Browse the repository at this point in the history
  • Loading branch information
Rio Yokota committed May 29, 2020
1 parent ebc183e commit f6b9931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 04_simd/13_nbody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ int main() {
fxi = _mm256_fmadd_ps(dx, mj, fxi);
fyi = _mm256_fmadd_ps(dy, mj, fyi);
}
_mm256_store_ps(fx, fxi);
_mm256_store_ps(fy, fyi);
_mm256_store_ps(fx+i, fxi);
_mm256_store_ps(fy+i, fyi);
}
for(int i=0; i<N; i++)
printf("%d %g %g\n",i,fx[i],fy[i]);
Expand Down

0 comments on commit f6b9931

Please sign in to comment.