|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-ddeab64dbf
|
#include <empq.h>
Public Member Functions | |
| em_pqueue (long pq_sz, long buf_sz, unsigned short nb_buf, unsigned int buf_ar) | |
| em_pqueue () | |
| em_pqueue (long N) | |
| em_pqueue (MinMaxHeap< T > *im, AMI_STREAM< T > *amis) | |
| em_pqueue (const em_pqueue &ep) | |
| ~em_pqueue () | |
| unsigned long | size () |
| bool | is_empty () |
| bool | is_full () |
| bool | min (T &elt) |
| bool | extract_min (T &elt) |
| bool | extract_all_min (T &elt) |
| bool | insert (const T &elt) |
| long | maxlen (unsigned short i) |
| long | maxlen () |
| void | clear () |
| void | print_range () |
| void | print () |
| void | print_size () |
Protected Member Functions | |
| int | active_streams () |
| bool | empty_buff_0 () |
| void | empty_buff (unsigned short i) |
| AMI_err | merge_buffer (em_buffer< T, Key > *buf, AMI_STREAM< ExtendedEltMergeType< T, Key > > *outstr, long K) |
| AMI_err | merge_streams (AMI_STREAM< ExtendedEltMergeType< T, Key > > **instr, unsigned short arity, AMI_STREAM< ExtendedEltMergeType< T, Key > > *outstr, long K) |
| void | delete_str_elt (unsigned short buf_id, unsigned int stream_id) |
| void | merge_bufs2pq (AMI_STREAM< ExtendedEltMergeType< T, Key > > *minstream) |
| void | cleanup () |
| bool | fillpq () |
| void | print_stream_sizes () |
Friends | |
| ostream & | operator<< (ostream &s, const em_pqueue &empq) |
| em_pqueue< T, Key >::em_pqueue | ( | long | pq_sz, |
| long | buf_sz, | ||
| unsigned short | nb_buf, | ||
| unsigned int | buf_ar | ||
| ) |
Definition at line 136 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, assert, getAvailableMemory(), AMI_STREAM< T >::main_memory_usage(), MEMORY_LOG(), MM_STREAM_USAGE_MAXIMUM, and NULL.
| em_pqueue< T, Key >::em_pqueue | ( | ) |
Definition at line 224 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, getAvailableMemory(), AMI_STREAM< T >::main_memory_usage(), MEMORY_LOG(), MM_STREAM_USAGE_MAXIMUM, MY_LOG_DEBUG_ID, and NULL.
|
inline |
Definition at line 164 of file empq.h.
References em_pqueue< T, Key >::em_pqueue().
Referenced by em_pqueue< T, Key >::em_pqueue().
| em_pqueue< T, Key >::em_pqueue | ( | MinMaxHeap< T > * | im, |
| AMI_STREAM< T > * | amis | ||
| ) |
Definition at line 353 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, getAvailableMemory(), LOG_avail_memo(), AMI_STREAM< T >::main_memory_usage(), MAX_STREAMS_OPEN, MEMORY_LOG(), MM_STREAM_USAGE_MAXIMUM, NULL, AMI_STREAM< T >::read_item(), AMI_STREAM< T >::seek(), AMI_STREAM< T >::stream_len(), AMI_STREAM< T >::write_item(), and x.
Definition at line 490 of file empq_impl.h.
References NULL.
Definition at line 968 of file empq_impl.h.
References MY_LOG_DEBUG_ID.
Definition at line 1482 of file empq_impl.h.
References NULL.
|
protected |
Definition at line 954 of file empq_impl.h.
References assert.
Definition at line 1155 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, MEMORY_LOG(), MY_LOG_DEBUG_ID, AMI_STREAM< T >::read_item(), AMI_STREAM< T >::seek(), AMI_STREAM< T >::stream_len(), and x.
Definition at line 1086 of file empq_impl.h.
References AMI_STREAM< T >::AMI_STREAM(), assert, MEMORY_LOG(), and MY_LOG_DEBUG_ID.
Definition at line 802 of file empq_impl.h.
References AMI_STREAM< T >::AMI_STREAM(), min, and MY_LOG_DEBUG_ID.
Definition at line 727 of file empq_impl.h.
References AMI_STREAM< T >::AMI_STREAM(), assert, MY_LOG_DEBUG_ID, x, and XXX.
Definition at line 574 of file empq_impl.h.
References AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, ExtendedMergeStream, MEMORY_LOG(), MY_LOG_DEBUG_ID, NULL, AMI_STREAM< T >::stream_len(), and XXX.
Definition at line 1000 of file empq_impl.h.
References AMI_STREAM< T >::AMI_STREAM(), assert, MY_LOG_DEBUG_ID, and x.
Definition at line 563 of file empq_impl.h.
Definition at line 538 of file empq_impl.h.
Definition at line 513 of file empq_impl.h.
References AMI_STREAM< T >::AMI_STREAM().
|
protected |
!! KEYS BELONGS NOW TO MERGEHEAP, AND WILL BE DELETED BY THE
Definition at line 1257 of file empq_impl.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, UntypedStream::buf, MEMORY_LOG(), MY_LOG_DEBUG_ID, NULL, AMI_STREAM< T >::read_item(), AMI_STREAM< T >::seek(), AMI_STREAM< T >::stream_len(), and AMI_STREAM< T >::write_item().
|
protected |
Definition at line 851 of file empq_impl.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, MY_LOG_DEBUG_ID, AMI_STREAM< T >::read_item(), AMI_STREAM< T >::seek(), and XXX.
|
protected |
!! KEYS BELONGS NOW TO MERGEHEAP, AND WILL BE DELETED BY THE
Definition at line 1380 of file empq_impl.h.
References AMI_ERROR_END_OF_STREAM, AMI_ERROR_NO_ERROR, AMI_STREAM< T >::AMI_STREAM(), assert, MEMORY_LOG(), MY_LOG_DEBUG_ID, AMI_STREAM< T >::read_item(), AMI_STREAM< T >::seek(), and AMI_STREAM< T >::write_item().
Definition at line 658 of file empq_impl.h.
References AMI_STREAM< T >::AMI_STREAM(), assert, MY_LOG_DEBUG_ID, and XXX.
Definition at line 1523 of file empq_impl.h.
Definition at line 1498 of file empq_impl.h.
Definition at line 1546 of file empq_impl.h.
References assert.
Definition at line 1568 of file empq_impl.h.
Definition at line 550 of file empq_impl.h.