Ark Server API (ASE) - Wiki
|
#include "../BasicTypes.h"
Go to the source code of this file.
Functions | |
template<typename T > | |
CONSTEXPR T | Align (const T Ptr, int32 Alignment) |
template<typename T > | |
CONSTEXPR T | AlignDown (const T Ptr, int32 Alignment) |
static FORCEINLINE bool | IsAligned (const volatile void *Ptr, const uint32 Alignment) |
template<class T > | |
T | AlignArbitrary (const T Ptr, uint32 Alignment) |
Aligns a value to the nearest higher multiple of 'Alignment', which must be a power of two.
Ptr | Value to align |
Alignment | Alignment, must be a power of two |
Definition at line 15 of file AlignmentTemplates.h.
|
inline |
Aligns a value to the nearest higher multiple of 'Alignment'.
Ptr | Value to align |
Alignment | Alignment, can be any arbitrary uint32 |
Definition at line 52 of file AlignmentTemplates.h.
Aligns a value to the nearest lower multiple of 'Alignment', which must be a power of two.
Ptr | Value to align |
Alignment | Alignment, must be a power of two |
Definition at line 28 of file AlignmentTemplates.h.
|
static |
Checks if a pointer is aligned to the specified alignment.
Ptr | - The pointer to check. |
Definition at line 40 of file AlignmentTemplates.h.