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
dc65093d
Commit
dc65093d
authored
Jul 14, 2016
by
James Willis
Browse files
Replaced all occurrences of 'VECTORIZE' with 'WITH_VECTORIZATION'.
parent
e5c1632a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/kernel_gravity.h
View file @
dc65093d
...
...
@@ -79,7 +79,7 @@ __attribute__((always_inline)) INLINE static void kernel_grav_eval(float x,
*
W
=
w
;
}
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/**
* @brief Computes the gravity cubic spline for a given distance x (Vectorized
...
...
@@ -155,7 +155,7 @@ __attribute__((always_inline)) INLINE static void blender_deval(float x,
*
dW_dx
=
dw_dx
;
}
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/**
* @brief Computes the cubic spline blender and its derivative for a given
...
...
src/kernel_hydro.h
View file @
dc65093d
...
...
@@ -225,7 +225,7 @@ __attribute__((always_inline)) INLINE static void kernel_eval(
*
W
=
w
*
kernel_constant
*
kernel_igamma3
;
}
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
static
const
vector
kernel_igamma_vec
=
FILL_VEC
((
float
)
kernel_igamma
);
...
...
src/runner_doiact.h
View file @
dc65093d
...
...
@@ -113,7 +113,7 @@ void DOPAIR_NAIVE(struct runner *r, struct cell *restrict ci,
error
(
"Don't use in actual runs ! Slow code !"
);
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -169,7 +169,7 @@ void DOPAIR_NAIVE(struct runner *r, struct cell *restrict ci,
/* Hit or miss? */
if
(
r2
<
hig2
||
r2
<
pj
->
h
*
pj
->
h
*
kernel_gamma2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT
(
r2
,
dx
,
hi
,
pj
->
h
,
pi
,
pj
);
...
...
@@ -199,7 +199,7 @@ void DOPAIR_NAIVE(struct runner *r, struct cell *restrict ci,
}
/* loop over the parts in ci. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
int
k
=
0
;
k
<
icount
;
k
++
)
...
...
@@ -215,7 +215,7 @@ void DOSELF_NAIVE(struct runner *r, struct cell *restrict c) {
error
(
"Don't use in actual runs ! Slow code !"
);
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -258,7 +258,7 @@ void DOSELF_NAIVE(struct runner *r, struct cell *restrict c) {
/* Hit or miss? */
if
(
r2
<
hig2
||
r2
<
pj
->
h
*
pj
->
h
*
kernel_gamma2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT
(
r2
,
dx
,
hi
,
pj
->
h
,
pi
,
pj
);
...
...
@@ -288,7 +288,7 @@ void DOSELF_NAIVE(struct runner *r, struct cell *restrict c) {
}
/* loop over the parts in ci. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
int
k
=
0
;
k
<
icount
;
k
++
)
...
...
@@ -317,7 +317,7 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci,
error
(
"Don't use in actual runs ! Slow code !"
);
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -367,7 +367,7 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci,
/* Hit or miss? */
if
(
r2
<
hig2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hi
,
pj
->
h
,
pi
,
pj
);
...
...
@@ -397,7 +397,7 @@ void DOPAIR_SUBSET_NAIVE(struct runner *r, struct cell *restrict ci,
}
/* loop over the parts in ci. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
int
k
=
0
;
k
<
icount
;
k
++
)
...
...
@@ -424,7 +424,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
struct
engine
*
e
=
r
->
e
;
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -499,7 +499,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
/* Hit or miss? */
if
(
r2
<
hig2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hi
,
pj
->
h
,
pi
,
pj
);
...
...
@@ -564,7 +564,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
/* Hit or miss? */
if
(
r2
<
hig2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hi
,
pj
->
h
,
pi
,
pj
);
...
...
@@ -595,7 +595,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
}
/* loop over the parts in ci. */
}
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
int
k
=
0
;
k
<
icount
;
k
++
)
...
...
@@ -618,7 +618,7 @@ void DOPAIR_SUBSET(struct runner *r, struct cell *restrict ci,
void
DOSELF_SUBSET
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
)
{
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -658,7 +658,7 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci,
/* Hit or miss? */
if
(
r2
>
0
.
0
f
&&
r2
<
hig2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hi
,
pj
->
h
,
pi
,
pj
);
...
...
@@ -688,7 +688,7 @@ void DOSELF_SUBSET(struct runner *r, struct cell *restrict ci,
}
/* loop over the parts in ci. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
int
k
=
0
;
k
<
icount
;
k
++
)
...
...
@@ -710,7 +710,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) {
struct
engine
*
restrict
e
=
r
->
e
;
const
int
ti_current
=
e
->
ti_current
;
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -783,7 +783,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) {
/* Hit or miss? */
if
(
r2
<
hig2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hi
,
pj
->
h
,
pi
,
pj
);
...
...
@@ -845,7 +845,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) {
/* Hit or miss? */
if
(
r2
<
hjg2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hj
,
pi
->
h
,
pj
,
pi
);
...
...
@@ -875,7 +875,7 @@ void DOPAIR1(struct runner *r, struct cell *ci, struct cell *cj) {
}
/* loop over the parts in ci. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
int
k
=
0
;
k
<
icount
;
k
++
)
...
...
@@ -897,7 +897,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
struct
engine
*
restrict
e
=
r
->
e
;
const
int
ti_current
=
e
->
ti_current
;
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount1
=
0
;
float
r2q1
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq1
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -1009,7 +1009,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
/* Hit or miss? */
if
(
r2
<
hig2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hj
,
hi
,
pj
,
pi
);
...
...
@@ -1060,7 +1060,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
/* Hit or miss? */
if
(
r2
<
hig2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
/* Does pj need to be updated too? */
if
(
pj
->
ti_end
<=
ti_current
)
...
...
@@ -1153,7 +1153,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
/* Hit or miss? */
if
(
r2
<
hjg2
&&
r2
>
hi
*
hi
*
kernel_gamma2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hi
,
hj
,
pi
,
pj
);
...
...
@@ -1203,7 +1203,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
/* Hit or miss? */
if
(
r2
<
hjg2
&&
r2
>
hi
*
hi
*
kernel_gamma2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
/* Does pi need to be updated too? */
if
(
pi
->
ti_end
<=
ti_current
)
...
...
@@ -1261,7 +1261,7 @@ void DOPAIR2(struct runner *r, struct cell *ci, struct cell *cj) {
}
/* loop over the parts in ci. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount1
>
0
)
for
(
int
k
=
0
;
k
<
icount1
;
k
++
)
...
...
@@ -1284,7 +1284,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
const
int
ti_current
=
r
->
e
->
ti_current
;
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount1
=
0
;
float
r2q1
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq1
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -1350,7 +1350,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
/* Hit or miss? */
if
(
r2
<
hj
*
hj
*
kernel_gamma2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hj
,
hi
,
pj
,
pi
);
...
...
@@ -1406,7 +1406,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
/* Hit or miss? */
if
(
r2
<
hig2
||
doj
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
/* Which parts need to be updated? */
if
(
r2
<
hig2
&&
doj
)
...
...
@@ -1489,7 +1489,7 @@ void DOSELF1(struct runner *r, struct cell *restrict c) {
}
/* loop over all particles. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount1
>
0
)
for
(
int
k
=
0
;
k
<
icount1
;
k
++
)
...
...
@@ -1512,7 +1512,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
const
int
ti_current
=
r
->
e
->
ti_current
;
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount1
=
0
;
float
r2q1
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
hiq1
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -1578,7 +1578,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
/* Hit or miss? */
if
(
r2
<
hig2
||
r2
<
hj
*
hj
*
kernel_gamma2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
IACT_NONSYM
(
r2
,
dx
,
hj
,
hi
,
pj
,
pi
);
...
...
@@ -1632,7 +1632,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
/* Hit or miss? */
if
(
r2
<
hig2
||
r2
<
hj
*
hj
*
kernel_gamma2
)
{
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
/* Does pj need to be updated too? */
if
(
pj
->
ti_end
<=
ti_current
)
...
...
@@ -1690,7 +1690,7 @@ void DOSELF2(struct runner *r, struct cell *restrict c) {
}
/* loop over all particles. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount1
>
0
)
for
(
int
k
=
0
;
k
<
icount1
;
k
++
)
...
...
src/runner_doiact_grav.h
View file @
dc65093d
...
...
@@ -40,7 +40,7 @@ void runner_dopair_grav_new(struct runner *r, struct cell *ci,
int
count_i
,
count_j
,
cnj
,
cnj_new
;
const
int
ti_current
=
e
->
ti_current
;
struct
multipole
m
;
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
dxq
[
3
*
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -107,7 +107,7 @@ void runner_dopair_grav_new(struct runner *r, struct cell *ci,
r2
+=
dx
[
k
]
*
dx
[
k
];
}
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
// if ( pi->part->id == 3473472412525 || pj->part->id == 3473472412525 )
// message( "interacting particles pi=%lli and pj=%lli with r=%.3e in
...
...
@@ -157,7 +157,7 @@ void runner_dopair_grav_new(struct runner *r, struct cell *ci,
}
/* loop over the parts in ci. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
k
=
0
;
k
<
icount
;
k
++
)
...
...
@@ -335,7 +335,7 @@ void runner_dopair_grav(struct runner *r, struct cell *restrict ci,
double
pix
[
3
];
float
dx
[
3
],
r2
;
const
int
ti_current
=
r
->
e
->
ti_current
;
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
dxq
[
3
*
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -376,7 +376,7 @@ void runner_dopair_grav(struct runner *r, struct cell *restrict ci,
}
/* Compute the interaction. */
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
// if ( pi->part->id == 3473472412525 || pj->part->id == 3473472412525 )
// message( "interacting particles pi=%lli and pj=%lli with r=%.3e in
...
...
@@ -409,7 +409,7 @@ void runner_dopair_grav(struct runner *r, struct cell *restrict ci,
}
/* loop over the parts in ci. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
k
=
0
;
k
<
icount
;
k
++
)
...
...
@@ -434,7 +434,7 @@ void runner_doself_grav(struct runner *r, struct cell *restrict c) {
double
pix
[
3
]
=
{
0
.
0
,
0
.
0
,
0
.
0
};
float
dx
[
3
],
r2
;
const
int
ti_current
=
r
->
e
->
ti_current
;
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
int
icount
=
0
;
float
r2q
[
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
float
dxq
[
3
*
VEC_SIZE
]
__attribute__
((
aligned
(
16
)));
...
...
@@ -466,7 +466,7 @@ void runner_doself_grav(struct runner *r, struct cell *restrict c) {
}
/* Compute the interaction. */
#ifndef VECTORIZ
E
#ifndef
WITH_
VECTORIZ
ATION
// if ( pi->part->id == 3473472412525 || pj->part->id == 3473472412525 )
// message( "interacting particles pi=%lli and pj=%lli with r=%.3e." ,
...
...
@@ -497,7 +497,7 @@ void runner_doself_grav(struct runner *r, struct cell *restrict c) {
}
/* loop over the parts in c. */
#ifdef VECTORIZ
E
#ifdef
WITH_
VECTORIZ
ATION
/* Pick up any leftovers. */
if
(
icount
>
0
)
for
(
k
=
0
;
k
<
icount
;
k
++
)
...
...
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