Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
0de9dae0
Commit
0de9dae0
authored
Sep 01, 2016
by
Matthieu Schaller
Browse files
Align critical structures on 128 bytes and make all their sizes multiples of 32 bytes.
parent
072a7a45
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/cell.h
View file @
0de9dae0
...
...
@@ -44,7 +44,7 @@ struct space;
* The maximum was lowered by a further factor of 2 to be on the safe side.*/
#define cell_max_tag (1 << 29)
#define cell_align
32
#define cell_align
128
/* Global variables. */
extern
int
cell_next_tag
;
...
...
@@ -205,7 +205,7 @@ struct cell {
#endif
}
__attribute__
((
aligned
(
cell_align
)));
}
__attribute__
((
aligned
(
32
)));
/* Convert cell location to ID. */
#define cell_getid(cdim, i, j, k) \
...
...
src/gravity/Default/gravity_part.h
View file @
0de9dae0
...
...
@@ -53,6 +53,6 @@ struct gpart {
which this gpart is linked. */
long
long
id_or_neg_offset
;
}
__attribute__
((
aligned
(
gpart_align
)));
}
__attribute__
((
aligned
(
32
)));
#endif
/* SWIFT_DEFAULT_GRAVITY_PART_H */
src/hydro/Default/hydro_part.h
View file @
0de9dae0
...
...
@@ -33,7 +33,7 @@ struct xpart {
/* Old density. */
float
omega
;
}
__attribute__
((
aligned
(
xpart_align
)));
}
__attribute__
((
aligned
(
32
)));
/* Data of a single particle. */
struct
part
{
...
...
@@ -120,6 +120,6 @@ struct part {
/* Pointer to corresponding gravity part. */
struct
gpart
*
gpart
;
}
__attribute__
((
aligned
(
part_align
)));
}
__attribute__
((
aligned
(
32
)));
#endif
/* SWIFT_DEFAULT_HYDRO_PART_H */
src/hydro/Gadget2/hydro_part.h
View file @
0de9dae0
...
...
@@ -28,7 +28,7 @@ struct xpart {
/* Velocity at the last full step. */
float
v_full
[
3
];
}
__attribute__
((
aligned
(
xpart_align
)));
}
__attribute__
((
aligned
(
32
)));
/* Data of a single particle. */
struct
part
{
...
...
@@ -110,6 +110,6 @@ struct part {
/* Pointer to corresponding gravity part. */
struct
gpart
*
gpart
;
}
__attribute__
((
aligned
(
part_align
)));
}
__attribute__
((
aligned
(
32
)));
#endif
/* SWIFT_GADGET2_HYDRO_PART_H */
src/hydro/Gizmo/hydro_part.h
View file @
0de9dae0
...
...
@@ -26,7 +26,7 @@ struct xpart {
/* Velocity at the last full step. */
float
v_full
[
3
];
}
__attribute__
((
aligned
(
xpart_align
)));
}
__attribute__
((
aligned
(
32
)));
/* Data of a single particle. */
struct
part
{
...
...
@@ -196,4 +196,4 @@ struct part {
/* Associated gravitas. */
struct
gpart
*
gpart
;
}
__attribute__
((
aligned
(
part_align
)));
}
__attribute__
((
aligned
(
32
)));
src/hydro/Minimal/hydro_part.h
View file @
0de9dae0
...
...
@@ -47,7 +47,7 @@ struct xpart {
float
v_full
[
3
];
/*!< Velocity at the last full step. */
}
__attribute__
((
aligned
(
xpart_align
)));
}
__attribute__
((
aligned
(
32
)));
/**
* @brief Particle fields for the SPH particles
...
...
@@ -120,6 +120,6 @@ struct part {
struct
gpart
*
gpart
;
/*!< Pointer to corresponding gravity part. */
}
__attribute__
((
aligned
(
part_align
)));
}
__attribute__
((
aligned
(
32
)));
#endif
/* SWIFT_MINIMAL_HYDRO_PART_H */
src/part.h
View file @
0de9dae0
...
...
@@ -34,9 +34,9 @@
#include
"const.h"
/* Some constants. */
#define part_align
64
#define xpart_align
32
#define gpart_align
32
#define part_align
128
#define xpart_align
128
#define gpart_align
128
/* Import the right hydro particle definition */
#if defined(MINIMAL_SPH)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment