STXXL  1.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType > Class Template Reference

Detailed Description

template<class ValueType, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class IntStackType = std::stack<ValueType>, unsigned_type MigrCritSize = (2* BlocksPerPage* BlockSize), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
class stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >

Stack type generator
Introduction to stack container: see STXXL Stack tutorial.
Design and Internals of stack container: see Stack.

Template Parameters
ValueTypetype of contained objects (POD with no references to internal memory)
Externalityselects stack implementation, default: external. One of
  • external, external container, implementation is chosen according to Behaviour parameter.
  • migrating, migrates from internal implementation given by IntStackType parameter to external implementation given by Behaviour parameter when size exceeds MigrCritSize
  • internal, choses IntStackType implementation
Behaviourchooses external implementation, default: stxxl::normal_stack. One of:
BlocksPerPagedefines how many blocks has one page of internal cache of an external implementation, default is 4. All external implementations have two pages.
BlockSizeexternal block size in bytes, default is 2 MiB.
IntStackTypetype of internal stack used for some implementations, default: std::stack.
MigrCritSizethreshold value for number of elements when stxxl::migrating_stack migrates to the external memory, default: 2 x BlocksPerPage x BlockSize.
AllocStrone of allocation strategies: striping, RC, SR, or FR. Default is RC.
SizeTypesize type, default is stxxl::uint64.

The configured stack type is available as STACK_GENERATOR<>::result.

Definition at line 1011 of file stack.h.

Public Types

typedef IF< Externality==internal,
IntStackType,
MigrOrNotStackType >::result 
result
 

Private Types

typedef stack_config_generator
< ValueType, BlocksPerPage,
BlockSize, AllocStr, SizeType > 
cfg
 
typedef IF< Behaviour==normal,
normal_stack< cfg >, GrShrTp >
::result 
ExtStackType
 
typedef IF< Behaviour==grow_shrink,
grow_shrink_stack< cfg >
, grow_shrink_stack2< cfg >
>::result 
GrShrTp
 
typedef IF< Externality==migrating,
migrating_stack< MigrCritSize,
ExtStackType, IntStackType >
, ExtStackType >::result 
MigrOrNotStackType
 

Member Typedef Documentation

template<class ValueType, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class IntStackType = std::stack<ValueType>, unsigned_type MigrCritSize = (2* BlocksPerPage* BlockSize), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
typedef stack_config_generator<ValueType, BlocksPerPage, BlockSize, AllocStr, SizeType> stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >::cfg
private

Definition at line 1013 of file stack.h.

template<class ValueType, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class IntStackType = std::stack<ValueType>, unsigned_type MigrCritSize = (2* BlocksPerPage* BlockSize), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
typedef IF<Behaviour == normal, normal_stack<cfg>, GrShrTp>::result stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >::ExtStackType
private

Definition at line 1018 of file stack.h.

template<class ValueType, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class IntStackType = std::stack<ValueType>, unsigned_type MigrCritSize = (2* BlocksPerPage* BlockSize), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
typedef IF<Behaviour == grow_shrink, grow_shrink_stack<cfg>, grow_shrink_stack2<cfg> >::result stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >::GrShrTp
private

Definition at line 1017 of file stack.h.

template<class ValueType, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class IntStackType = std::stack<ValueType>, unsigned_type MigrCritSize = (2* BlocksPerPage* BlockSize), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
typedef IF<Externality == migrating, migrating_stack<MigrCritSize, ExtStackType, IntStackType>, ExtStackType>::result stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >::MigrOrNotStackType
private

Definition at line 1020 of file stack.h.

template<class ValueType, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlockSize = STXXL_DEFAULT_BLOCK_SIZE(ValueType), class IntStackType = std::stack<ValueType>, unsigned_type MigrCritSize = (2* BlocksPerPage* BlockSize), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SizeType = stxxl::uint64>
typedef IF<Externality == internal, IntStackType, MigrOrNotStackType>::result stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >::result

Definition at line 1023 of file stack.h.


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