Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SWIFTsim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SWIFT
SWIFTsim
Commits
ae2120aa
Commit
ae2120aa
authored
7 years ago
by
WILLIS
Browse files
Options
Downloads
Patches
Plain Diff
Added corrections for AVX2 and AVX-512.
parent
447bc7a1
No related branches found
No related tags found
1 merge request
!406
Doself2 vectorisation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/runner_doiact_vec.c
+2
-2
2 additions, 2 deletions
src/runner_doiact_vec.c
src/vector.h
+1
-1
1 addition, 1 deletion
src/vector.h
with
3 additions
and
3 deletions
src/runner_doiact_vec.c
+
2
−
2
View file @
ae2120aa
...
...
@@ -363,7 +363,7 @@ __attribute__((always_inline)) INLINE static void storeForceInteractions(
#if defined(HAVE_AVX2) || defined(HAVE_AVX512_F)
/* Invert hj. */
vector
v_hj
,
v_hj_inv
;
v_hj
=
vec_load
(
&
cell_cache
->
h
[
pjd
]);
v_hj
.
v
=
vec_load
(
&
cell_cache
->
h
[
pjd
]);
v_hj_inv
=
vec_reciprocal
(
v_hj
);
mask_t
packed_mask
;
...
...
@@ -382,7 +382,7 @@ __attribute__((always_inline)) INLINE static void storeForceInteractions(
VEC_LEFT_PACK
(
vec_load
(
&
cell_cache
->
pOrho2
[
pjd
]),
packed_mask
,
&
int_cache
->
pOrho2q
[
*
icount
]);
VEC_LEFT_PACK
(
vec_load
(
&
cell_cache
->
balsara
[
pjd
]),
packed_mask
,
&
int_cache
->
balsaraq
[
*
icount
]);
VEC_LEFT_PACK
(
vec_load
(
&
cell_cache
->
soundspeed
[
pjd
]),
packed_mask
,
&
int_cache
->
soundspeedq
[
*
icount
]);
VEC_LEFT_PACK
(
v_hj_inv
->
v
,
packed_mask
,
&
int_cache
->
h_invq
[
*
icount
]);
VEC_LEFT_PACK
(
v_hj_inv
.
v
,
packed_mask
,
&
int_cache
->
h_invq
[
*
icount
]);
/* Increment interaction count by number of bits set in mask. */
(
*
icount
)
+=
__builtin_popcount
(
mask
);
...
...
This diff is collapsed.
Click to expand it.
src/vector.h
+
1
−
1
View file @
ae2120aa
...
...
@@ -241,7 +241,7 @@
/* Performs a left-pack on a vector based upon a mask and returns the result. */
#define VEC_LEFT_PACK(a, mask, result) \
vec_unaligned_store(_mm256_permutevar8x32_ps(a, mask), result)
vec_unaligned_store(_mm256_permutevar8x32_ps(a, mask
.m
), result)
#endif
/* HAVE_AVX2 */
/* Create an FMA using vec_add and vec_mul if AVX2 is not present. */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment