|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #ifndef GSFUtils_AlignedDynArray_H
11 #define GSFUtils_AlignedDynArray_H
14 #include <type_traits>
28 template<
typename T,
size_t ALIGNMENT>
34 static_assert(ALIGNMENT != 0,
"Zero alignment 0");
36 (ALIGNMENT & (ALIGNMENT - 1)) == 0,
37 "Alignment not a power of 2");
39 (ALIGNMENT %
sizeof(
void*)) == 0,
40 "Alignment not an integral multiple of sizeof(void*)");
126 #include "TrkGaussianSumFilterUtils/AlignedDynArray.icc"
bool empty() const noexcept
returns true is size == 0
std::ptrdiff_t difference_type
AlignedDynArray()=delete
Deleted default constructor.
pointer m_buffer
Pointer to the underlying buffer.
size_type m_size
Num of elements/size.
bool const RAWDATA *ch2 const
AlignedDynArray & operator=(AlignedDynArray const &)=delete
Deleted default assignment operator.
pointer buffer() noexcept
Get the underlying buffer.
size_type size() const noexcept
number of elements/size
AlignedDynArray(const size_type n, const T &value)
Constructor initializing elements to value.
AlignedDynArray(AlignedDynArray &&) noexcept
Move copy constructor.
AlignedDynArray(AlignedDynArray const &)=delete
Deleted default copy constructor.
iterator begin() noexcept
iterator pointing to the first element
iterator end() noexcept
iterator pointing to the past-the-end element
const value_type & const_reference
const value_type * const_iterator
AlignedDynArray(const size_type n)
Constructor with default initializing elements.
Dynamic array fullfilling alignment requirements.
void cleanup()
Helper method for calling the dtor for the elements.
A wrapper around std::aligned_alloc.