Skip to content
GitLab
Menu
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
4eb6f3d9
Commit
4eb6f3d9
authored
May 17, 2017
by
James Willis
Browse files
Comments.
parent
bf3875a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cache.h
View file @
4eb6f3d9
...
...
@@ -113,11 +113,22 @@ struct c2_cache {
/* z velocity of particle pj. */
float
vzq
[
C2_CACHE_SIZE
]
__attribute__
((
aligned
(
C2_CACHE_ALIGN
)));
/* Density of particle pj. */
float
rhoq
[
C2_CACHE_SIZE
]
__attribute__
((
aligned
(
C2_CACHE_ALIGN
)));
/* Smoothing length gradient of particle pj. */
float
grad_hq
[
C2_CACHE_SIZE
]
__attribute__
((
aligned
(
C2_CACHE_ALIGN
)));
/* Pressure over density squared of particle pj. */
float
pOrho2q
[
C2_CACHE_SIZE
]
__attribute__
((
aligned
(
C2_CACHE_ALIGN
)));
/* Balsara switch of particle pj. */
float
balsaraq
[
C2_CACHE_SIZE
]
__attribute__
((
aligned
(
C2_CACHE_ALIGN
)));
/* Sound speed of particle pj. */
float
soundspeedq
[
C2_CACHE_SIZE
]
__attribute__
((
aligned
(
C2_CACHE_ALIGN
)));
/* Inverse smoothing length of particle pj. */
float
h_invq
[
C2_CACHE_SIZE
]
__attribute__
((
aligned
(
C2_CACHE_ALIGN
)));
};
...
...
@@ -165,7 +176,6 @@ __attribute__((always_inline)) INLINE void cache_init(struct cache *c,
error
+=
posix_memalign
((
void
**
)
&
c
->
vz
,
CACHE_ALIGN
,
sizeBytes
);
error
+=
posix_memalign
((
void
**
)
&
c
->
h
,
CACHE_ALIGN
,
sizeBytes
);
error
+=
posix_memalign
((
void
**
)
&
c
->
max_d
,
CACHE_ALIGN
,
sizeBytes
);
error
+=
posix_memalign
((
void
**
)
&
c
->
rho
,
CACHE_ALIGN
,
sizeBytes
);
error
+=
posix_memalign
((
void
**
)
&
c
->
grad_h
,
CACHE_ALIGN
,
sizeBytes
);
error
+=
posix_memalign
((
void
**
)
&
c
->
pOrho2
,
CACHE_ALIGN
,
sizeBytes
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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