Gromacs
2024.4
|
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... | |
|
inline |
Constructs a reserver with initial reservation.
[in,out] | sel | Selection element for which to reserve. |
[in] | count | Number of values to reserve. |
|
inline |
Reserves memory for selection element values using this reserver.
[in,out] | sel | Selection element for which to reserve. |
[in] | count | Number 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
.