35#ifndef _BLAZE_UTIL_ALIGNEDARRAY_H_
36#define _BLAZE_UTIL_ALIGNEDARRAY_H_
97template<
typename Type
116 AlignedArray() =
default;
117 AlignedArray(
const AlignedArray& ) =
default;
118 AlignedArray( AlignedArray&& ) =
default;
120 template<
typename... Ts >
123 template<
typename T,
size_t M >
126 template<
typename T,
size_t M >
129 template<
typename T,
size_t M >
137 ~AlignedArray() =
default;
152 constexpr
Reference operator[](
size_t index ) noexcept;
170 AlignedArray& operator=( const AlignedArray& ) = default;
171 AlignedArray& operator=( AlignedArray&& ) = default;
173 template< typename T,
size_t M >
174 constexpr AlignedArray& operator=( const T (&array)[M] );
176 template< typename T,
size_t M >
177 constexpr AlignedArray& operator=( const std::array<T,M>& array );
179 template< typename T,
size_t M >
180 constexpr AlignedArray& operator=( const AlignedArray<T,M>& array );
187 constexpr
size_t size() const noexcept;
195 alignas( Alignment )
Type v_[ N>0UL ? N : 1UL ];
208 template< typename T,
size_t... Is >
234template<
typename Type,
typename... Ts >
235AlignedArray(
Type, Ts... ) -> AlignedArray<
Type,1+
sizeof...(Ts)>;
237template<
typename Type,
size_t N >
238AlignedArray(
Type (&)[N] ) -> AlignedArray< RemoveCV_t<Type>, N >;
240template<
typename Type,
size_t N >
241AlignedArray( std::array<Type,N> ) -> AlignedArray<Type,N>;
260template<
typename Type
263template<
typename... Ts >
264constexpr AlignedArray<Type,N,Alignment>::AlignedArray(
const Ts&... args )
278template<
typename Type
283constexpr AlignedArray<Type,N,Alignment>::AlignedArray(
const T (&array)[M] )
299template<
typename Type
304constexpr AlignedArray<Type,N,Alignment>::AlignedArray(
const std::array<T,M>& array )
320template<
typename Type
325constexpr AlignedArray<Type,N,Alignment>::AlignedArray(
const AlignedArray<T,M>& array )
341template<
typename Type
346constexpr AlignedArray<Type,N,Alignment>::AlignedArray(
const T& array, std::index_sequence<Is...> )
365template<
typename Type
368constexpr AlignedArray<Type,N,Alignment>::operator
Pointer() noexcept
380template<
typename Type
383constexpr AlignedArray<Type,N,Alignment>::operator
ConstPointer() const noexcept
406template<
typename Type
425template<
typename Type
446template<
typename Type
470template<
typename Type
491template<
typename Type
509template<
typename Type
525template<
typename Type
541template<
typename Type
557template<
typename Type
573template<
typename Type
589template<
typename Type
605template<
typename Type
633template<
typename Type
639 AlignedArray<Type,N,Alignment>::operator=(
const T (&array)[M] )
643 for(
size_t i=0UL; i<M; ++i )
646 for(
size_t i=M; i<N; ++i )
663template<
typename Type
669 AlignedArray<Type,N,Alignment>::operator=(
const std::array<T,M>& array )
673 for(
size_t i=0UL; i<M; ++i )
676 for(
size_t i=M; i<N; ++i )
693template<
typename Type
699 AlignedArray<Type,N,Alignment>::operator=(
const AlignedArray<T,M>& array )
703 for(
size_t i=0UL; i<M; ++i )
706 for(
size_t i=M; i<N; ++i )
727template<
typename Type
Header file for the AlignmentOf type trait.
Constraint on the data type.
Header file for the integer_sequence and index_sequence aliases.
Header file for the RemoveCV type trait.
Constraint on the data type.
Implementation of a static array with a fixed alignment.
Definition AlignedArray.h:101
constexpr Pointer data() noexcept
const Type * ConstIterator
Definition AlignedArray.h:110
const Type & ConstReference
Definition AlignedArray.h:108
constexpr Iterator end() noexcept
constexpr Reference operator[](size_t index) noexcept
Subscript operator for the direct access to the array elements.
Definition AlignedArray.h:410
constexpr size_t size() const noexcept
Type * Pointer
Definition AlignedArray.h:105
constexpr AlignedArray(const std::array< T, M > &array)
Initialization of all aligned array elements from the given std::array.
Definition AlignedArray.h:304
constexpr Iterator begin() noexcept
constexpr ConstIterator cbegin() const noexcept
Reference at(size_t index)
Type ElementType
Definition AlignedArray.h:104
constexpr AlignedArray(const Ts &... args)
Initialization constructor for AlignedArray.
Definition AlignedArray.h:264
const Type * ConstPointer
Definition AlignedArray.h:106
constexpr AlignedArray(const AlignedArray< T, M > &array)
Initialization of all aligned array elements from another aligned array.
Definition AlignedArray.h:325
Type & Reference
Definition AlignedArray.h:107
constexpr ConstIterator cend() const noexcept
Type * Iterator
Definition AlignedArray.h:109
constexpr AlignedArray(const T(&array)[M])
Initialization of all aligned array elements from the given static array.
Definition AlignedArray.h:283
Index sequence type of the Blaze library.
Import of the std::make_index_sequence alias template into the Blaze namespace.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.
Definition Volatile.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.
Definition Const.h:79
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition StaticAssert.h:112
constexpr size_t AlignmentOf_v
Auxiliary variable template for the AlignmentOf type trait.
Definition AlignmentOf.h:239
#define BLAZE_THROW_OUT_OF_RANGE(MESSAGE)
Macro for the emission of a std::out_of_range exception.
Definition Exception.h:331
Header file for exception macros.