STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::PRIORITY_QUEUE_GENERATOR< ValueType, CompareType, IntMemory, MaxItems, Tune > Class Template Reference

Detailed Description

template<class ValueType, class CompareType, internal_size_type IntMemory, external_size_type MaxItems, unsigned Tune = 6>
class stxxl::PRIORITY_QUEUE_GENERATOR< ValueType, CompareType, IntMemory, MaxItems, Tune >

Priority queue type generator.
Introduction to priority queue container: see STXXL Priority Queue tutorial.
Design and Internals of priority queue container: see Priority Queue.

Template Parameters
ValueTypetype of the contained objects (POD with no references to internal memory)
CompareTypethe comparator type used to determine whether one element is smaller than another element.
IntMemoryupper limit for internal memory consumption in bytes.
MaxItemsupper limit for number of elements contained in the priority queue (in 1024 units).
Example: if you are sure that priority queue contains no more than one million elements in a time, then the right parameter is (1000000 / 1024) = 976.
Tunetuning parameter for meta-program search.
Try to play with it if the code does not compile (larger than default values might help). Code does not compile if no suitable internal parameters were found for given IntMemory and MaxItems. It might also happen that given IntMemory is too small for given MaxItems, try larger values.

Definition at line 1005 of file priority_queue.h.

Public Types

enum  { B = settings::B, m = settings::m, X = B * (settings::k - m) / settings::element_size, Buffer1Size = 32 }
 
enum  { N = ComputeN::N, AI = ComputeN::AI, AE = (m / 2 < 2) ? 2 : (m / 2) }
 
typedef
priority_queue_local::compute_N
<(1<< Tune), X, 4 *Buffer1Size >
::result 
ComputeN
 
typedef priority_queue
< priority_queue_config
< ValueType, CompareType,
Buffer1Size, N, AI, 2, B, AE, 2 > > 
result
 
typedef
priority_queue_local::find_settings
< sizeof(ValueType), IntMemory,
MaxItems >::result 
settings
 

Static Public Attributes

static const unsigned_type EConsumption = X * settings::element_size + settings::B * AE + ((MaxItems / X) / AE) * settings::B * 1024
 

Member Typedef Documentation

template<class ValueType, class CompareType, internal_size_type IntMemory, external_size_type MaxItems, unsigned Tune = 6>
typedef priority_queue_local::compute_N<(1 << Tune), X, 4* Buffer1Size>::result stxxl::PRIORITY_QUEUE_GENERATOR< ValueType, CompareType, IntMemory, MaxItems, Tune >::ComputeN

Definition at line 1017 of file priority_queue.h.

template<class ValueType, class CompareType, internal_size_type IntMemory, external_size_type MaxItems, unsigned Tune = 6>
typedef priority_queue<priority_queue_config<ValueType, CompareType, Buffer1Size, N, AI, 2, B, AE, 2> > stxxl::PRIORITY_QUEUE_GENERATOR< ValueType, CompareType, IntMemory, MaxItems, Tune >::result

Definition at line 1037 of file priority_queue.h.

template<class ValueType, class CompareType, internal_size_type IntMemory, external_size_type MaxItems, unsigned Tune = 6>
typedef priority_queue_local::find_settings<sizeof(ValueType), IntMemory, MaxItems>::result stxxl::PRIORITY_QUEUE_GENERATOR< ValueType, CompareType, IntMemory, MaxItems, Tune >::settings

Definition at line 1009 of file priority_queue.h.

Member Enumeration Documentation

template<class ValueType, class CompareType, internal_size_type IntMemory, external_size_type MaxItems, unsigned Tune = 6>
anonymous enum
Enumerator
B 
m 
X 
Buffer1Size 

Definition at line 1010 of file priority_queue.h.

template<class ValueType, class CompareType, internal_size_type IntMemory, external_size_type MaxItems, unsigned Tune = 6>
anonymous enum
Enumerator
N 
AI 
AE 

Definition at line 1018 of file priority_queue.h.

Member Data Documentation

template<class ValueType, class CompareType, internal_size_type IntMemory, external_size_type MaxItems, unsigned Tune = 6>
const unsigned_type stxxl::PRIORITY_QUEUE_GENERATOR< ValueType, CompareType, IntMemory, MaxItems, Tune >::EConsumption = X * settings::element_size + settings::B * AE + ((MaxItems / X) / AE) * settings::B * 1024
static

Definition at line 1026 of file priority_queue.h.


The documentation for this class was generated from the following file: