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
78a1e165
Commit
78a1e165
authored
Oct 27, 2017
by
James Willis
Browse files
Formatting.
parent
e9ccc11a
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/partition.c
View file @
78a1e165
...
...
@@ -384,8 +384,8 @@ static void pick_metis(struct space *s, int nregions, int *vertexw, int *edgew,
* weights_v, NULL, weights_e);
*/
if
(
METIS_PartGraphKway
(
&
idx_ncells
,
&
one
,
xadj
,
adjncy
,
weights_v
,
NULL
,
weights_e
,
&
idx_nregions
,
NULL
,
NULL
,
options
,
&
objval
,
regionid
)
!=
METIS_OK
)
weights_e
,
&
idx_nregions
,
NULL
,
NULL
,
options
,
&
objval
,
regionid
)
!=
METIS_OK
)
error
(
"Call to METIS_PartGraphKway failed."
);
/* Check that the regionids are ok. */
...
...
@@ -519,8 +519,7 @@ static void repart_edge_metis(int partweights, int bothweights, int nodeID,
struct
task
*
t
=
&
tasks
[
j
];
/* Skip un-interesting tasks. */
if
(
t
->
cost
==
0
)
continue
;
if
(
t
->
cost
==
0
)
continue
;
/* Get the task weight. */
int
w
=
t
->
cost
*
wscale
;
...
...
src/runner_doiact_vec.c
View file @
78a1e165
...
...
@@ -730,7 +730,8 @@ __attribute__((always_inline)) INLINE void runner_doself1_density_vec(
* @param pi_count The number of particles in @c ind.
*/
__attribute__
((
always_inline
))
INLINE
void
runner_doself_subset_density_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
c
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
pi_count
)
{
struct
runner
*
r
,
struct
cell
*
restrict
c
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
pi_count
)
{
#ifdef WITH_VECTORIZATION
struct
part
*
restrict
pi
;
...
...
@@ -861,29 +862,30 @@ __attribute__((always_inline)) INLINE void runner_doself_subset_density_vec(
vec_is_mask_true
(
v_doi_mask_self_check
);
const
int
doi_mask2
=
vec_is_mask_true
(
v_doi_mask2
)
&
vec_is_mask_true
(
v_doi_mask2_self_check
);
/* If there are any interactions left pack interaction values into c2
* cache. */
if
(
doi_mask
)
{
storeInteractions
(
doi_mask
,
pjd
,
&
v_r2
,
&
v_dx
,
&
v_dy
,
&
v_dz
,
cell_cache
,
&
int_cache
,
&
icount
,
&
v_rhoSum
,
&
v_rho_dhSum
,
&
v_wcountSum
,
&
v_wcount_dhSum
,
&
v_div_vSum
,
&
v_curlvxSum
,
&
v_curlvySum
,
&
v_curlvzSum
,
v_hi_inv
,
v_vix
,
v_viy
,
v_viz
);
&
int_cache
,
&
icount
,
&
v_rhoSum
,
&
v_rho_dhSum
,
&
v_wcountSum
,
&
v_wcount_dhSum
,
&
v_div_vSum
,
&
v_curlvxSum
,
&
v_curlvySum
,
&
v_curlvzSum
,
v_hi_inv
,
v_vix
,
v_viy
,
v_viz
);
}
if
(
doi_mask2
)
{
storeInteractions
(
doi_mask2
,
pjd
+
VEC_SIZE
,
&
v_r2_2
,
&
v_dx_2
,
&
v_dy_2
,
&
v_dz_2
,
cell_cache
,
&
int_cache
,
&
icount
,
&
v_rhoSum
,
&
v_rho_dhSum
,
&
v_wcountSum
,
&
v_wcount_dhSum
,
&
v_div_vSum
,
&
v_curlvxSum
,
&
v_curlvySum
,
&
v_curlvzSum
,
v_hi_inv
,
v_vix
,
v_viy
,
v_viz
);
&
v_rho_dhSum
,
&
v_wcountSum
,
&
v_wcount_dhSum
,
&
v_div_vSum
,
&
v_curlvxSum
,
&
v_curlvySum
,
&
v_curlvzSum
,
v_hi_inv
,
v_vix
,
v_viy
,
v_viz
);
}
}
/* Perform padded vector remainder interactions if any are present. */
calcRemInteractions
(
&
int_cache
,
icount
,
&
v_rhoSum
,
&
v_rho_dhSum
,
&
v_wcountSum
,
&
v_wcount
_dh
Sum
,
&
v_
div_vSum
,
&
v_curlvxSum
,
&
v_curlvy
Sum
,
&
v_curlv
z
Sum
,
v_
hi_inv
,
v_
vix
,
v_viy
,
v_viz
,
&
icount_align
);
calcRemInteractions
(
&
int_cache
,
icount
,
&
v_rhoSum
,
&
v_rho_dhSum
,
&
v_wcountSum
,
&
v_
wcount_dhSum
,
&
v_div_v
Sum
,
&
v_curlv
x
Sum
,
&
v_
curlvySum
,
&
v_
curlvzSum
,
v_hi_inv
,
v_vix
,
v_viy
,
v_viz
,
&
icount_align
);
/* Initialise masks to true in case remainder interactions have been
* performed. */
...
...
@@ -897,9 +899,9 @@ __attribute__((always_inline)) INLINE void runner_doself_subset_density_vec(
&
int_cache
.
r2q
[
pjd
],
&
int_cache
.
dxq
[
pjd
],
&
int_cache
.
dyq
[
pjd
],
&
int_cache
.
dzq
[
pjd
],
v_hi_inv
,
v_vix
,
v_viy
,
v_viz
,
&
int_cache
.
vxq
[
pjd
],
&
int_cache
.
vyq
[
pjd
],
&
int_cache
.
vzq
[
pjd
],
&
int_cache
.
mq
[
pjd
],
&
v_rhoSum
,
&
v_rho_dhSum
,
&
v_wcountSum
,
&
v_wcount_dhSum
,
&
v_div_vSum
,
&
v_curlvxSum
,
&
v_curlvySum
,
&
v_curlvzSum
,
int_mask
,
int_mask2
,
0
);
&
int_cache
.
mq
[
pjd
],
&
v_rhoSum
,
&
v_rho_dhSum
,
&
v_wcountSum
,
&
v_wcount_dhSum
,
&
v_div_vSum
,
&
v_curlvxSum
,
&
v_curlvySum
,
&
v_curlvzSum
,
int_mask
,
int_mask2
,
0
);
}
/* Perform horizontal adds on vector sums and store result in particle pi.
...
...
src/runner_doiact_vec.h
View file @
78a1e165
...
...
@@ -34,8 +34,10 @@
#include
"vector.h"
/* Function prototypes. */
void
runner_doself_subset_density_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
);
void
runner_doself_subset_density_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
);
void
runner_doself1_density_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
c
);
void
runner_doself2_force_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
c
);
void
runner_dopair1_density_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
...
...
tests/test27cells.c
View file @
78a1e165
...
...
@@ -311,9 +311,12 @@ void runner_doself1_density_vec(struct runner *r, struct cell *ci);
void
runner_dopair1_branch_density
(
struct
runner
*
r
,
struct
cell
*
ci
,
struct
cell
*
cj
);
void
runner_doself_subset_density
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
);
void
runner_doself_subset_density_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
);
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
);
void
runner_doself_subset_density_vec
(
struct
runner
*
r
,
struct
cell
*
restrict
ci
,
struct
part
*
restrict
parts
,
int
*
restrict
ind
,
int
count
);
/* And go... */
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
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