Stack type generator. More...
#include <stack.h>
Stack type generator.
Template parameters:
ValTp
type of contained objectsExternality
one ofexternal
, external container, implementation is chosen according to Behaviour
parameter, is defaultmigrating
, migrates from internal implementation given by IntStackTp
parameter to external implementation given by Behaviour
parameter when size exceeds MigrCritSize
internal
, choses IntStackTp
implementationBehaviour
, choses external implementation, one of:normal
, conservative version, implemented in stxxl::normal_stack
, is defaultgrow_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 MBytesIntStackTp
type of internal stack used for some implementationsMigrCritSize
threshold value for number of elements when stxxl::migrating_stack
migrates to the external memoryAllocStr
one of allocation strategies: striping
, RC
, SR
, or FR
default is RCSzTp
size type, default is stxxl::int64
Configured stack type is available as STACK_GENERATOR<>::result
.
Examples:
STACK_GENERATOR<double>::result
external stack of double's
,STACK_GENERATOR<double,internal>::result
internal stack of double's
,STACK_GENERATOR<double,external,grow_shrink>::result
external grow-shrink stack of double's
,STACK_GENERATOR<double,migrating,grow_shrink>::result
migrating grow-shrink stack of double's
, internal implementation is std::stack<double>
,STACK_GENERATOR<double,migrating,grow_shrink,1,512*1024>::result
migrating grow-shrink stack of double's
with 1 block per page and block size 512 KB (total memory occupied = 1 MB). For configured stack method semantics see documentation of the STL std::stack
.