Home
last modified time | relevance | path

Searched refs:capacity (Results 1 – 25 of 34) sorted by relevance

12

/ext-ds/src/ds/
H A Dds_priority_queue.c56 queue->nodes = reallocate_nodes(queue->nodes, capacity); in reallocate_to_capacity()
57 queue->capacity = capacity; in reallocate_to_capacity()
62 reallocate_to_capacity(queue, queue->capacity * 2); in increase_capacity()
67 capacity = ds_priority_queue_get_capacity_for_size(capacity); in ds_priority_queue_allocate()
69 if (capacity > queue->capacity) { in ds_priority_queue_allocate()
70 reallocate_to_capacity(queue, capacity); in ds_priority_queue_allocate()
79 queue->capacity = DS_PRIORITY_QUEUE_MIN_CAPACITY; in ds_priority_queue()
88 return queue->capacity; in ds_priority_queue_capacity()
101 if (queue->size == queue->capacity) { in ds_priority_queue_push()
139 …if (queue->size <= (queue->capacity / 4) && (queue->capacity / 2) >= DS_PRIORITY_QUEUE_MIN_CAPACIT… in ds_priority_queue_compact()
[all …]
H A Dds_vector.c17 …vector->buffer = ds_reallocate_zval_buffer(vector->buffer, capacity, vector->capacity, vector->s… in ds_vector_reallocate()
18 vector->capacity = capacity; in ds_vector_reallocate()
21 ds_vector_t *ds_vector_ex(zend_long capacity) in ds_vector_ex() argument
26 capacity = MAX(capacity, DS_VECTOR_MIN_CAPACITY); in ds_vector_ex()
29 vector->capacity = capacity; in ds_vector_ex()
49 clone->capacity = vector->capacity; in ds_vector_clone()
68 vector->capacity = capacity; in ds_vector_from_buffer()
76 if (capacity > vector->capacity) { in ds_vector_allocate()
83 ds_vector_reallocate(vector, vector->capacity + (vector->capacity >> 1)); in ds_vector_increase_capacity()
88 if (capacity > vector->capacity) { in ds_vector_ensure_capacity()
[all …]
H A Dds_deque.c48 deque->capacity = DS_DEQUE_MIN_CAPACITY; in ds_deque()
74 deque->capacity = capacity; in ds_deque_from_buffer()
149 …deque->buffer = ds_reallocate_zval_buffer(deque->buffer, capacity, deque->capacity, deque->size); in ds_deque_reallocate()
150 deque->capacity = capacity; in ds_deque_reallocate()
168 if (capacity > deque->capacity) { in ds_deque_allocate()
169 ds_deque_reallocate(deque, capacity); in ds_deque_allocate()
176 if (deque->size <= deque->capacity / 4) { in ds_deque_auto_truncate()
196 deque->capacity = DS_DEQUE_MIN_CAPACITY; in ds_deque_clear()
257 zend_long mask = deque->capacity - 1; in ds_deque_reverse()
379 if (deque->size == deque->capacity) { in ds_deque_push()
[all …]
H A Dds_htable.c21 return emalloc(capacity * sizeof(uint32_t)); in ds_htable_allocate_lookup()
38 table->capacity = capacity; in ds_htable_realloc()
43 const uint32_t mask = table->capacity - 1; in ds_htable_rehash()
48 table->min_deleted = table->capacity; in ds_htable_rehash()
114 const uint32_t capacity = table->capacity; in ds_htable_auto_truncate() local
116 if (table->size <= (capacity / 4) && (capacity / 2) >= DS_HTABLE_MIN_CAPACITY) { in ds_htable_auto_truncate()
129 table->capacity = capacity; in ds_htable_with_capacity()
130 table->min_deleted = capacity; in ds_htable_with_capacity()
166 dst->capacity = src->capacity; in ds_htable_clone()
630 capacity = ds_htable_get_capacity_for_size(capacity); in ds_htable_ensure_capacity()
[all …]
H A Dds_queue.c33 void ds_queue_allocate(ds_queue_t *queue, zend_long capacity) in ds_queue_allocate() argument
35 ds_deque_allocate(queue->deque, capacity); in ds_queue_allocate()
40 return queue->deque->capacity; in ds_queue_capacity()
H A Dds_deque.h14 const zend_long _mask = _deque->capacity - 1; \
28 zend_long capacity; member
35 ds_deque_t *ds_deque_ex(zend_long capacity);
40 void ds_deque_allocate(ds_deque_t *deque, zend_long capacity);
H A Dds_vector.h8 zend_long capacity; // Buffer length member
46 ds_vector_t *ds_vector_ex(zend_long capacity);
47 ds_vector_t *ds_vector_from_buffer(zval *buffer, zend_long capacity, zend_long size);
49 void ds_vector_allocate(ds_vector_t *vector, zend_long capacity);
H A Dds_stack.h8 #define DS_STACK_CAPACITY(s) ((s)->vector->capacity)
39 void ds_stack_allocate(ds_stack_t *stack, zend_long capacity);
H A Dds_priority_queue.h13 uint32_t capacity; member
59 void ds_priority_queue_allocate(ds_priority_queue_t *queue, uint32_t capacity);
H A Dds_stack.c32 void ds_stack_allocate(ds_stack_t *stack, zend_long capacity) in ds_stack_allocate() argument
34 ds_vector_allocate(stack->vector, capacity); in ds_stack_allocate()
H A Dds_set.h8 #define DS_SET_CAPACITY(s) ((s)->table->capacity)
24 void ds_set_allocate(ds_set_t *set, zend_long capacity);
/ext-ds/src/php/classes/
H A Dphp_priority_queue_ce.c24 PARSE_LONG(capacity); in METHOD()
25 ds_priority_queue_allocate(THIS_DS_PRIORITY_QUEUE(), capacity); in METHOD()
28 METHOD(capacity) in METHOD() argument
100 PHP_DS_ME(PriorityQueue, capacity) in php_ds_register_priority_queue()
H A Dphp_stack_ce.c29 PARSE_LONG(capacity); in METHOD()
30 ds_stack_allocate(THIS_DS_STACK(), capacity); in METHOD()
33 METHOD(capacity) in METHOD() argument
133 PHP_DS_ME(Stack, capacity) in php_ds_register_stack()
H A Dphp_queue_ce.c28 PARSE_LONG(capacity); in METHOD()
29 ds_queue_allocate(THIS_DS_QUEUE(), capacity); in METHOD()
32 METHOD(capacity) in METHOD() argument
130 PHP_DS_ME(Queue, capacity) in php_ds_register_queue()
H A Dphp_priority_queue_ce.h11 ARGINFO_LONG( PriorityQueue_allocate, capacity);
H A Dphp_queue_ce.h11 ARGINFO_LONG( Queue_allocate, capacity);
H A Dphp_stack_ce.h11 ARGINFO_LONG( Stack_allocate, capacity);
H A Dphp_deque_ce.c39 PARSE_LONG(capacity); in METHOD()
40 ds_deque_allocate(THIS_DS_DEQUE(), capacity); in METHOD()
49 METHOD(capacity) in METHOD() argument
52 RETURN_LONG((THIS_DS_DEQUE())->capacity); in METHOD()
H A Dphp_vector_ce.c29 PARSE_LONG(capacity); in METHOD()
30 ds_vector_allocate(THIS_DS_VECTOR(), capacity); in METHOD()
39 METHOD(capacity) in METHOD() argument
42 RETURN_LONG((THIS_DS_VECTOR())->capacity); in METHOD()
H A Dphp_set_ce.c39 PARSE_LONG(capacity); in METHOD()
40 ds_set_allocate(THIS_DS_SET(), capacity); in METHOD()
43 METHOD(capacity) in METHOD() argument
269 PHP_DS_ME(Set, capacity) in php_ds_register_set()
H A Dphp_sequence_ce.h14 PHP_DS_SEQUENCE_ME(cls, capacity) \
44 ARGINFO_LONG( Sequence_allocate, capacity);
H A Dphp_sequence_ce.c16 SEQUENCE_ABSTRACT_ME(capacity) in php_ds_register_sequence()
H A Dphp_map_ce.c32 PARSE_LONG(capacity); in METHOD()
33 ds_map_allocate(THIS_DS_MAP(), capacity); in METHOD()
42 METHOD(capacity) in METHOD() argument
325 PHP_DS_ME(Map, capacity) in php_ds_register_map()
H A Dphp_set_ce.h12 ARGINFO_LONG( Set_allocate, capacity);
/ext-ds/
H A DCHANGELOG.md49 - Minor capacity adjustments.
53 - Vector's minimum and default capacity down from 10 to 8.
54 - Map and Set's minimum and default capacity down from 16 to 8.
76 - `Map` truncating to capacity less than the minimum.

Completed in 98 milliseconds

12