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

make kick1 recursive when cell is sufficiently small.

Former-commit-id: 58f259d0fb33f31724cdbaefc1b756075d4b9d5f
parent 55e8bd0b
Branches
Tags
No related merge requests found
...@@ -738,6 +738,8 @@ void runner_dokick1 ( struct runner *r , struct cell *c ) { ...@@ -738,6 +738,8 @@ void runner_dokick1 ( struct runner *r , struct cell *c ) {
/* Loop over the progeny. */ /* Loop over the progeny. */
for ( k = 0 ; k < 8 ; k++ ) for ( k = 0 ; k < 8 ; k++ )
if ( c->progeny[k] != NULL ) { if ( c->progeny[k] != NULL ) {
if ( c->count < space_subsize )
runner_dokick1( r , c->progeny[k] );
dt_min = fminf( dt_min , c->progeny[k]->dt_min ); dt_min = fminf( dt_min , c->progeny[k]->dt_min );
dt_max = fmaxf( dt_max , c->progeny[k]->dt_max ); dt_max = fmaxf( dt_max , c->progeny[k]->dt_max );
h_max = fmaxf( h_max , c->progeny[k]->h_max ); h_max = fmaxf( h_max , c->progeny[k]->h_max );
......
...@@ -74,4 +74,6 @@ void runner_dopair_density ( struct runner *r , struct cell *ci , struct cell *c ...@@ -74,4 +74,6 @@ void runner_dopair_density ( struct runner *r , struct cell *ci , struct cell *c
void runner_doself_density ( struct runner *r , struct cell *c ); void runner_doself_density ( struct runner *r , struct cell *c );
void runner_dosub_density ( struct runner *r , struct cell *ci , struct cell *cj , int flags ); void runner_dosub_density ( struct runner *r , struct cell *ci , struct cell *cj , int flags );
void runner_dosort ( struct runner *r , struct cell *c , int flag , int clock ); void runner_dosort ( struct runner *r , struct cell *c , int flag , int clock );
void runner_dokick1 ( struct runner *r , struct cell *c );
void runner_dokick2 ( struct runner *r , struct cell *c );
void *runner_main ( void *data ); void *runner_main ( void *data );
...@@ -72,9 +72,11 @@ void scheduler_map_mkghosts ( struct cell *c , void *data ) { ...@@ -72,9 +72,11 @@ void scheduler_map_mkghosts ( struct cell *c , void *data ) {
c->ghost = scheduler_addtask( s , task_type_ghost , task_subtype_none , 0 , 0 , c , NULL , 0 ); c->ghost = scheduler_addtask( s , task_type_ghost , task_subtype_none , 0 , 0 , c , NULL , 0 );
/* Append a kick1 task and make sure the parent depends on it. */ /* Append a kick1 task and make sure the parent depends on it. */
c->kick1 = scheduler_addtask( s , task_type_kick1 , task_subtype_none , 0 , 0 , c , NULL , 0 ); if ( c->parent == NULL || c->parent->count >= space_subsize ) {
if ( c->parent != NULL ) c->kick1 = scheduler_addtask( s , task_type_kick1 , task_subtype_none , 0 , 0 , c , NULL , 0 );
task_addunlock( c->kick1 , c->parent->kick1 ); if ( c->parent != NULL )
task_addunlock( c->kick1 , c->parent->kick1 );
}
/* Append a kick2 task if we are the active super cell. */ /* Append a kick2 task if we are the active super cell. */
if ( c->super == c && c->nr_tasks > 0 ) if ( c->super == c && c->nr_tasks > 0 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment