Gromacs  2018.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}::MempoolGroupReserver Class Reference

Description

Reserves memory for an index group from the evaluation memory pool.

This class implements RAII semantics for allocating memory for an index group from a selection evaluation memory pool.

Public Member Functions

 MempoolGroupReserver (gmx_sel_mempool_t *mp)
 Creates a reserver associated with a given memory pool. More...
 
 ~MempoolGroupReserver ()
 Frees any memory allocated using this reserver.
 
void reserve (gmx_ana_index_t *g, int count)
 Reserves memory for an index group using this reserver. More...
 

Constructor & Destructor Documentation

anonymous_namespace{evaluate.cpp}::MempoolGroupReserver::MempoolGroupReserver ( gmx_sel_mempool_t mp)
inlineexplicit

Creates a reserver associated with a given memory pool.

Parameters
mpMemory pool from which to reserve memory.

Member Function Documentation

void anonymous_namespace{evaluate.cpp}::MempoolGroupReserver::reserve ( gmx_ana_index_t g,
int  count 
)
inline

Reserves memory for an index group using this reserver.

Parameters
[in,out]gIndex group to reserve.
[in]countNumber of atoms to reserve space for.

Allocates memory from the memory pool to store count atoms in g.


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