7#include <Common/math_basics.h>
18 , m_memoryBlock(nullptr)
22 :
HostMemoryBlock(blockSizeHintInBytes, os::get_L1_cache_line_size_in_bytes())
27 const auto alignmentSize = std::lcm(
alignof(std::max_align_t), alignmentInBytes);
28 const auto blockSize = math::next_multiple(blockSizeHintInBytes, alignmentSize);
30 m_memoryBlock = make_aligned_memory<std::byte>(blockSize, alignmentSize);
57 swap(first.m_memoryBlock, second.m_memoryBlock);
Definition GraphicsMemoryBlock.h:13
void setBlockSource(std::byte *source, std::size_t blockSizeInBytes)
Definition GraphicsMemoryBlock.cpp:34
A chunk of cache aligned main memory.
Definition HostMemoryBlock.h:16
HostMemoryBlock()
Empty block without any allocation.
Definition HostMemoryBlock.ipp:16
HostMemoryBlock & operator=(HostMemoryBlock &&rhs) noexcept
Definition HostMemoryBlock.ipp:45
Definition ghi_exceptions.h:20
Definition PlatformDisplay.h:13
void swap(GraphicsMemoryBlock &first, GraphicsMemoryBlock &second) noexcept
Definition GraphicsMemoryBlock.cpp:52