24 #ifndef PXR_BASE_ARCH_ALIGN_H
25 #define PXR_BASE_ARCH_ALIGN_H
31 #if !defined(__cplusplus)
32 #error This include file can only be included in C++ programs.
55 return (nBytes + 7) & (~0x7);
64 #define ARCH_MAX_ALIGNMENT_INCREASE 7
74 return reinterpret_cast<void *
>
75 ((
reinterpret_cast<uintptr_t>(base) + 7) & ~0x7);
81 #if defined(ARCH_OS_DARWIN) && defined(ARCH_CPU_ARM)
82 #define ARCH_CACHE_LINE_SIZE 128
84 #define ARCH_CACHE_LINE_SIZE 64
101 #endif // PXR_BASE_ARCH_ALIGN_H
fallback_uintptr uintptr_t
ARCH_API void ArchAlignedFree(void *ptr)
Free memory allocated by ArchAlignedAlloc.
void * ArchAlignMemory(void *base)
ARCH_API void * ArchAlignedAlloc(size_t alignment, size_t size)
Aligned memory allocation.
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
size_t ArchAlignMemorySize(size_t nBytes)