Lines Matching refs:split

1784 static inline bool mab_middle_node(struct maple_big_node *b_node, int split,  in mab_middle_node()  argument
1792 if (!b_node->slot[split] && (size >= 2 * slot_count - 1)) in mab_middle_node()
1807 unsigned char split, unsigned char slot_count) in mab_no_null_split() argument
1809 if (!b_node->slot[split]) { in mab_no_null_split()
1814 if ((split < slot_count - 1) && in mab_no_null_split()
1815 (b_node->b_end - split) > (mt_min_slots[b_node->type])) in mab_no_null_split()
1816 split++; in mab_no_null_split()
1818 split--; in mab_no_null_split()
1820 return split; in mab_no_null_split()
1835 int split = b_end / 2; /* Assume equal split. */ in mab_calc_split() local
1846 split = b_end - mt_min_slots[bn->type]; in mab_calc_split()
1849 return split; in mab_calc_split()
1852 if (!bn->slot[split]) in mab_calc_split()
1853 split--; in mab_calc_split()
1854 return split; in mab_calc_split()
1865 if (unlikely(mab_middle_node(bn, split, slot_count))) { in mab_calc_split()
1866 split = b_end / 3; in mab_calc_split()
1867 *mid_split = split * 2; in mab_calc_split()
1877 while (((bn->pivot[split] - min) < slot_count - 1) && in mab_calc_split()
1878 (split < slot_count - 1) && (b_end - split > slot_min)) in mab_calc_split()
1879 split++; in mab_calc_split()
1883 split = mab_no_null_split(bn, split, slot_count); in mab_calc_split()
1885 return split; in mab_calc_split()
1889 return split; in mab_calc_split()
2605 unsigned char split = 0; in mas_mab_to_node() local
2614 split = b_node->b_end; in mas_mab_to_node()
2616 split = mab_calc_split(mas, b_node, mid_split, min); in mas_mab_to_node()
2623 return split; in mas_mab_to_node()
2660 unsigned char *slot, unsigned char split) in mas_set_split_parent() argument
2665 if ((*slot) <= split) in mas_set_split_parent()
2668 mte_set_parent(mas->node, right, (*slot) - split - 1); in mas_set_split_parent()
2686 unsigned char *split, in mte_mid_split_check() argument
2697 *split = mid_split; in mte_mid_split_check()
2712 unsigned char split, in mast_set_split_parents() argument
2727 mte_mid_split_check(&l, &r, right, slot, &split, mid_split); in mast_set_split_parents()
2728 mas_set_split_parent(mast->l, l, r, &slot, split); in mast_set_split_parents()
2730 mte_mid_split_check(&l, &r, right, slot, &split, mid_split); in mast_set_split_parents()
2731 mas_set_split_parent(mast->m, l, r, &slot, split); in mast_set_split_parents()
2733 mte_mid_split_check(&l, &r, right, slot, &split, mid_split); in mast_set_split_parents()
2734 mas_set_split_parent(mast->r, l, r, &slot, split); in mast_set_split_parents()
2803 struct maple_enode *right, unsigned char split, unsigned char mid_split) in mast_cp_to_nodes() argument
2812 if (split == mast->bn->b_end) { in mast_cp_to_nodes()
2817 mab_mas_cp(mast->bn, 0, split, mast->l, new_lmax); in mast_cp_to_nodes()
2820 mab_mas_cp(mast->bn, 1 + split, mid_split, mast->m, true); in mast_cp_to_nodes()
2821 mast->m->min = mast->bn->pivot[split] + 1; in mast_cp_to_nodes()
2822 split = mid_split; in mast_cp_to_nodes()
2827 mab_mas_cp(mast->bn, 1 + split, mast->bn->b_end, mast->r, false); in mast_cp_to_nodes()
2828 mast->r->min = mast->bn->pivot[split] + 1; in mast_cp_to_nodes()
2972 unsigned char split, mid_split; in mas_spanning_rebalance() local
3014 split = mas_mab_to_node(mas, mast->bn, &left, &right, &middle, in mas_spanning_rebalance()
3016 mast_set_split_parents(mast, left, middle, right, split, in mas_spanning_rebalance()
3018 mast_cp_to_nodes(mast, left, middle, right, split, mid_split); in mas_spanning_rebalance()
3167 unsigned char offset, tmp, split = mt_slots[mt] / 2; in mas_destroy_rebalance() local
3196 if (!l_slots[split]) in mas_destroy_rebalance()
3197 split++; in mas_destroy_rebalance()
3198 tmp = mas_data_end(&l_mas) - split; in mas_destroy_rebalance()
3200 memcpy(slots, l_slots + split + 1, sizeof(void *) * tmp); in mas_destroy_rebalance()
3201 memcpy(pivs, l_pivs + split + 1, sizeof(unsigned long) * tmp); in mas_destroy_rebalance()
3206 l_mas.max = l_pivs[split]; in mas_destroy_rebalance()
3225 l_pivs[split]); in mas_destroy_rebalance()
3228 tmp = split + 1; in mas_destroy_rebalance()
3231 ma_set_meta(left, mt, 0, split); in mas_destroy_rebalance()
3245 memcpy(slots, l_slots, sizeof(void *) * split); in mas_destroy_rebalance()
3246 memcpy(pivs, l_pivs, sizeof(unsigned long) * split); in mas_destroy_rebalance()
3247 ma_set_meta(new_left, mt, 0, split); in mas_destroy_rebalance()
3319 unsigned char split; in mast_fill_bnode() local
3337 split = mast->bn->b_end; in mast_fill_bnode()
3345 mas_mab_cp(mas, split + skip, mt_slot_count(mas->node) - 1, in mast_fill_bnode()
3360 struct ma_state *mas, unsigned char split) in mast_split_data() argument
3364 mab_mas_cp(mast->bn, 0, split, mast->l, true); in mast_split_data()
3366 mab_mas_cp(mast->bn, split + 1, mast->bn->b_end, mast->r, false); in mast_split_data()
3368 mast->l->max = mast->bn->pivot[split]; in mast_split_data()
3375 &p_slot, split); in mast_split_data()
3377 &p_slot, split); in mast_split_data()
3396 unsigned char end, space, split; in mas_push_data() local
3431 split = mt_slots[mast->bn->type] - 2; in mas_push_data()
3443 split = slot_total - split; in mas_push_data()
3445 split = mab_no_null_split(mast->bn, split, mt_slots[mast->bn->type]); in mas_push_data()
3450 mast_split_data(mast, mas, split); in mas_push_data()
3467 unsigned char mid_split, split = 0; in mas_split() local
3530 split = mab_calc_split(mas, b_node, &mid_split, prev_l_mas.min); in mas_split()
3531 mast_split_data(&mast, mas, split); in mas_split()