Skip to content
Snippets Groups Projects
Commit f082cf80 authored by James Willis's avatar James Willis
Browse files

Renaming and adding const.

parent 6b95efcd
Branches
Tags
1 merge request!480Dopair subset vec
......@@ -253,9 +253,9 @@ __attribute__((always_inline)) INLINE void cache_read_particles_subset(
/* The cell is on the right so read the particles
* into the cache from the start of the cell. */
if (!flipped) {
int rem = (*last_pi + 1) % VEC_SIZE;
const int rem = (*last_pi + 1) % VEC_SIZE;
if (rem != 0) {
int pad = VEC_SIZE - rem;
const int pad = VEC_SIZE - rem;
/* Increase last_pi if there are particles in the cell left to read. */
if (*last_pi + pad < ci->count) *last_pi += pad;
......@@ -299,15 +299,15 @@ __attribute__((always_inline)) INLINE void cache_read_particles_subset(
/* The cell is on the left so read the particles
* into the cache from the end of the cell. */
else {
int rem = (ci->count - *first_pi) % VEC_SIZE;
const int rem = (ci->count - *first_pi) % VEC_SIZE;
if (rem != 0) {
int pad = VEC_SIZE - rem;
const int pad = VEC_SIZE - rem;
/* Decrease first_pi if there are particles in the cell left to read. */
if (*first_pi - pad >= 0) *first_pi -= pad;
}
int ci_cache_count = ci->count - *first_pi;
const int ci_cache_count = ci->count - *first_pi;
/* Shift the particles positions to a local frame so single precision can be
* used instead of double precision. */
......
......@@ -262,7 +262,7 @@ __attribute__((always_inline)) INLINE static void storeInteractions(
* @param active_ci Is any particle in cell ci active?
* @param active_cj Is any particle in cell cj active?
*/
__attribute__((always_inline)) INLINE static void populate_max_index(
__attribute__((always_inline)) INLINE static void populate_max_index_density(
const struct cell *ci, const struct cell *cj,
const struct entry *restrict sort_i, const struct entry *restrict sort_j,
const float dx_max, const float rshift, const double hi_max,
......@@ -1390,7 +1390,7 @@ __attribute__((always_inline)) INLINE void runner_dopair1_density_vec(
/* Find particles maximum index into cj, max_index_i[] and ci, max_index_j[].
* Also find the first pi that interacts with any particle in cj and the last
* pj that interacts with any particle in ci. */
populate_max_index(ci, cj, sort_i, sort_j, dx_max, rshift, hi_max, hj_max,
populate_max_index_density(ci, cj, sort_i, sort_j, dx_max, rshift, hi_max, hj_max,
di_max, dj_min, max_index_i, max_index_j, &first_pi,
&last_pj, max_active_bin, active_ci, active_cj);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment