

Public Member Functions | |
| SEL_IMERGE () | |
| int | or_sel_tree (RANGE_OPT_PARAM *param, SEL_TREE *tree) |
| int | or_sel_tree_with_checks (RANGE_OPT_PARAM *param, SEL_TREE *new_tree) |
| int | or_sel_imerge_with_checks (RANGE_OPT_PARAM *param, SEL_IMERGE *imerge) |
Public Attributes | |
| SEL_TREE * | trees_prealloced [PREALLOCED_TREES] |
| SEL_TREE ** | trees |
| SEL_TREE ** | trees_next |
| SEL_TREE ** | trees_end |
| SEL_ARG *** | best_keys |
Private Types | |
| PREALLOCED_TREES = 10 | |
| enum | { PREALLOCED_TREES = 10 } |
Definition at line 654 of file opt_range.cc.
anonymous enum [private] |
| SEL_IMERGE::SEL_IMERGE | ( | ) | [inline] |
Definition at line 665 of file opt_range.cc.
00665 : 00666 trees(&trees_prealloced[0]), 00667 trees_next(trees), 00668 trees_end(trees + PREALLOCED_TREES) 00669 {} int or_sel_tree(RANGE_OPT_PARAM *param, SEL_TREE *tree);
| int SEL_IMERGE::or_sel_imerge_with_checks | ( | RANGE_OPT_PARAM * | param, | |
| SEL_IMERGE * | imerge | |||
| ) |
Definition at line 773 of file opt_range.cc.
References or_sel_tree_with_checks(), trees, and trees_next.
Referenced by imerge_list_or_list().
00774 { 00775 for (SEL_TREE** tree= imerge->trees; 00776 tree != imerge->trees_next; 00777 tree++) 00778 { 00779 if (or_sel_tree_with_checks(param, *tree)) 00780 return 1; 00781 } 00782 return 0; 00783 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int SEL_IMERGE::or_sel_tree | ( | RANGE_OPT_PARAM * | param, | |
| SEL_TREE * | tree | |||
| ) |
Definition at line 688 of file opt_range.cc.
References alloc_root(), RANGE_OPT_PARAM::mem_root, memcpy, trees, trees_end, and trees_next.
Referenced by or_sel_tree_with_checks(), and tree_or().
00689 { 00690 if (trees_next == trees_end) 00691 { 00692 const int realloc_ratio= 2; /* Double size for next round */ 00693 uint old_elements= (trees_end - trees); 00694 uint old_size= sizeof(SEL_TREE**) * old_elements; 00695 uint new_size= old_size * realloc_ratio; 00696 SEL_TREE **new_trees; 00697 if (!(new_trees= (SEL_TREE**)alloc_root(param->mem_root, new_size))) 00698 return -1; 00699 memcpy(new_trees, trees, old_size); 00700 trees= new_trees; 00701 trees_next= trees + old_elements; 00702 trees_end= trees + old_elements * realloc_ratio; 00703 } 00704 *(trees_next++)= tree; 00705 return 0; 00706 }
Here is the call graph for this function:

Here is the caller graph for this function:

| int SEL_IMERGE::or_sel_tree_with_checks | ( | RANGE_OPT_PARAM * | param, | |
| SEL_TREE * | new_tree | |||
| ) |
Definition at line 739 of file opt_range.cc.
References SEL_TREE::ALWAYS, SEL_TREE::MAYBE, or_sel_tree(), sel_trees_can_be_ored(), tree_or(), trees, and trees_next.
Referenced by imerge_list_or_tree(), and or_sel_imerge_with_checks().
00740 { 00741 for (SEL_TREE** tree = trees; 00742 tree != trees_next; 00743 tree++) 00744 { 00745 if (sel_trees_can_be_ored(*tree, new_tree, param)) 00746 { 00747 *tree = tree_or(param, *tree, new_tree); 00748 if (!*tree) 00749 return 1; 00750 if (((*tree)->type == SEL_TREE::MAYBE) || 00751 ((*tree)->type == SEL_TREE::ALWAYS)) 00752 return 1; 00753 /* SEL_TREE::IMPOSSIBLE is impossible here */ 00754 return 0; 00755 } 00756 } 00757 00758 /* New tree cannot be combined with any of existing trees. */ 00759 return or_sel_tree(param, new_tree); 00760 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 663 of file opt_range.cc.
Definition at line 659 of file opt_range.cc.
Referenced by get_best_disjunct_quick(), or_sel_imerge_with_checks(), or_sel_tree(), and or_sel_tree_with_checks().
Definition at line 660 of file opt_range.cc.
Referenced by get_best_disjunct_quick(), or_sel_imerge_with_checks(), or_sel_tree(), and or_sel_tree_with_checks().
| SEL_TREE* SEL_IMERGE::trees_prealloced[PREALLOCED_TREES] |
Definition at line 658 of file opt_range.cc.
1.4.7

