Stxxl  1.3.2
Public Types | List of all members
STACK_GENERATOR< ValTp, Externality, Behaviour, BlocksPerPage, BlkSz, IntStackTp, MigrCritSize, AllocStr, SzTp > Class Template Reference

Stack type generator. More...

#include <stack.h>

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
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:
  • 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
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:


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