Stxxl  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Private Types
stxxl::STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp > Class Template Reference

Stack type generator. More...

#include <stack.h>

List of all members.

Public Types

typedef IF< Externality==internal,
IntStackTp, MigrOrNotStackTp >
::result 
result

Private Types

typedef stack_config_generator
< ValTp, BlocksPerPage, BlkSz,
AllocStr, SzTp > 
cfg
typedef IF< Behaviour==grow_shrink,
grow_shrink_stack< cfg >
, grow_shrink_stack2< cfg >
>::result 
GrShrTp
typedef IF< Behaviour==normal,
normal_stack< cfg >, GrShrTp >
::result 
ExtStackTp
typedef IF< Externality==migrating,
migrating_stack< MigrCritSize,
ExtStackTp, IntStackTp >
, ExtStackTp >::result 
MigrOrNotStackTp

Detailed Description

template<class ValTp, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlkSz = STXXL_DEFAULT_BLOCK_SIZE(ValTp), class IntStackTp = std::stack<ValTp>, unsigned_type MigrCritSize = (2 * BlocksPerPage * BlkSz), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SzTp = stxxl::int64>
class stxxl::STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp >

Stack type generator.

Template Parameters:
ValTptype of contained objects (POD with no references to internal memory)
Externalityone of
  • external , external container, implementation is chosen according to Behaviour parameter, is default
  • migrating , migrates from internal implementation given by IntStackTp parameter to external implementation given by Behaviour parameter when size exceeds MigrCritSize
  • internal , choses IntStackTp implementation
Behaviourchooses external implementation, one of:
BlocksPerPagedefines how many blocks has one page of internal cache of an external implementation, default is four. All external implementations have two pages.
BlkSzexternal block size in bytes, default is 2 MiB
IntStackTptype of internal stack used for some implementations
MigrCritSizethreshold value for number of elements when stxxl::migrating_stack migrates to the external memory
AllocStrone of allocation strategies: striping , RC , SR , or FR default is RC
SzTpsize type, default is stxxl::int64

Configured stack type is available as STACK_GENERATOR<>::result.

Examples:

Examples:
containers/stack_benchmark.cpp, and containers/test_migr_stack.cpp.

Definition at line 843 of file stack.h.


Member Typedef Documentation

template<class ValTp, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlkSz = STXXL_DEFAULT_BLOCK_SIZE(ValTp), class IntStackTp = std::stack<ValTp>, unsigned_type MigrCritSize = (2 * BlocksPerPage * BlkSz), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SzTp = stxxl::int64>
typedef stack_config_generator<ValTp, BlocksPerPage, BlkSz, AllocStr, SzTp> stxxl::STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp >::cfg [private]

Definition at line 845 of file stack.h.

template<class ValTp, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlkSz = STXXL_DEFAULT_BLOCK_SIZE(ValTp), class IntStackTp = std::stack<ValTp>, unsigned_type MigrCritSize = (2 * BlocksPerPage * BlkSz), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SzTp = stxxl::int64>
typedef IF<Behaviour == normal, normal_stack<cfg>, GrShrTp>::result stxxl::STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp >::ExtStackTp [private]

Definition at line 850 of file stack.h.

template<class ValTp, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlkSz = STXXL_DEFAULT_BLOCK_SIZE(ValTp), class IntStackTp = std::stack<ValTp>, unsigned_type MigrCritSize = (2 * BlocksPerPage * BlkSz), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SzTp = stxxl::int64>
typedef IF<Behaviour == grow_shrink, grow_shrink_stack<cfg>, grow_shrink_stack2<cfg> >::result stxxl::STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp >::GrShrTp [private]

Definition at line 849 of file stack.h.

template<class ValTp, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlkSz = STXXL_DEFAULT_BLOCK_SIZE(ValTp), class IntStackTp = std::stack<ValTp>, unsigned_type MigrCritSize = (2 * BlocksPerPage * BlkSz), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SzTp = stxxl::int64>
typedef IF<Externality == migrating, migrating_stack<MigrCritSize, ExtStackTp, IntStackTp>, ExtStackTp>::result stxxl::STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp >::MigrOrNotStackTp [private]

Definition at line 852 of file stack.h.

template<class ValTp, stack_externality Externality = external, stack_behaviour Behaviour = normal, unsigned BlocksPerPage = 4, unsigned BlkSz = STXXL_DEFAULT_BLOCK_SIZE(ValTp), class IntStackTp = std::stack<ValTp>, unsigned_type MigrCritSize = (2 * BlocksPerPage * BlkSz), class AllocStr = STXXL_DEFAULT_ALLOC_STRATEGY, class SzTp = stxxl::int64>
typedef IF<Externality == internal, IntStackTp, MigrOrNotStackTp>::result stxxl::STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp >::result

Definition at line 855 of file stack.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines