72template<
typename T, std::
size_t N, std::
size_t ALIGNMENT_IN_BYTES = sizeof(T)>
73struct alignas(ALIGNMENT_IN_BYTES)
TAlignedArray :
public std::array<T, N>
76 inline static constexpr std::size_t ALIGNMENT = ALIGNMENT_IN_BYTES;
96template<
typename T =
void>
101void from_bytes(
const std::byte* srcBytes, T* out_dstValue);
104void to_bytes(
const T& srcValue, std::byte* out_dstBytes);
106template<std::
size_t N>
void free_aligned_memory(void *ptr)
Definition memory.cpp:54
void * allocate_aligned_memory(std::size_t numBytes, std::size_t alignmentInBytes)
Definition memory.cpp:27
The root for all renderer implementations.
Definition assertion.h:9
T * start_implicit_lifetime_as_array(void *ptr, std::size_t numArrayElements) noexcept
Wrapper for std::start_lifetime_as_array(). Primarily a fallback when C++23 is not available....
Definition memory.ipp:132
T * start_implicit_lifetime_as(void *ptr) noexcept
Wrapper for std::start_lifetime_as(). Primarily a fallback when C++23 is not available....
Definition memory.ipp:122
void from_bytes(const std::byte *srcBytes, T *out_dstValue)
Definition memory.ipp:34
std::unique_ptr< T, detail::AlignedMemoryDeleter > TAlignedMemoryUniquePtr
Definition memory.h:56
auto make_aligned_memory(std::size_t numBytes, std::size_t alignmentInBytes) -> TAlignedMemoryUniquePtr< T >
Create an aligned memory resource.
Definition memory.ipp:17
void reverse_bytes(std::byte *bytes)
Definition memory.ipp:61
void to_bytes(const T &srcValue, std::byte *out_dstBytes)
Definition memory.ipp:48
Aligned version of std::array. This type shares the same traits as std::array. [class....
Definition memory.h:74
void operator()(void *const ptr) const
Definition memory.h:39