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
fcebd697
Commit
fcebd697
authored
8 years ago
by
James Willis
Browse files
Options
Downloads
Patches
Plain Diff
Added vectorisation guards.
parent
c6972a00
No related branches found
No related tags found
1 merge request
!287
Particle caching
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/hydro/Gadget2/hydro_iact.h
+2
-0
2 additions, 0 deletions
src/hydro/Gadget2/hydro_iact.h
src/runner_doiact_vec.c
+2
-0
2 additions, 0 deletions
src/runner_doiact_vec.c
with
4 additions
and
0 deletions
src/hydro/Gadget2/hydro_iact.h
+
2
−
0
View file @
fcebd697
...
@@ -382,6 +382,7 @@ runner_iact_nonsym_vec_density(float *R2, float *Dx, float *Hi, float *Hj,
...
@@ -382,6 +382,7 @@ runner_iact_nonsym_vec_density(float *R2, float *Dx, float *Hi, float *Hj,
#endif
#endif
}
}
#ifdef WITH_VECTORIZATION
/**
/**
* @brief Density interaction computed using 2 interleaved vectors (non-symmetric vectorized version).
* @brief Density interaction computed using 2 interleaved vectors (non-symmetric vectorized version).
*/
*/
...
@@ -505,6 +506,7 @@ runner_iact_nonsym_2_vec_density(float *R2, float *Dx, float *Dy, float *Dz, vec
...
@@ -505,6 +506,7 @@ runner_iact_nonsym_2_vec_density(float *R2, float *Dx, float *Dy, float *Dz, vec
curlvzSum
->
v
+=
vec_and
(
vec_mul
(
mj2
.
v
,
vec_mul
(
curlvrz2
.
v
,
wi_dx2
.
v
)),
mask2
.
v
);
curlvzSum
->
v
+=
vec_and
(
vec_mul
(
mj2
.
v
,
vec_mul
(
curlvrz2
.
v
,
wi_dx2
.
v
)),
mask2
.
v
);
#endif
#endif
}
}
#endif
/**
/**
* @brief Force loop
* @brief Force loop
...
...
This diff is collapsed.
Click to expand it.
src/runner_doiact_vec.c
+
2
−
0
View file @
fcebd697
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#define NUM_VEC_PROC 2
#define NUM_VEC_PROC 2
#define C2_CACHE_SIZE (NUM_VEC_PROC * VEC_SIZE * 6) + (NUM_VEC_PROC * VEC_SIZE)
#define C2_CACHE_SIZE (NUM_VEC_PROC * VEC_SIZE * 6) + (NUM_VEC_PROC * VEC_SIZE)
#ifdef WITH_VECTORIZATION
__attribute__
((
always_inline
))
INLINE
static
void
calcRemInteractions
(
const
struct
cache
*
const
cell_cache
,
float
*
r2q
,
float
*
dxq
,
float
*
dyq
,
float
*
dzq
,
float
*
mq
,
float
*
vxq
,
float
*
vyq
,
float
*
vzq
,
const
int
icount
,
vector
*
rhoSum
,
vector
*
rho_dhSum
,
vector
*
wcountSum
,
vector
*
wcount_dhSum
,
vector
*
div_vSum
,
vector
*
curlvxSum
,
vector
*
curlvySum
,
vector
*
curlvzSum
,
vector
v_hi_inv
,
vector
v_vix
,
vector
v_viy
,
vector
v_viz
,
int
*
icount_align
)
{
__attribute__
((
always_inline
))
INLINE
static
void
calcRemInteractions
(
const
struct
cache
*
const
cell_cache
,
float
*
r2q
,
float
*
dxq
,
float
*
dyq
,
float
*
dzq
,
float
*
mq
,
float
*
vxq
,
float
*
vyq
,
float
*
vzq
,
const
int
icount
,
vector
*
rhoSum
,
vector
*
rho_dhSum
,
vector
*
wcountSum
,
vector
*
wcount_dhSum
,
vector
*
div_vSum
,
vector
*
curlvxSum
,
vector
*
curlvySum
,
vector
*
curlvzSum
,
vector
v_hi_inv
,
vector
v_vix
,
vector
v_viy
,
vector
v_viz
,
int
*
icount_align
)
{
#ifdef HAVE_AVX512_F
#ifdef HAVE_AVX512_F
...
@@ -153,6 +154,7 @@ __attribute__((always_inline)) INLINE static void storeInteractions(const int ma
...
@@ -153,6 +154,7 @@ __attribute__((always_inline)) INLINE static void storeInteractions(const int ma
#endif
#endif
}
}
#endif
/**
/**
* @brief Compute the cell self-interaction (non-symmetric) vec.
* @brief Compute the cell self-interaction (non-symmetric) vec.
...
...
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