5#include "../platform/attributes.hpp"
6#include "../platform/constexpr.hpp"
#define REXLIB_NODISCARD
Indicates that the return value should be used.
Definition attributes.hpp:76
Container for multidimensional numeric data.
Definition array.hpp:31
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
REXLIB_NODISCARD T * align_ceil(T *address, std::size_t alignment) noexcept
Align a pointer to a higher or equal address that satisfies the provided alignment.
REXLIB_NODISCARD T * offset_bytes(T *address, std::ptrdiff_t count)
Offset an address by a given amount of bytes.
REXLIB_NODISCARD std::size_t get_alignment(T *address) noexcept
Get the alignment of a pointer.
REXLIB_CONSTEXPR std::uintptr_t & align_floor_inplace(std::uintptr_t &address, std::size_t alignment) noexcept
Align an address to a lower or equal address that satisfies the provided alignment.
REXLIB_CONSTEXPR std::uintptr_t & align_ceil_inplace(std::uintptr_t &address, std::size_t alignment) noexcept
Align an address to a higher or equal address that satisfies the provided alignment.
REXLIB_NODISCARD bool is_aligned(T *address, std::size_t alignment) noexcept
Check if a pointer is aligned to the provided boundary.
REXLIB_NODISCARD T * align_floor(T *address, std::size_t alignment) noexcept
Align a pointer to a lower or equal address that satisfies the provided alignment.