35 #ifndef _BLAZE_UTIL_ALIGNEDARRAY_H_
36 #define _BLAZE_UTIL_ALIGNEDARRAY_H_
64 template<
typename Type
67 struct AlignedArrayHelper;
77 template<
typename Type
79 struct AlignedArrayHelper<Type,N,1UL>
81 BLAZE_ALIGN( 1UL ) Type v_[N];
92 template< typename Type
94 struct AlignedArrayHelper<Type,N,2UL>
96 BLAZE_ALIGN( 2UL ) Type v_[N];
107 template< typename Type
109 struct AlignedArrayHelper<Type,N,4UL>
111 BLAZE_ALIGN( 4UL ) Type v_[N];
122 template< typename Type
124 struct AlignedArrayHelper<Type,N,8UL>
126 BLAZE_ALIGN( 8UL ) Type v_[N];
137 template< typename Type
139 struct AlignedArrayHelper<Type,N,16UL>
141 BLAZE_ALIGN( 16UL ) Type v_[N];
152 template< typename Type
154 struct AlignedArrayHelper<Type,N,32UL>
156 BLAZE_ALIGN( 32UL ) Type v_[N];
167 template< typename Type
169 struct AlignedArrayHelper<Type,N,64UL>
171 BLAZE_ALIGN( 64UL ) Type v_[N];
182 template< typename Type
184 struct AlignedArrayHelper<Type,N,128UL>
186 BLAZE_ALIGN( 128UL ) Type v_[N];
197 template< typename Type
199 struct AlignedArrayHelper<Type,N,256UL>
201 BLAZE_ALIGN( 256UL ) Type v_[N];
261 template< typename Type
263 ,
size_t Alignment = AlignmentOf<Type>::value >
277 inline AlignedArray();
288 inline operator Pointer ();
289 inline operator ConstPointer()
const;
296 inline Reference operator[](
size_t index );
297 inline ConstReference operator[](
size_t index )
const;
298 inline Pointer data();
299 inline ConstPointer data()
const;
308 AlignedArrayHelper<Type,N,Alignment> array_;
334 template<
typename Type
357 template<
typename Type
372 template<
typename Type
398 template<
typename Type
405 return array_.v_[index];
418 template<
typename Type
425 return array_.v_[index];
437 template<
typename Type
455 template<
typename Type
#define BLAZE_CONSTRAINT_MUST_NOT_BE_CONST(T)
Constraint on the data type.In case the given data type is a const-qualified type, a compilation error is created.
Definition: Const.h:116
#define BLAZE_USER_ASSERT(expr, msg)
Run time assertion macro for user checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_USER_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERT flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:117
Header file for the AlignmentOf type trait.
#define BLAZE_CONSTRAINT_MUST_NOT_BE_VOLATILE(T)
Constraint on the data type.In case the given data type is a volatile-qualified type, a compilation error is created.
Definition: Volatile.h:116
AlignedArray()
The default constructor for AlignedArray.
Definition: AlignedArray.h:337
Pointer data()
Low-level data access to the array elements.
Definition: AlignedArray.h:441
const Type * ConstPointer
Pointer to a constant array element.
Definition: AlignedArray.h:269
Constraint on the data type.
Type * Pointer
Pointer to a non-constant array element.
Definition: AlignedArray.h:268
const Type & ConstReference
Reference to a constant array element.
Definition: AlignedArray.h:271
Header file for run time assertion macros.
Constraint on the data type.
Type & Reference
Reference to a non-constant array element.
Definition: AlignedArray.h:270
Reference operator[](size_t index)
Subscript operator for the direct access to the array elements.
Definition: AlignedArray.h:402
bool checkAlignment(const T *address)
Checks the alignment of the given.
Definition: AlignmentCheck.h:68
Header file for the alignment check function.
System specific memory alignment definitions.
Implementation of a static array with a fixed alignment.The AlignedArray class template represents a ...
Definition: AlignedArray.h:264
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101