Gromacs  2020.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
anonymous_namespace{evaluate.cpp}::MempoolSelelemReserver Class Reference

Description

Reserves memory for a selection element from the evaluation memory pool.

This class implements RAII semantics for allocating memory for selection element values from a selection evaluation memory pool.

Public Member Functions

 MempoolSelelemReserver ()
 Constructs a reserver without initial reservation.
 
 MempoolSelelemReserver (const SelectionTreeElementPointer &sel, int count)
 Constructs a reserver with initial reservation. More...
 
 ~MempoolSelelemReserver ()
 Frees any memory allocated using this reserver.
 
void reserve (const SelectionTreeElementPointer &sel, int count)
 Reserves memory for selection element values using this reserver. More...
 

Constructor & Destructor Documentation

anonymous_namespace{evaluate.cpp}::MempoolSelelemReserver::MempoolSelelemReserver ( const SelectionTreeElementPointer &  sel,
int  count 
)
inline

Constructs a reserver with initial reservation.

Parameters
[in,out]selSelection element for which to reserve.
[in]countNumber of values to reserve.
See Also
reserve()

Member Function Documentation

void anonymous_namespace{evaluate.cpp}::MempoolSelelemReserver::reserve ( const SelectionTreeElementPointer &  sel,
int  count 
)
inline

Reserves memory for selection element values using this reserver.

Parameters
[in,out]selSelection element for which to reserve.
[in]countNumber of values to reserve.

Allocates space to store count output values in sel from the memory pool associated with sel, or from the heap if there is no memory pool. Type of values to allocate is automatically determined from sel.


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