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
ed2260b9
Commit
ed2260b9
authored
Apr 27, 2017
by
James Willis
Browse files
Force alignment in vectorised loops.
parent
ca6a8f54
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/cache.h
View file @
ed2260b9
...
...
@@ -157,9 +157,7 @@ __attribute__((always_inline)) INLINE void cache_read_particles(
/* Shift the particles positions to a local frame so single precision can be
* used instead of double precision. */
#if defined(WITH_VECTORIZATION) && defined(__ICC)
#pragma simd
#elif defined(WITH_VECTORIZATION)
#pragma omp simd
#pragma vector aligned
#endif
for
(
int
i
=
0
;
i
<
ci
->
count
;
i
++
)
{
ci_cache
->
x
[
i
]
=
ci
->
parts
[
i
].
x
[
0
]
-
ci
->
loc
[
0
];
...
...
@@ -352,9 +350,7 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
* used instead of double precision. Also shift the cell ci, particles positions
* due to BCs but leave cell cj. */
#if defined(WITH_VECTORIZATION) && defined(__ICC)
#pragma simd
#elif defined(WITH_VECTORIZATION)
#pragma omp simd
#pragma vector aligned
#endif
for
(
int
i
=
first_pi_align
;
i
<
ci
->
count
;
i
++
)
{
/* Make sure ci_cache is filled from the first element. */
...
...
@@ -378,9 +374,7 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
ci_cache
->
x
[
i
]
=
fake_pix
;
#if defined(WITH_VECTORIZATION) && defined(__ICC)
#pragma simd
#elif defined(WITH_VECTORIZATION)
#pragma omp simd
#pragma vector aligned
#endif
for
(
int
i
=
0
;
i
<=
last_pj_align
;
i
++
)
{
idx
=
sort_j
[
i
].
i
;
...
...
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