Gromacs
2024.4
|
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... | |
|
inlineexplicit |
Creates a reserver associated with a given memory pool.
mp | Memory pool from which to reserve memory. |
|
inline |
Reserves memory for an index group using this reserver.
[in,out] | g | Index group to reserve. |
[in] | count | Number of atoms to reserve space for. |
Allocates memory from the memory pool to store count
atoms in g
.