Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 ( 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.

Referenced by DIAMemUse::Max().

Member Function Documentation

bool is_max ( ) const
inline

test if sentinel for maximum RAM request

Definition at line 66 of file dia_base.hpp.

References DIAMemUse::limit_, and DIAMemUse::max_limit_.

Referenced by DIAMemUse::operator size_t().

size_t limit ( ) const
inline

return amount of RAM reserved

Definition at line 63 of file dia_base.hpp.

References DIAMemUse::limit_.

operator size_t ( ) const
inline

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

Definition at line 69 of file dia_base.hpp.

References DIAMemUse::is_max(), and DIAMemUse::limit_.

Member Data Documentation

size_t limit_
private

amount of RAM requested or reserved.

Definition at line 73 of file dia_base.hpp.

Referenced by DIAMemUse::is_max(), DIAMemUse::limit(), and DIAMemUse::operator size_t().

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.

Referenced by DIAMemUse::is_max(), and DIAMemUse::Max().


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