Skip to content

Commit

Permalink
padding
Browse files Browse the repository at this point in the history
  • Loading branch information
hannorein committed Oct 29, 2023
1 parent 49216dd commit 8987189
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/rebound.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,21 @@ struct reb_particle {
double r; // physical radius
double last_collision; // Last time the particle had a physical collision.
struct reb_treecell* c; // Pointer to the cell the particle is currently in.
#if !defined(_LP64)
char pad1[4]; // c is short by 4 bytes
#endif
uint32_t hash; // Hash, can be used to identify particle.
#if !defined(_LP64)
char pad2[4]; // ap is not padded to 8 bytes
#endif
void* ap; // This pointer allows REBOUNDx to add additional properties to the particle.
#if !defined(_LP64)
char pad3[4]; // ap is short by 4 bytes
#endif
struct reb_simulation* sim; // Pointer to the parent simulation.
#if !defined(_LP64)
char pad4[4]; // sim is short by 4 bytes
#endif
};

// Generic 3d vector
Expand Down

0 comments on commit 8987189

Please sign in to comment.