Go to the documentation of this file.
32 #ifndef _AK_TOOLS_COMMON_AKPLATFORMFUNCS_H
33 #define _AK_TOOLS_COMMON_AKPLATFORMFUNCS_H
41 #if defined(AK_NULL_PLATFORM)
47 #elif defined (AK_XBOX)
50 #elif defined (AK_APPLE)
52 #include <AK/Tools/POSIX/AkPlatformFuncs.h>
54 #elif defined( AK_ANDROID ) || defined ( AK_LINUX_AOSP )
57 #elif defined ( AK_HARMONY )
60 #elif defined (AK_PS4)
63 #elif defined (AK_PS5)
66 #elif defined (AK_EMSCRIPTEN)
69 #elif defined (AK_LINUX)
71 #include <AK/Tools/POSIX/AkPlatformFuncs.h>
73 #elif defined (AK_QNX)
74 #include <AK/Tools/QNX/AkPlatformFuncs.h>
75 #include <AK/Tools/POSIX/AkPlatformFuncs.h>
81 #error AkPlatformFuncs.h: Undefined platform
84 #ifndef AkPrefetchZero
85 #define AkPrefetchZero(___Dest, ___Size)
88 #ifndef AkPrefetchZeroAligned
89 #define AkPrefetchZeroAligned(___Dest, ___Size)
92 #ifndef AkZeroMemAligned
93 #define AkZeroMemAligned(___Dest, ___Size) AKPLATFORM::AkMemSet(___Dest, 0, ___Size);
95 #ifndef AkZeroMemLarge
96 #define AkZeroMemLarge(___Dest, ___Size) AKPLATFORM::AkMemSet(___Dest, 0, ___Size);
98 #ifndef AkZeroMemSmall
99 #define AkZeroMemSmall(___Dest, ___Size) AKPLATFORM::AkMemSet(___Dest, 0, ___Size);
103 #if defined (__clang__)
104 #if __has_builtin( __builtin_alloca_with_align )
105 #define AkAllocaSIMD( _size_ ) __builtin_alloca_with_align( _size_, 128 )
108 #define AkAllocaSIMD( _size_ ) (void*)( ( ( uintptr_t )AkAlloca( _size_ + 16 ) + 0xF ) & ~0xF )
111 #define AkAllocaSIMD( _size_ ) AkAlloca( _size_ )
115 #ifndef AkAllocaTypedArray
116 #define AkAllocaTypedArray(_type_, _count_) ( (_type_*)AkAlloca(sizeof(_type_) * _count_) )
119 #ifndef AK_THREAD_INIT_CODE
120 #define AK_THREAD_INIT_CODE(_threadProperties)
123 #ifndef AK_PLATFORM_MEMCPY
129 memcpy(pDest, pSrc, uSize);
134 memmove(pDest, pSrc, uSize);
139 memset(pDest, iVal, uSize);
142 #endif // AK_PLATFORM_MEMCPY
144 #if !defined(AK_NULL_PLATFORM)
173 #ifndef AK_FORCE_CRASH
174 #define AK_FORCE_CRASH AKPLATFORM::AkForceCrash()
177 #endif // _AK_TOOLS_COMMON_AKPLATFORMFUNCS_H
AkForceInline void AkMemMove(void *pDest, const void *pSrc, AkUInt32 uSize)
int nPriority
Thread priority.
Platform-dependent helpers.
int32_t AkInt32
Signed 32-bit integer.
uintptr_t AkUIntPtr
Integer (unsigned) type for pointers.
void PerformanceCounter(AkInt64 *out_piLastTime)
Platform Independent Helper.
AkForceInline void AkMemCpy(void *pDest, const void *pSrc, AkUInt32 uSize)
Platform Independent Helper for memcpy/memmove/memset.
AkForceInline void AkGetDefaultThreadProperties(AkThreadProperties &out_threadProperties)
Platform Independent Helper.
AkForceInline void AkForceCrash()
void AkGetDefaultHighPriorityThreadProperties(AkThreadProperties &out_threadProperties)
int64_t AkInt64
Signed 64-bit integer.
uint32_t AkUInt32
Unsigned 32-bit integer.
AkForceInline void AkMemSet(void *pDest, AkInt32 iVal, AkUInt32 uSize)
Tell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise