Skip to content
Snippets Groups Projects
Commit b254e198 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

generalized concept of sub-tasks, added space_subsize to determine when subs...

generalized concept of sub-tasks, added space_subsize to determine when subs are created, cleaned-up task creation and cell splitting.


Former-commit-id: 2d34a8c144463e04ed5fc54ba914e1b2fa74b6d3
parent 53e75dea
No related branches found
No related tags found
No related merge requests found
......@@ -321,7 +321,7 @@ void runner_dosort ( struct runner *r , struct cell *c , int flags ) {
void runner_doghost ( struct runner *r , struct cell *c ) {
struct part *p;
struct cell *finger, *finger_prev;;
struct cell *finger;
int i, k, redo, count = c->count;
int *pid;
float ihg, ihg2;
......@@ -402,7 +402,6 @@ void runner_doghost ( struct runner *r , struct cell *c ) {
// error( "Bad smoothing length, fixing this isn't implemented yet." );
/* Climb up the cell hierarchy. */
finger_prev = c;
for ( finger = c ; finger != NULL ; finger = finger->parent ) {
/* Run through this cell's density interactions. */
......@@ -424,14 +423,18 @@ void runner_doghost ( struct runner *r , struct cell *c ) {
}
/* Otherwise, sub interaction? */
else if ( finger->density[k]->type == task_type_sub )
runner_dosub_subset_density( r , finger->density[k]->ci , finger->density[k]->cj , finger_prev , c->parts , pid , count , finger->density[k]->flags );
else if ( finger->density[k]->type == task_type_sub ) {
/* Left or right? */
if ( finger->density[k]->ci == finger )
runner_dosub_subset_density( r , finger , c->parts , pid , count , finger->density[k]->cj , -1 );
else
runner_dosub_subset_density( r , finger , c->parts , pid , count , finger->density[k]->ci , -1 );
}
}
/* Keep a finger on the previous cell. */
finger_prev = finger;
}
}
......
This diff is collapsed.
This diff is collapsed.
......@@ -25,6 +25,7 @@
#define space_cellallocchunk 1000
#define space_splitratio 0.875
#define space_splitsize_default 400
#define space_subsize_default 1000
#define space_dosub 1
#define space_stretch 1.0
......@@ -34,6 +35,7 @@
/* Split size. */
extern int space_splitsize;
extern int space_subsize;
/* Map shift vector to sortlist. */
extern const int sortlistID[27];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment