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
4b3fc4a9
Commit
4b3fc4a9
authored
Oct 07, 2017
by
James Willis
Browse files
Removed unused parameter.
parent
77606a7e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/cache.h
View file @
4b3fc4a9
...
...
@@ -296,7 +296,6 @@ __attribute__((always_inline)) INLINE void cache_read_force_particles(
* @param shift The amount to shift the particle positions to account for BCs
* @param first_pi The first particle in cell ci that is in range.
* @param last_pj The last particle in cell cj that is in range.
* @param num_vec_proc Number of vectors that will be used to process the
* interaction.
*/
__attribute__
((
always_inline
))
INLINE
void
cache_read_two_partial_cells_sorted
(
...
...
@@ -304,20 +303,20 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
struct
cache
*
restrict
const
ci_cache
,
struct
cache
*
restrict
const
cj_cache
,
const
struct
entry
*
restrict
sort_i
,
const
struct
entry
*
restrict
sort_j
,
const
double
*
restrict
const
shift
,
int
*
first_pi
,
int
*
last_pj
,
const
int
num_vec_proc
)
{
int
*
first_pi
,
int
*
last_pj
)
{
int
idx
;
/* Pad number of particles read to the vector size. */
int
rem
=
(
ci
->
count
-
*
first_pi
)
%
(
num_vec_proc
*
VEC_SIZE
)
;
int
rem
=
(
ci
->
count
-
*
first_pi
)
%
VEC_SIZE
;
if
(
rem
!=
0
)
{
int
pad
=
(
num_vec_proc
*
VEC_SIZE
)
-
rem
;
int
pad
=
VEC_SIZE
-
rem
;
if
(
*
first_pi
-
pad
>=
0
)
*
first_pi
-=
pad
;
}
rem
=
*
last_pj
%
(
num_vec_proc
*
VEC_SIZE
)
;
rem
=
*
last_pj
%
VEC_SIZE
;
if
(
rem
!=
0
)
{
int
pad
=
(
num_vec_proc
*
VEC_SIZE
)
-
rem
;
int
pad
=
VEC_SIZE
-
rem
;
if
(
*
last_pj
+
pad
<
cj
->
count
)
*
last_pj
+=
pad
;
}
...
...
@@ -511,7 +510,6 @@ __attribute__((always_inline)) INLINE void cache_read_two_partial_cells_sorted(
* @param shift The amount to shift the particle positions to account for BCs
* @param first_pi The first particle in cell ci that is in range.
* @param last_pj The last particle in cell cj that is in range.
* @param num_vec_proc Number of vectors that will be used to process the
* interaction.
*/
__attribute__
((
always_inline
))
INLINE
void
...
...
@@ -519,21 +517,20 @@ cache_read_two_partial_cells_sorted_force(
const
struct
cell
*
const
ci
,
const
struct
cell
*
const
cj
,
struct
cache
*
const
ci_cache
,
struct
cache
*
const
cj_cache
,
const
struct
entry
*
restrict
sort_i
,
const
struct
entry
*
restrict
sort_j
,
const
double
*
const
shift
,
int
*
first_pi
,
int
*
last_pj
,
const
int
num_vec_proc
)
{
const
double
*
const
shift
,
int
*
first_pi
,
int
*
last_pj
)
{
int
idx
;
/* Pad number of particles read to the vector size. */
int
rem
=
(
ci
->
count
-
*
first_pi
)
%
(
num_vec_proc
*
VEC_SIZE
)
;
int
rem
=
(
ci
->
count
-
*
first_pi
)
%
VEC_SIZE
;
if
(
rem
!=
0
)
{
int
pad
=
(
num_vec_proc
*
VEC_SIZE
)
-
rem
;
int
pad
=
VEC_SIZE
-
rem
;
if
(
*
first_pi
-
pad
>=
0
)
*
first_pi
-=
pad
;
}
rem
=
*
last_pj
%
(
num_vec_proc
*
VEC_SIZE
)
;
rem
=
*
last_pj
%
VEC_SIZE
;
if
(
rem
!=
0
)
{
int
pad
=
(
num_vec_proc
*
VEC_SIZE
)
-
rem
;
int
pad
=
VEC_SIZE
-
rem
;
if
(
*
last_pj
+
pad
<
cj
->
count
)
*
last_pj
+=
pad
;
}
...
...
src/runner_doiact_vec.c
View file @
4b3fc4a9
...
...
@@ -1006,7 +1006,7 @@ void runner_dopair1_density_vec(struct runner *r, struct cell *ci,
int
last_pj_align
=
last_pj
;
cache_read_two_partial_cells_sorted
(
ci
,
cj
,
ci_cache
,
cj_cache
,
sort_i
,
sort_j
,
shift
,
&
first_pi_align
,
&
last_pj_align
,
1
);
&
last_pj_align
);
/* Get the number of particles read into the ci cache. */
int
ci_cache_count
=
count_i
-
first_pi_align
;
...
...
@@ -1391,7 +1391,7 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
int
last_pj_align
=
last_pj
;
cache_read_two_partial_cells_sorted_force
(
ci
,
cj
,
ci_cache
,
cj_cache
,
sort_i
,
sort_j
,
shift
,
&
first_pi_align
,
&
last_pj_align
,
1
);
&
last_pj_align
);
/* Get the number of particles read into the ci cache. */
int
ci_cache_count
=
count_i
-
first_pi_align
;
...
...
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