STXXL  1.4-dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop > Struct Template Reference

Detailed Description

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
struct stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >

Definition at line 876 of file priority_queue.h.

Public Types

typedef find_B_m< ElementSize,
IntMem, MaxItems, B, m+step,
fits||(m+step >=k)>::result 
candidate1
 if not fits, recurse into configuration with +step more internal buffers More...
 
typedef find_B_m< ElementSize,
IntMem, MaxItems, B/2, 1, fits||candidate1::fits >
::result 
candidate2
 if not fits, recurse into configuration with block size halved. More...
 
typedef IF< fits, self_type,
typename IF< candidate1::fits,
candidate1, candidate2 >
::result >::result 
result
 return a fitting configuration. More...
 
typedef find_B_m< ElementSize,
IntMem, MaxItems, BlockSize,
m_, stop > 
self_type
 

Static Public Attributes

static const internal_size_type B = BlockSize
 block size (iterates from 8 MiB downwards) More...
 
static const int_type c = k - m_
 remaining blocks, (freely moving, not necessarily unused) ?-tb More...
 
static const internal_size_type element_size = ElementSize
 element size More...
 
static const external_size_type fits
 calculated boolean whether the configuration fits into internal memory. More...
 
static const internal_size_type intmem = IntMem
 internal memory size of PQ More...
 
static const internal_size_type k = IntMem / BlockSize
 number of blocks that fit into internal memory (M) More...
 
static const internal_size_type m = m_
 number of blocks fitting into buffers of mergers (arity of both mergers), increased from 1 to 2048 ?-tb More...
 
static const unsigned_type step = 1
 

Member Typedef Documentation

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
typedef find_B_m<ElementSize, IntMem, MaxItems, B, m + step, fits || (m + step >= k)>::result stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::candidate1

if not fits, recurse into configuration with +step more internal buffers

Definition at line 911 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
typedef find_B_m<ElementSize, IntMem, MaxItems, B / 2, 1, fits || candidate1::fits>::result stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::candidate2

if not fits, recurse into configuration with block size halved.

Definition at line 914 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
typedef IF<fits, self_type, typename IF<candidate1::fits, candidate1, candidate2>::result>::result stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::result

return a fitting configuration.

Definition at line 917 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
typedef find_B_m<ElementSize, IntMem, MaxItems, BlockSize, m_, stop> stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::self_type

Definition at line 879 of file priority_queue.h.

Member Data Documentation

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
const internal_size_type stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::B = BlockSize
static

block size (iterates from 8 MiB downwards)

Definition at line 886 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
const int_type stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::c = k - m_
static

remaining blocks, (freely moving, not necessarily unused) ?-tb

Definition at line 894 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
const internal_size_type stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::element_size = ElementSize
static

element size

Definition at line 882 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
const external_size_type stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::fits
static
Initial value:
=
(c > 10) &&
(((k - m) * m * (m * B / (ElementSize * 4 * 1024))) >= MaxItems) &&
((MaxItems < ((k - m) * m / (2 * ElementSize)) * 1024) || m >= 128)

calculated boolean whether the configuration fits into internal memory.

Definition at line 899 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
const internal_size_type stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::intmem = IntMem
static

internal memory size of PQ

Definition at line 884 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
const internal_size_type stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::k = IntMem / BlockSize
static

number of blocks that fit into internal memory (M)

Definition at line 889 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
const internal_size_type stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::m = m_
static

number of blocks fitting into buffers of mergers (arity of both mergers), increased from 1 to 2048 ?-tb

Definition at line 892 of file priority_queue.h.

template<internal_size_type ElementSize, internal_size_type IntMem, external_size_type MaxItems, internal_size_type BlockSize, unsigned_type m_, bool stop = false>
const unsigned_type stxxl::priority_queue_local::find_B_m< ElementSize, IntMem, MaxItems, BlockSize, m_, stop >::step = 1
static

Definition at line 907 of file priority_queue.h.


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