Fix macros for AoS

Signed-off-by: Rafael Ravedutti <rafaelravedutti@gmail.com>
This commit is contained in:
Rafael Ravedutti 2021-03-23 16:21:08 +01:00
parent fc1fc9fd45
commit 4b481bb407

View File

@ -38,9 +38,9 @@ extern void growAtom(Atom*);
#ifdef AOS #ifdef AOS
#define POS_DATA_LAYOUT "AoS" #define POS_DATA_LAYOUT "AoS"
#define atom_x(i) atom->x[i * 3 + 0] #define atom_x(i) atom->x[(i) * 3 + 0]
#define atom_y(i) atom->x[i * 3 + 1] #define atom_y(i) atom->x[(i) * 3 + 1]
#define atom_z(i) atom->x[i * 3 + 2] #define atom_z(i) atom->x[(i) * 3 + 2]
#else #else
#define POS_DATA_LAYOUT "SoA" #define POS_DATA_LAYOUT "SoA"
#define atom_x(i) atom->x[i] #define atom_x(i) atom->x[i]