35#ifndef _BLAZE_UTIL_ALIGNEDALLOCATOR_H_
36#define _BLAZE_UTIL_ALIGNEDALLOCATOR_H_
88 template<
typename U >
91 using other = AlignedAllocator<U>;
98 AlignedAllocator() =
default;
100 template<
typename U >
109 inline void deallocate( T* ptr,
size_t numObjects )
noexcept;
129template<
typename T >
130template<
typename U >
131inline AlignedAllocator<T>::AlignedAllocator(
const AlignedAllocator<U>& allocator )
158template<
typename T >
163 if( alignment >= 8UL ) {
164 return reinterpret_cast<T*
>(
alignedAllocate( numObjects*
sizeof(T), alignment ) );
167 return static_cast<T*
>(
operator new[]( numObjects *
sizeof( T ) ) );
184template<
typename T >
194 if( alignment >= 8UL ) {
198 operator delete[]( ptr );
215template<
typename T1,
typename T2 >
218template<
typename T1,
typename T2 >
Header file for the AlignmentOf type trait.
Header file for the MAYBE_UNUSED function template.
Header file for memory allocation and deallocation functionality.
Allocator for type-specific aligned memory.
Definition AlignedAllocator.h:72
size_t SizeType
Definition AlignedAllocator.h:76
ValueType value_type
Definition AlignedAllocator.h:80
T * allocate(size_t numObjects)
Allocates aligned memory for the specified number of objects.
Definition AlignedAllocator.h:159
Type ValueType
Definition AlignedAllocator.h:75
void deallocate(T *ptr, size_t numObjects) noexcept
Deallocation of memory.
Definition AlignedAllocator.h:185
ptrdiff_t DifferenceType
Definition AlignedAllocator.h:77
AlignedAllocator(const AlignedAllocator< U > &)
Conversion constructor from different AlignedAllocator instances.
Definition AlignedAllocator.h:131
SizeType size_type
Definition AlignedAllocator.h:81
DifferenceType difference_type
Definition AlignedAllocator.h:82
Pointer difference type of the Blaze library.
Size type of the Blaze library.
constexpr bool operator==(const NegativeAccuracy< A > &lhs, const T &rhs)
Equality comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:253
constexpr bool operator!=(const NegativeAccuracy< A > &lhs, const T &rhs)
Inequality comparison between a NegativeAccuracy object and a floating point value.
Definition Accuracy.h:293
constexpr size_t AlignmentOf_v
Auxiliary variable template for the AlignmentOf type trait.
Definition AlignmentOf.h:239
void alignedDeallocate(const void *address) noexcept
Deallocation of aligned memory.
Definition Memory.h:115
constexpr void MAYBE_UNUSED(const Args &...)
Suppression of unused parameter warnings.
Definition MaybeUnused.h:81
byte_t * alignedAllocate(size_t size, size_t alignment)
Aligned array allocation.
Definition Memory.h:82
Implementation of the AlignedAllocator rebind mechanism.
Definition AlignedAllocator.h:90
AlignedAllocator< U > other
Type of the other allocator.
Definition AlignedAllocator.h:91
Header file for basic type definitions.