imcs.c
/* Checks that all operators in subtree are reentrant and have the same boundaries */
Checks that all operators in subtree are reentrant and have the same boundaries
Checks that all operators in subtree are reentrant and have the same boundaries
static bool imcs_parallel_execution_possible_for_operator(imcs_iterator_h iterator, imcs_visitor_context_t* ctx)
{
    if (iterator == NULL) {
        return true;
    }
    if (iterator->flags & FLAG_CONTEXT_FREE) {
        if (iterator->flags & FLAG_RANDOM_ACCESS) {
            Assert(iterator->last_pos != IMCS_INFINITY);
            if (ctx->interval > iterator->last_pos - iterator->first_pos + 1) {
                ctx->interval = iterator->last_pos - iterator->first_pos + 1;
            }
        } else {
            int i;
            for (i = 0; i < 3; i++) {
                if (!imcs_parallel_execution_possible_for_operator(iterator->opd[i], ctx)) {
                    return false;
                }
            }
        }
        return true;
    }
    return false;
}
static bool imcs_parallel_execution_possible_for_operator ( imcs_iterator_h iterator , imcs_visitor_context_t * ctx ) { if ( iterator == NULL ) { return true ; } if ( iterator -> flags & FLAG_CONTEXT_FREE ) { if ( iterator -> flags & FLAG_RANDOM_ACCESS ) { Assert ( iterator -> last_pos != IMCS_INFINITY ) ; if ( ctx -> interval > iterator -> last_pos - iterator -> first_pos + 1 ) { ctx -> interval = iterator -> last_pos - iterator -> first_pos + 1 ; } } else { int i ; for ( i = 0 ; i < 3 ; i ++ ) { if ( ! imcs_parallel_execution_possible_for_operator ( iterator -> opd [ i ] , ctx ) ) { return false ; } } } return true ; } return false ; }
Checks that all operators in subtree are reentrant and have the same boundaries
Checks that all operators in subtree are reentrant and have the same boundaries