Lines Matching refs:nelem

972   set->nelem = 0;  in re_node_set_alloc()
985 set->nelem = 1; in re_node_set_init_1()
989 set->alloc = set->nelem = 0; in re_node_set_init_1()
1006 set->nelem = 1; in re_node_set_init_2()
1011 set->nelem = 2; in re_node_set_init_2()
1030 dest->nelem = src->nelem; in re_node_set_init_copy()
1031 if (src->nelem > 0) in re_node_set_init_copy()
1033 dest->alloc = dest->nelem; in re_node_set_init_copy()
1037 dest->alloc = dest->nelem = 0; in re_node_set_init_copy()
1040 memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); in re_node_set_init_copy()
1057 if (src1->nelem == 0 || src2->nelem == 0) in re_node_set_add_intersect()
1062 if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) in re_node_set_add_intersect()
1064 Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; in re_node_set_add_intersect()
1074 sbase = dest->nelem + src1->nelem + src2->nelem; in re_node_set_add_intersect()
1075 i1 = src1->nelem - 1; in re_node_set_add_intersect()
1076 i2 = src2->nelem - 1; in re_node_set_add_intersect()
1077 id = dest->nelem - 1; in re_node_set_add_intersect()
1106 id = dest->nelem - 1; in re_node_set_add_intersect()
1107 is = dest->nelem + src1->nelem + src2->nelem - 1; in re_node_set_add_intersect()
1113 dest->nelem += delta; in re_node_set_add_intersect()
1148 if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) in re_node_set_init_union()
1150 dest->alloc = src1->nelem + src2->nelem; in re_node_set_init_union()
1157 if (src1 != NULL && src1->nelem > 0) in re_node_set_init_union()
1159 else if (src2 != NULL && src2->nelem > 0) in re_node_set_init_union()
1165 for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) in re_node_set_init_union()
1176 if (i1 < src1->nelem) in re_node_set_init_union()
1179 (src1->nelem - i1) * sizeof (Idx)); in re_node_set_init_union()
1180 id += src1->nelem - i1; in re_node_set_init_union()
1182 else if (i2 < src2->nelem) in re_node_set_init_union()
1185 (src2->nelem - i2) * sizeof (Idx)); in re_node_set_init_union()
1186 id += src2->nelem - i2; in re_node_set_init_union()
1188 dest->nelem = id; in re_node_set_init_union()
1200 if (src == NULL || src->nelem == 0) in re_node_set_merge()
1202 if (dest->alloc < 2 * src->nelem + dest->nelem) in re_node_set_merge()
1204 Idx new_alloc = 2 * (src->nelem + dest->alloc); in re_node_set_merge()
1212 if (__glibc_unlikely (dest->nelem == 0)) in re_node_set_merge()
1218 dest->nelem = src->nelem; in re_node_set_merge()
1219 memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); in re_node_set_merge()
1225 for (sbase = dest->nelem + 2 * src->nelem, in re_node_set_merge()
1226 is = src->nelem - 1, id = dest->nelem - 1; is >= 0 && id >= 0; ) in re_node_set_merge()
1243 id = dest->nelem - 1; in re_node_set_merge()
1244 is = dest->nelem + 2 * src->nelem - 1; in re_node_set_merge()
1251 dest->nelem += delta; in re_node_set_merge()
1291 if (__glibc_unlikely (set->nelem) == 0) in re_node_set_insert()
1298 ++set->nelem; in re_node_set_insert()
1303 if (set->alloc == set->nelem) in re_node_set_insert()
1317 for (idx = set->nelem; idx > 0; idx--) in re_node_set_insert()
1322 for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) in re_node_set_insert()
1329 ++set->nelem; in re_node_set_insert()
1342 if (set->alloc == set->nelem) in re_node_set_insert_last()
1353 set->elems[set->nelem++] = elem; in re_node_set_insert_last()
1365 if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) in re_node_set_compare()
1367 for (i = set1->nelem ; --i >= 0 ; ) in re_node_set_compare()
1380 if (set->nelem <= 0) in re_node_set_contains()
1385 right = set->nelem - 1; in re_node_set_contains()
1400 if (idx < 0 || idx >= set->nelem) in re_node_set_remove_at()
1402 --set->nelem; in re_node_set_remove_at()
1403 for (; idx < set->nelem; idx++) in re_node_set_remove_at()
1468 re_hashval_t hash = nodes->nelem + context; in calc_state_hash()
1470 for (i = 0 ; i < nodes->nelem ; i++) in calc_state_hash()
1497 if (__glibc_unlikely (nodes->nelem == 0)) in re_acquire_state()
1545 if (nodes->nelem == 0) in re_acquire_state_context()
1583 err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); in register_state()
1586 for (i = 0; i < newstate->nodes.nelem; i++) in register_state()
1648 for (i = 0 ; i < nodes->nelem ; i++) in create_ci_newstate()
1700 for (i = 0 ; i < nodes->nelem ; i++) in create_cd_newstate()