Gromacs  2026.0-dev-20241204-d69d709
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs
defaultinitializationallocator.h File Reference
#include <memory>
#include <vector>
+ Include dependency graph for defaultinitializationallocator.h:
+ This graph shows which files directly or indirectly include this file:

Description

Declares an allocator that can use default initialization instead of values initialization. This is useful for improving performance of resize() in standard vectors for buffers in performance critical code.

Author
Berk Hess hess@.nosp@m.kth..nosp@m.se

Classes

class  gmx::DefaultInitializationAllocator< T, A >
 Allocator adaptor that interposes construct() calls to convert value initialization into default initialization. More...
 

Typedefs

template<typename T >
using gmx::FastVector = std::vector< T, DefaultInitializationAllocator< T >>
 Convenience type for vector that avoids initialization at resize()