ATLAS Offline Software
aligned_vector.h
Go to the documentation of this file.
1 // This file's extension implies that it's C, but it's really -*- C++ -*-.
2 /*
3  * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
4  */
21 #ifndef CXXUTILS_ALIGNED_VECTOR_H
22 #define CXXUTILS_ALIGNED_VECTOR_H
23 
24 
25 #include "boost/align/aligned_allocator.hpp"
26 #include <vector>
27 
28 
29 namespace CxxUtils {
30 
31 
38 template <class T, size_t Alignment=1>
39 using aligned_vector = std::vector<T, boost::alignment::aligned_allocator<T, Alignment> >;
40 
41 
50 template <class T>
52 
53 
54 } // namespace CxxUtils
55 
56 
57 #endif // not CXXUTILS_ALIGNED_VECTOR_H
CxxUtils::vec_aligned_vector
aligned_vector< T, 64 > vec_aligned_vector
A std::vector with alignment sufficient for any vector instructions on this platform.
Definition: aligned_vector.h:51
CxxUtils
Definition: aligned_vector.h:29
CxxUtils::aligned_vector
std::vector< T, boost::alignment::aligned_allocator< T, Alignment > > aligned_vector
A std::vector with extra alignment.
Definition: aligned_vector.h:39