Thrill  0.1
DIAMemUse Class Reference

Detailed Description

Description of the amount of RAM the internal data structures of a DIANode require.

Each DIANode implementation can specify this for its PreOp, Execute, and PostOp parts individually. The StageBuilder collects all requests, notifys the BlockPool to reduce its memory limits, and delivers the available amount to the DIANode in StartPreOp(), Execute(), and PushData() calls.

Definition at line 51 of file dia_base.hpp.

#include <dia_base.hpp>

Public Member Functions

 DIAMemUse (size_t limit=0)
 Implicit conversion of a size_t for a constant RAM usage request. More...
 
bool is_max () const
 test if sentinel for maximum RAM request More...
 
size_t limit () const
 return amount of RAM reserved More...
 
 operator size_t () const
 implicit conversion to size_, but only if not is_max() More...
 

Static Public Member Functions

static DIAMemUse Max ()
 

Private Attributes

size_t limit_
 amount of RAM requested or reserved. More...
 

Static Private Attributes

static constexpr size_t max_limit_ = static_cast<size_t>(-1)
 sentinel for maximum available RAM. More...
 

Constructor & Destructor Documentation

◆ DIAMemUse()

DIAMemUse ( size_t  limit = 0)
inline

Implicit conversion of a size_t for a constant RAM usage request.

Definition at line 55 of file dia_base.hpp.

Member Function Documentation

◆ is_max()

bool is_max ( ) const
inline

test if sentinel for maximum RAM request

Definition at line 66 of file dia_base.hpp.

◆ limit()

size_t limit ( ) const
inline

return amount of RAM reserved

Definition at line 63 of file dia_base.hpp.

◆ Max()

static DIAMemUse Max ( )
inlinestatic

Maximum available RAM requested (limit will be determined in StageBuilder by detecting the DIANodes in a Stage)

Definition at line 60 of file dia_base.hpp.

Referenced by GroupByNode< ValueType, KeyExtractor, GroupFunction, HashFunction, UseLocationDetection >::ExecuteMemUse(), SortNode< ValueType, CompareFunction, SortAlgorithm, Stable >::ExecuteMemUse(), JoinNode< ValueType, FirstDIA, SecondDIA, KeyExtractor1, KeyExtractor2, JoinFunction, HashFunction, UseLocationDetection >::ExecuteMemUse(), ReduceNode< ValueType, KeyExtractor, ReduceFunction, ReduceConfig, KeyHashFunction, KeyEqualFunction, VolatileKey, UseDuplicateDetection >::PreOpMemUse(), ReduceToIndexNode< ValueType, KeyExtractor, ReduceFunction, ReduceConfig, VolatileKey, SkipPreReducePhase >::PreOpMemUse(), GroupByNode< ValueType, KeyExtractor, GroupFunction, HashFunction, UseLocationDetection >::PreOpMemUse(), JoinNode< ValueType, FirstDIA, SecondDIA, KeyExtractor1, KeyExtractor2, JoinFunction, HashFunction, UseLocationDetection >::PreOpMemUse(), ReduceNode< ValueType, KeyExtractor, ReduceFunction, ReduceConfig, KeyHashFunction, KeyEqualFunction, VolatileKey, UseDuplicateDetection >::PushDataMemUse(), GroupByNode< ValueType, KeyExtractor, GroupFunction, HashFunction, UseLocationDetection >::PushDataMemUse(), ReduceToIndexNode< ValueType, KeyExtractor, ReduceFunction, ReduceConfig, VolatileKey, SkipPreReducePhase >::PushDataMemUse(), SortNode< ValueType, CompareFunction, SortAlgorithm, Stable >::PushDataMemUse(), and JoinNode< ValueType, FirstDIA, SecondDIA, KeyExtractor1, KeyExtractor2, JoinFunction, HashFunction, UseLocationDetection >::PushDataMemUse().

◆ operator size_t()

operator size_t ( ) const
inline

implicit conversion to size_, but only if not is_max()

Definition at line 69 of file dia_base.hpp.

Member Data Documentation

◆ limit_

size_t limit_
private

amount of RAM requested or reserved.

Definition at line 73 of file dia_base.hpp.

◆ max_limit_

constexpr size_t max_limit_ = static_cast<size_t>(-1)
staticprivate

sentinel for maximum available RAM.

Definition at line 76 of file dia_base.hpp.


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