Commit fa60b920 authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

be more careful regarding empty cells.


Former-commit-id: 4f9fea4c98297fbdc115398e1ed84e9f6a69ab5a
parent 889b369d
......@@ -547,106 +547,179 @@ void runner_dosub ( struct runner_thread *rt , struct cell *ci , struct cell *cj
case 0:
for ( j = 0 ; j < 7 ; j++ )
for ( k = j + 1 ; k < 8 ; k++ )
runner_dopair( rt , ci->progeny[j] , ci->progeny[k] );
if ( ci->progeny[j] != NULL && ci->progeny[k] != NULL )
runner_dopair( rt , ci->progeny[j] , ci->progeny[k] );
break;
case 1: /* ( 1 , 1 , 0 ) */
runner_dopair( rt , ci->progeny[6] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[1] );
if ( ci->progeny[6] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[0] );
if ( ci->progeny[6] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
if ( ci->progeny[7] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
if ( ci->progeny[7] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[1] );
break;
case 3: /* ( 1 , 0 , 1 ) */
runner_dopair( rt , ci->progeny[5] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[2] );
if ( ci->progeny[5] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[0] );
if ( ci->progeny[5] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[2] );
if ( ci->progeny[7] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
if ( ci->progeny[7] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[2] );
break;
case 4: /* ( 1 , 0 , 0 ) */
runner_dopair( rt , ci->progeny[4] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[4] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[4] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[4] , cj->progeny[3] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[3] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[3] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[3] );
if ( ci->progeny[4] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[4] , cj->progeny[0] );
if ( ci->progeny[4] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[4] , cj->progeny[1] );
if ( ci->progeny[4] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[4] , cj->progeny[2] );
if ( ci->progeny[4] != NULL && cj->progeny[3] != NULL )
runner_dopair( rt , ci->progeny[4] , cj->progeny[3] );
if ( ci->progeny[5] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[0] );
if ( ci->progeny[5] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[1] );
if ( ci->progeny[5] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[2] );
if ( ci->progeny[5] != NULL && cj->progeny[3] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[3] );
if ( ci->progeny[6] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[0] );
if ( ci->progeny[6] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
if ( ci->progeny[6] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[2] );
if ( ci->progeny[6] != NULL && cj->progeny[3] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[3] );
if ( ci->progeny[7] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
if ( ci->progeny[7] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[1] );
if ( ci->progeny[7] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[2] );
if ( ci->progeny[7] != NULL && cj->progeny[3] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[3] );
break;
case 5: /* ( 1 , 0 , -1 ) */
runner_dopair( rt , ci->progeny[4] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[4] , cj->progeny[3] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[3] );
if ( ci->progeny[4] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[4] , cj->progeny[1] );
if ( ci->progeny[4] != NULL && cj->progeny[3] != NULL )
runner_dopair( rt , ci->progeny[4] , cj->progeny[3] );
if ( ci->progeny[6] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
if ( ci->progeny[6] != NULL && cj->progeny[3] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[3] );
break;
case 7: /* ( 1 , -1 , 0 ) */
runner_dopair( rt , ci->progeny[4] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[4] , cj->progeny[3] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[3] );
if ( ci->progeny[4] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[4] , cj->progeny[2] );
if ( ci->progeny[4] != NULL && cj->progeny[3] != NULL )
runner_dopair( rt , ci->progeny[4] , cj->progeny[3] );
if ( ci->progeny[5] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[2] );
if ( ci->progeny[5] != NULL && cj->progeny[3] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[3] );
break;
case 9: /* ( 0 , 1 , 1 ) */
runner_dopair( rt , ci->progeny[3] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[4] );
if ( ci->progeny[3] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[0] );
if ( ci->progeny[3] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[4] );
if ( ci->progeny[7] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
if ( ci->progeny[7] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[4] );
break;
case 10: /* ( 0 , 1 , 0 ) */
runner_dopair( rt , ci->progeny[2] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[2] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[2] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[2] , cj->progeny[5] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[5] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[5] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[5] );
if ( ci->progeny[2] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[2] , cj->progeny[0] );
if ( ci->progeny[2] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[2] , cj->progeny[1] );
if ( ci->progeny[2] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[2] , cj->progeny[4] );
if ( ci->progeny[2] != NULL && cj->progeny[5] != NULL )
runner_dopair( rt , ci->progeny[2] , cj->progeny[5] );
if ( ci->progeny[3] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[0] );
if ( ci->progeny[3] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[1] );
if ( ci->progeny[3] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[4] );
if ( ci->progeny[3] != NULL && cj->progeny[5] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[5] );
if ( ci->progeny[6] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[0] );
if ( ci->progeny[6] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
if ( ci->progeny[6] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[4] );
if ( ci->progeny[6] != NULL && cj->progeny[5] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[5] );
if ( ci->progeny[7] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
if ( ci->progeny[7] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[1] );
if ( ci->progeny[7] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[4] );
if ( ci->progeny[7] != NULL && cj->progeny[5] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[5] );
break;
case 11: /* ( 0 , 1 , -1 ) */
runner_dopair( rt , ci->progeny[2] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[2] , cj->progeny[5] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
runner_dopair( rt , ci->progeny[6] , cj->progeny[5] );
if ( ci->progeny[2] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[2] , cj->progeny[1] );
if ( ci->progeny[2] != NULL && cj->progeny[5] != NULL )
runner_dopair( rt , ci->progeny[2] , cj->progeny[5] );
if ( ci->progeny[6] != NULL && cj->progeny[1] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[1] );
if ( ci->progeny[6] != NULL && cj->progeny[5] != NULL )
runner_dopair( rt , ci->progeny[6] , cj->progeny[5] );
break;
case 12: /* ( 0 , 0 , 1 ) */
runner_dopair( rt , ci->progeny[1] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[1] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[1] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[1] , cj->progeny[6] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[3] , cj->progeny[6] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[5] , cj->progeny[6] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[2] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[4] );
runner_dopair( rt , ci->progeny[7] , cj->progeny[6] );
if ( ci->progeny[1] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[1] , cj->progeny[0] );
if ( ci->progeny[1] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[1] , cj->progeny[2] );
if ( ci->progeny[1] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[1] , cj->progeny[4] );
if ( ci->progeny[1] != NULL && cj->progeny[6] != NULL )
runner_dopair( rt , ci->progeny[1] , cj->progeny[6] );
if ( ci->progeny[3] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[0] );
if ( ci->progeny[3] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[2] );
if ( ci->progeny[3] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[4] );
if ( ci->progeny[3] != NULL && cj->progeny[6] != NULL )
runner_dopair( rt , ci->progeny[3] , cj->progeny[6] );
if ( ci->progeny[5] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[0] );
if ( ci->progeny[5] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[2] );
if ( ci->progeny[5] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[4] );
if ( ci->progeny[5] != NULL && cj->progeny[6] != NULL )
runner_dopair( rt , ci->progeny[5] , cj->progeny[6] );
if ( ci->progeny[7] != NULL && cj->progeny[0] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[0] );
if ( ci->progeny[7] != NULL && cj->progeny[2] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[2] );
if ( ci->progeny[7] != NULL && cj->progeny[4] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[4] );
if ( ci->progeny[7] != NULL && cj->progeny[6] != NULL )
runner_dopair( rt , ci->progeny[7] , cj->progeny[6] );
break;
}
......
......@@ -916,7 +916,8 @@ void space_maketasks ( struct space *s , int do_sort ) {
/* Make it depend on all the sorts of its progeny. */
for ( k = 0 ; k < 8 ; k++ )
for ( j = 0 ; j < 13 ; j++ )
task_addunlock( c->progeny[k]->sorts[j] , t );
if ( c->progeny[k] != NULL )
task_addunlock( c->progeny[k]->sorts[j] , t );
}
......
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