Commit 943b0e1f authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

make all particle counters size_t instead of int. this will break a lot of...

make all particle counters size_t instead of int. this will break a lot of stuff, the following commits will be file-by-file fixes.
parent df4c568f
......@@ -85,8 +85,8 @@ struct space {
struct gpart *gparts;
/* The total number of parts in the space. */
int nr_parts, size_parts;
int nr_gparts, size_gparts;
size_t nr_parts, size_parts;
size_t nr_gparts, size_gparts;
/* Is the space periodic? */
int periodic;
......@@ -102,12 +102,13 @@ struct space {
/* Buffers for parts that we will receive from foreign cells. */
struct part *parts_foreign;
int nr_parts_foreign, size_parts_foreign;
size_t nr_parts_foreign, size_parts_foreign;
};
/* Interval stack necessary for parallel particle sorting. */
struct qstack {
volatile int i, j, min, max;
volatile size_t i, j;
volatile int min, max;
volatile int ready;
};
struct parallel_sort {
......@@ -121,13 +122,13 @@ struct parallel_sort {
extern struct parallel_sort space_sort_struct;
/* function prototypes. */
void space_parts_sort(struct space *s, int *ind, int N, int min, int max,
void space_parts_sort(struct space *s, size_t *ind, size_t N, int min, int max,
int verbose);
void space_gparts_sort(struct gpart *gparts, int *ind, int N, int min, int max);
void space_gparts_sort(struct gpart *gparts, size_t *ind, size_t N, int min, int max);
struct cell *space_getcell(struct space *s);
int space_getsid(struct space *s, struct cell **ci, struct cell **cj,
double *shift);
void space_init(struct space *s, double dim[3], struct part *parts, int N,
void space_init(struct space *s, double dim[3], struct part *parts, size_t N,
int periodic, double h_max, int verbose);
void space_map_cells_pre(struct space *s, int full,
void (*fun)(struct cell *c, void *data), void *data);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment