목차

include/AK/Tools/Common/AkPlatformFuncs.h

Go to the documentation of this file.
00001 
00002 //
00003 // Copyright (c) 2006 Audiokinetic Inc. / All Rights Reserved
00004 //
00006 
00007 // AkPlatformFuncs.h
00008 
00011 
00012 #ifndef _AK_TOOLS_COMMON_AKPLATFORMFUNCS_H
00013 #define _AK_TOOLS_COMMON_AKPLATFORMFUNCS_H
00014 
00015 #include <AK/SoundEngine/Common/AkTypes.h>
00016 
00017 #if defined(AK_WIN) || defined(AK_XBOXONE)
00018 #include <AK/Tools/Win32/AkPlatformFuncs.h>
00019 
00020 #elif defined (AK_XBOX360)
00021 #include <AK/Tools/XBox360/AkPlatformFuncs.h>
00022 
00023 #elif defined (AK_PS3)
00024 #include <AK/Tools/PS3/AkPlatformFuncs.h>
00025 
00026 #elif defined (AK_WII)
00027 #include <AK/Tools/Wii/AkPlatformFuncs.h>
00028 
00029 #elif defined (AK_WIIU)
00030 #include <AK/Tools/WiiU/AkPlatformFuncs.h>
00031 
00032 #elif defined (AK_APPLE)
00033 #include <AK/Tools/Mac/AkPlatformFuncs.h>
00034 #include <AK/Tools/POSIX/AkPlatformFuncs.h>
00035 
00036 #elif defined (AK_VITA)
00037 #include <AK/Tools/Vita/AkPlatformFuncs.h>
00038 
00039 #elif defined (AK_3DS)
00040 #include <AK/Tools/3DS/AkPlatformFuncs.h>
00041 
00042 #elif defined (AK_ANDROID)
00043 #include <AK/Tools/Android/AkPlatformFuncs.h>
00044 
00045 #elif defined (AK_NACL)
00046 #include <AK/Tools/nacl/AkPlatformFuncs.h>
00047 #include <AK/Tools/POSIX/AkPlatformFuncs.h>
00048 
00049 #elif defined (AK_PS4)
00050 #include <AK/Tools/PS4/AkPlatformFuncs.h>
00051 
00052 #elif defined (AK_LINUX)
00053 #include <AK/Tools/Linux/AkPlatformFuncs.h>
00054 #include <AK/Tools/POSIX/AkPlatformFuncs.h>
00055 
00056 #elif defined (AK_QNX)
00057 #include <AK/Tools/QNX/AkPlatformFuncs.h>
00058 #include <AK/Tools/POSIX/AkPlatformFuncs.h>
00059 
00060 #else
00061 #error AkPlatformFuncs.h: Undefined platform
00062 #endif
00063 
00064 #ifndef AkPrefetchZero
00065 #define AkPrefetchZero(___Dest, ___Size)
00066 #endif
00067 
00068 #ifndef AkPrefetchZeroAligned
00069 #define AkPrefetchZeroAligned(___Dest, ___Size)
00070 #endif
00071 
00072 #ifndef AkZeroMemAligned
00073 #define AkZeroMemAligned(___Dest, ___Size) AKPLATFORM::AkMemSet(___Dest, 0, ___Size);
00074 #endif
00075 #ifndef AkZeroMemLarge
00076 #define AkZeroMemLarge(___Dest, ___Size) AKPLATFORM::AkMemSet(___Dest, 0, ___Size);
00077 #endif
00078 #ifndef AkZeroMemSmall
00079 #define AkZeroMemSmall(___Dest, ___Size) AKPLATFORM::AkMemSet(___Dest, 0, ___Size);
00080 #endif
00081 
00082 #ifndef AK_THREAD_INIT_CODE
00083 #define AK_THREAD_INIT_CODE(_threadProperties)
00084 #endif
00085 
00087 namespace AK
00088 {
00091     AkForceInline AkUInt32 GetNumNonZeroBits( AkUInt32 in_uWord )
00092     {
00093         AkUInt32 num = 0;
00094         while( in_uWord ){ ++num; in_uWord &= in_uWord-1; }
00095         return num;
00096     }
00097 }
00098 
00099 
00100 #ifndef AK_PERF_RECORDING_RESET
00101 #define AK_PERF_RECORDING_RESET()
00102 #endif
00103 #ifndef AK_PERF_RECORDING_START
00104 #define AK_PERF_RECORDING_START( __StorageName__, __uExecutionCountStart__, __uExecutionCountStop__ )
00105 #endif
00106 #ifndef AK_PERF_RECORDING_STOP
00107 #define AK_PERF_RECORDING_STOP( __StorageName__, __uExecutionCountStart__, __uExecutionCountStop__ )    
00108 #endif
00109 
00110 #endif // _AK_TOOLS_COMMON_AKPLATFORMFUNCS_H