|
Blender V5.0
|
#include "BLI_utildefines.h"Go to the source code of this file.
Typedefs | |
| typedef struct _GSQueue | GSQueue |
Functions | |
| GSQueue * | BLI_gsqueue_new (size_t elem_size) |
| bool | BLI_gsqueue_is_empty (const GSQueue *queue) |
| size_t | BLI_gsqueue_len (const GSQueue *queue) |
| void | BLI_gsqueue_pop (GSQueue *queue, void *r_item) |
| void | BLI_gsqueue_push (GSQueue *queue, const void *item) |
| void | BLI_gsqueue_free (GSQueue *queue) |
Definition at line 13 of file BLI_gsqueue.h.
| void BLI_gsqueue_free | ( | GSQueue * | queue | ) |
Free the queue's data and the queue itself.
Definition at line 93 of file gsqueue.cc.
References _GSQueue::chunk_first, _GSQueue::chunk_free, MEM_freeN(), and queue_free_chunk().
Referenced by unsubdivide_face_center_vertex_tag(), unsubdivide_init_elem_ids(), and unsubdivide_tag_disconnected_mesh_element().
| bool BLI_gsqueue_is_empty | ( | const GSQueue * | queue | ) |
Returns true if the queue is empty, false otherwise.
Definition at line 163 of file gsqueue.cc.
References _GSQueue::chunk_first.
Referenced by BLI_gsqueue_pop(), unsubdivide_face_center_vertex_tag(), unsubdivide_init_elem_ids(), and unsubdivide_tag_disconnected_mesh_element().
| size_t BLI_gsqueue_len | ( | const GSQueue * | queue | ) |
Definition at line 158 of file gsqueue.cc.
References _GSQueue::elem_num.
| GSQueue * BLI_gsqueue_new | ( | size_t | elem_size | ) |
Definition at line 72 of file gsqueue.cc.
References _GSQueue::chunk_elem_max, _GSQueue::chunk_last_index, CHUNK_SIZE_DEFAULT, _GSQueue::elem_size, MEM_callocN(), and queue_chunk_elem_max_calc().
Referenced by unsubdivide_face_center_vertex_tag(), unsubdivide_init_elem_ids(), and unsubdivide_tag_disconnected_mesh_element().
| void BLI_gsqueue_pop | ( | GSQueue * | queue, |
| void * | r_item ) |
Retrieves and removes the first element from the queue. The value is copies to r_item, which must be at least elem_size bytes.
Does not reduce amount of allocated memory.
Definition at line 135 of file gsqueue.cc.
References BLI_assert, BLI_gsqueue_is_empty(), _GSQueue::chunk_elem_max, _GSQueue::chunk_first, _GSQueue::chunk_first_index, _GSQueue::chunk_free, _GSQueue::chunk_last, _GSQueue::chunk_last_index, _GSQueue::elem_num, _GSQueue::elem_size, QueueChunk::next, queue_get_first_elem(), and UNLIKELY.
Referenced by unsubdivide_face_center_vertex_tag(), unsubdivide_init_elem_ids(), and unsubdivide_tag_disconnected_mesh_element().
| void BLI_gsqueue_push | ( | GSQueue * | queue, |
| const void * | item ) |
Copies the source value onto the end of the queue
| item | source data to be copied to the queue. |
Definition at line 100 of file gsqueue.cc.
References BLI_assert, _GSQueue::chunk_elem_max, _GSQueue::chunk_first, _GSQueue::chunk_free, _GSQueue::chunk_last, _GSQueue::chunk_last_index, _GSQueue::elem_num, _GSQueue::elem_size, MEM_mallocN(), QueueChunk::next, queue_get_last_elem(), and UNLIKELY.
Referenced by unsubdivide_face_center_vertex_tag(), unsubdivide_init_elem_ids(), and unsubdivide_tag_disconnected_mesh_element().