|
template<typename T , size_t M> |
constexpr AlignedArray< Type, N, Alignment > & | operator= (const T(&array)[M]) |
| Assignment to all array elements from the given static array. More...
|
|
template<typename T , size_t M> |
constexpr AlignedArray< Type, N, Alignment > & | operator= (const std::array< T, M > &array) |
| Assignment to all array elements from the given std::array. More...
|
|
template<typename T , size_t M> |
constexpr AlignedArray< Type, N, Alignment > & | operator= (const AlignedArray< T, M > &array) |
| Assignment to all array elements from another aligned array. More...
|
|
|
| ~AlignedArray ()=default |
|
|
constexpr | operator Pointer () noexcept |
| Conversion operator to a pointer. More...
|
|
constexpr | operator ConstPointer () const noexcept |
| Conversion operator to a pointer-to-const. More...
|
|
|
constexpr Reference | operator[] (size_t index) noexcept |
| Subscript operator for the direct access to the array elements. More...
|
|
constexpr ConstReference | operator[] (size_t index) const noexcept |
| Subscript operator for the direct access to the array elements. More...
|
|
Reference | at (size_t index) |
| Checked access to the array elements. More...
|
|
ConstReference | at (size_t index) const |
| Checked access to the array elements. More...
|
|
constexpr Pointer | data () noexcept |
| Low-level data access to the array elements. More...
|
|
constexpr ConstPointer | data () const noexcept |
| Low-level data access to the array elements. More...
|
|
constexpr Iterator | begin () noexcept |
| Returns an iterator to the first element of the aligned array. More...
|
|
constexpr ConstIterator | begin () const noexcept |
| Returns an iterator to the first element of the aligned array. More...
|
|
constexpr ConstIterator | cbegin () const noexcept |
| Returns an iterator to the first element of the aligned array. More...
|
|
constexpr Iterator | end () noexcept |
| Returns an iterator just past the last element of the aligned array. More...
|
|
constexpr ConstIterator | end () const noexcept |
| Returns an iterator just past the last element of the aligned array. More...
|
|
constexpr ConstIterator | cend () const noexcept |
| Returns an iterator just past the last element of the aligned array. More...
|
|
|
AlignedArray & | operator= (const AlignedArray &)=default |
|
AlignedArray & | operator= (AlignedArray &&)=default |
|
template<typename T , size_t M> |
constexpr AlignedArray & | operator= (const T(&array)[M]) |
|
template<typename T , size_t M> |
constexpr AlignedArray & | operator= (const std::array< T, M > &array) |
|
template<typename T , size_t M> |
constexpr AlignedArray & | operator= (const AlignedArray< T, M > &array) |
|
|
constexpr size_t | size () const noexcept |
| Returns the current size/dimension of the aligned array. More...
|
|
|
| AlignedArray ()=default |
|
| AlignedArray (const AlignedArray &)=default |
|
| AlignedArray (AlignedArray &&)=default |
|
template<typename... Ts> |
constexpr | AlignedArray (const Ts &... args) |
| Initialization constructor for AlignedArray. More...
|
|
template<typename T , size_t M> |
constexpr | AlignedArray (const T(&array)[M]) |
| Initialization of all aligned array elements from the given static array. More...
|
|
template<typename T , size_t M> |
constexpr | AlignedArray (const std::array< T, M > &array) |
| Initialization of all aligned array elements from the given std::array. More...
|
|
template<typename T , size_t M> |
constexpr | AlignedArray (const AlignedArray< T, M > &array) |
| Initialization of all aligned array elements from another aligned array. More...
|
|
template<typename T , size_t... Is> |
constexpr | AlignedArray (const T &array, std::index_sequence< Is... >) |
| Initialization of all aligned array elements from the given array. More...
|
|
template<typename Type, size_t N, size_t Alignment = AlignmentOf_v<Type>>
class blaze::AlignedArray< Type, N, Alignment >
Implementation of a static array with a fixed alignment.
The AlignedArray class template represents a static array with a guaranteed, fixed alignment. The type of the array elements, the number of elements and the alignment of the array can be specified via the three template parameters:
template< typename Type, size_t N, size_t Alignment >
class AlignedArray;
The alignment of the array, which must be a power of two (i.e. 1, 2, 4, 8, ...), can either be specified explicitly via the template parameter Alignment or it is evaluated automatically based on the alignment requirements of the given data type Type. In the latter case, if T is a built-in, vectorizable data type, AlignedArray enforces an alignment of 16 or 32 bytes, depending on the active SSE/AVX level. In all other cases, no specific alignment is enforced.
AlignedArray can be used exactly like any built-in static array. It is possible to access the individual element via the subscript operator and the array can be used wherever a pointer is expected:
void func( const int* );
array[10] = 2;
func( array );
Implementation of a static array with a fixed alignment.
Definition: AlignedArray.h:101