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::int64>
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
-
| ValueType | type of contained objects (POD with no references to internal memory) |
| Externality | selects 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
|
| Behaviour | chooses external implementation, default: stxxl::normal_stack. One of:
|
| BlocksPerPage | defines how many blocks has one page of internal cache of an external implementation, default is 4. All external implementations have two pages. |
| BlockSize | external block size in bytes, default is 2 MiB. |
| IntStackType | type of internal stack used for some implementations, default: std::stack. |
| MigrCritSize | threshold value for number of elements when stxxl::migrating_stack migrates to the external memory, default: 2 x BlocksPerPage x BlockSize. |
| AllocStr | one of allocation strategies: striping, RC, SR, or FR. Default is RC. |
| SizeType | size type, default is stxxl::int64. |
The configured stack type is available as STACK_GENERATOR<>::result.
Definition at line 1021 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::int64>
| typedef stack_config_generator<ValueType, BlocksPerPage, BlockSize, AllocStr, SizeType> stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >::cfg |
|
private |
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::int64>
| typedef IF<Behaviour == normal, normal_stack<cfg>, GrShrTp>::result stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >::ExtStackType |
|
private |
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::int64>
| 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 |
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::int64>
| 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 |
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::int64>
| typedef IF<Externality == internal, IntStackType, MigrOrNotStackType>::result stxxl::STACK_GENERATOR< ValueType, Externality, Behaviour, BlocksPerPage, BlockSize, IntStackType, MigrCritSize, AllocStr, SizeType >::result |