Public Types

STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp > Class Template Reference
[Containers]

Stack type generator. More...

#include <stack.h>

List of all members.

Public Types

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

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 STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp >

Stack type generator.

Template Parameters:
ValTp type of contained objects (POD with no references to internal memory)
Externality one 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
Behaviour chooses external implementation, one of:

  • normal , conservative version, implemented in stxxl::normal_stack , is default
  • grow_shrink , efficient version, implemented in stxxl::grow_shrink_stack
  • grow_shrink2 , efficient version, implemented in stxxl::grow_shrink_stack2
BlocksPerPage defines how many blocks has one page of internal cache of an external implementation, default is four. All external implementations have two pages.
BlkSz external block size in bytes, default is 2 MiB
IntStackTp type of internal stack used for some implementations
MigrCritSize threshold value for number of elements when stxxl::migrating_stack migrates to the external memory
AllocStr one of allocation strategies: striping , RC , SR , or FR default is RC
SzTp size type, default is stxxl::int64

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

Examples:


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