src/bbox.c
void bbox_divide_in2_ondim(const struct bbox *b0, struct bbox *b_tab, int dim)
{
    uint64_t n;

    n = (b0->lb.c[dim] + b0->ub.c[dim]) >> 1;
    b_tab[0] = b0[0];
    b_tab[1] = b0[0];

    b_tab[0].ub.c[dim] = n;
    b_tab[1].lb.c[dim] = n + 1;
}
/*
  Split the bounding box b0 in two along dimension dim, and store the
  result in b_tab.
*/
Split the bounding box b0 in two along dimension dim, and store the
result in b_tab.
Split the bounding box b0 in two along dimension dim and store the result in b_tab .
void bbox_divide_in2_ondim(const struct bbox *b0, struct bbox *b_tab, int dim)
{
    uint64_t n;
    n = (b0->lb.c[dim] + b0->ub.c[dim]) >> 1;
    b_tab[0] = b0[0];
    b_tab[1] = b0[0];
    b_tab[0].ub.c[dim] = n;
    b_tab[1].lb.c[dim] = n + 1;
}
void bbox_divide_in2_ondim ( const struct bbox * b0 , struct bbox * b_tab , int dim ) { uint64_t n ; n = ( b0 -> lb . c [ dim ] + b0 -> ub . c [ dim ] ) >> 1 ; b_tab [ 0 ] = b0 [ 0 ] ; b_tab [ 1 ] = b0 [ 0 ] ; b_tab [ 0 ] . ub . c [ dim ] = n ; b_tab [ 1 ] . lb . c [ dim ] = n + 1 ; }
Split the bounding box b0 in two along dimension dim, and store the
result in b_tab.
Split the bounding box b0 in two along dimension dim and store the result in b_tab .