From b99b3783cd7e3fb1bb0a07dc472b2fc000c4cdc1 Mon Sep 17 00:00:00 2001 From: Sheikh Dawood Date: Fri, 25 May 2018 09:54:38 -0500 Subject: PhysX 3.4, APEX 1.4 patch release @24214033 --- .../PhysXAPI/files/PxPreprocessor_8h-source.html | 738 ++++++++++----------- 1 file changed, 369 insertions(+), 369 deletions(-) (limited to 'PhysX_3.4/Documentation/PhysXAPI/files/PxPreprocessor_8h-source.html') diff --git a/PhysX_3.4/Documentation/PhysXAPI/files/PxPreprocessor_8h-source.html b/PhysX_3.4/Documentation/PhysXAPI/files/PxPreprocessor_8h-source.html index 2c7daea1..61bdb2a4 100644 --- a/PhysX_3.4/Documentation/PhysXAPI/files/PxPreprocessor_8h-source.html +++ b/PhysX_3.4/Documentation/PhysXAPI/files/PxPreprocessor_8h-source.html @@ -43,7 +43,7 @@ 00023 // components in life support devices or systems without express written approval of 00024 // NVIDIA Corporation. 00025 // -00026 // Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved. +00026 // Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved. 00027 // Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved. 00028 // Copyright (c) 2001-2004 NovodeX AG. All rights reserved. 00029 @@ -55,411 +55,411 @@ 00035 #include <ciso646> 00036 #endif 00037 -00041 /* -00042 The following preprocessor identifiers specify compiler, OS, and architecture. -00043 All definitions have a value of 1 or 0, use '#if' instead of '#ifdef'. -00044 */ -00045 -00049 #if defined(_MSC_VER) -00050 #if _MSC_VER >= 1910 -00051 #define PX_VC 15 -00052 #elif _MSC_VER >= 1900 -00053 #define PX_VC 14 -00054 #elif _MSC_VER >= 1800 -00055 #define PX_VC 12 -00056 #elif _MSC_VER >= 1700 -00057 #define PX_VC 11 -00058 #elif _MSC_VER >= 1600 -00059 #define PX_VC 10 -00060 #elif _MSC_VER >= 1500 -00061 #define PX_VC 9 -00062 #else -00063 #error "Unknown VC version" -00064 #endif -00065 #elif defined(__clang__) -00066 #define PX_CLANG 1 -00067 #elif defined(__GNUC__) // note: __clang__ implies __GNUC__ -00068 #define PX_GCC 1 -00069 #else -00070 #error "Unknown compiler" -00071 #endif -00072 -00076 #if defined(_XBOX_ONE) -00077 #define PX_XBOXONE 1 -00078 #elif defined(_WIN64) // note: _XBOX_ONE implies _WIN64 -00079 #define PX_WIN64 1 -00080 #elif defined(_WIN32) // note: _M_PPC implies _WIN32 -00081 #define PX_WIN32 1 -00082 #elif defined(__ANDROID__) -00083 #define PX_ANDROID 1 -00084 #elif defined(__linux__) || defined (__EMSCRIPTEN__) // note: __ANDROID__ implies __linux__ -00085 #define PX_LINUX 1 -00086 #elif defined(__APPLE__) && (defined(__arm__) || defined(__arm64__)) -00087 #define PX_IOS 1 -00088 #elif defined(__APPLE__) -00089 #define PX_OSX 1 -00090 #elif defined(__ORBIS__) -00091 #define PX_PS4 1 -00092 #elif defined(__NX__) -00093 #define PX_SWITCH 1 -00094 #else -00095 #error "Unknown operating system" -00096 #endif -00097 -00101 #if defined(__x86_64__) || defined(_M_X64) // ps4 compiler defines _M_X64 without value -00102 #define PX_X64 1 -00103 #elif defined(__i386__) || defined(_M_IX86) || defined (__EMSCRIPTEN__) -00104 #define PX_X86 1 -00105 #elif defined(__arm64__) || defined(__aarch64__) -00106 #define PX_A64 1 -00107 #elif defined(__arm__) || defined(_M_ARM) -00108 #define PX_ARM 1 -00109 #elif defined(__ppc__) || defined(_M_PPC) || defined(__CELLOS_LV2__) -00110 #define PX_PPC 1 -00111 #else -00112 #error "Unknown architecture" -00113 #endif -00114 -00118 #if !defined(PX_SIMD_DISABLED) -00119 #if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) || (defined (__EMSCRIPTEN__) && defined(__SSE2__)) -00120 #define PX_SSE2 1 -00121 #endif -00122 #if defined(_M_ARM) || defined(__ARM_NEON__) || defined(__ARM_NEON) -00123 #define PX_NEON 1 -00124 #endif -00125 #if defined(_M_PPC) || defined(__CELLOS_LV2__) -00126 #define PX_VMX 1 +00041 #define PX_STRINGIZE_HELPER(X) #X +00042 #define PX_STRINGIZE(X) PX_STRINGIZE_HELPER(X) +00043 +00044 #define PX_CONCAT_HELPER(X, Y) X##Y +00045 #define PX_CONCAT(X, Y) PX_CONCAT_HELPER(X, Y) +00046 +00047 /* +00048 The following preprocessor identifiers specify compiler, OS, and architecture. +00049 All definitions have a value of 1 or 0, use '#if' instead of '#ifdef'. +00050 */ +00051 +00055 #if defined(_MSC_VER) +00056 #if _MSC_VER >= 1910 +00057 #define PX_VC 15 +00058 #elif _MSC_VER >= 1900 +00059 #define PX_VC 14 +00060 #elif _MSC_VER >= 1800 +00061 #define PX_VC 12 +00062 #elif _MSC_VER >= 1700 +00063 #define PX_VC 11 +00064 #elif _MSC_VER >= 1600 +00065 #define PX_VC 10 +00066 #elif _MSC_VER >= 1500 +00067 #define PX_VC 9 +00068 #else +00069 #error "Unknown VC version" +00070 #endif +00071 #elif defined(__clang__) +00072 #define PX_CLANG 1 +00073 #elif defined(__GNUC__) // note: __clang__ implies __GNUC__ +00074 #define PX_GCC 1 +00075 #else +00076 #error "Unknown compiler" +00077 #endif +00078 +00082 #if defined(_XBOX_ONE) +00083 #define PX_XBOXONE 1 +00084 #elif defined(_WIN64) // note: _XBOX_ONE implies _WIN64 +00085 #define PX_WIN64 1 +00086 #elif defined(_WIN32) // note: _M_PPC implies _WIN32 +00087 #define PX_WIN32 1 +00088 #elif defined(__ANDROID__) +00089 #define PX_ANDROID 1 +00090 #elif defined(__linux__) || defined (__EMSCRIPTEN__) // note: __ANDROID__ implies __linux__ +00091 #define PX_LINUX 1 +00092 #elif defined(__APPLE__) && (defined(__arm__) || defined(__arm64__)) +00093 #define PX_IOS 1 +00094 #elif defined(__APPLE__) +00095 #define PX_OSX 1 +00096 #elif defined(__ORBIS__) +00097 #define PX_PS4 1 +00098 #elif defined(__NX__) +00099 #define PX_SWITCH 1 +00100 #else +00101 #error "Unknown operating system" +00102 #endif +00103 +00107 #if defined(__x86_64__) || defined(_M_X64) // ps4 compiler defines _M_X64 without value +00108 #define PX_X64 1 +00109 #elif defined(__i386__) || defined(_M_IX86) || defined (__EMSCRIPTEN__) +00110 #define PX_X86 1 +00111 #elif defined(__arm64__) || defined(__aarch64__) +00112 #define PX_A64 1 +00113 #elif defined(__arm__) || defined(_M_ARM) +00114 #define PX_ARM 1 +00115 #elif defined(__ppc__) || defined(_M_PPC) || defined(__CELLOS_LV2__) +00116 #define PX_PPC 1 +00117 #else +00118 #error "Unknown architecture" +00119 #endif +00120 +00124 #if !defined(PX_SIMD_DISABLED) +00125 #if defined(__i386__) || defined(_M_IX86) || defined(__x86_64__) || defined(_M_X64) || (defined (__EMSCRIPTEN__) && defined(__SSE2__)) +00126 #define PX_SSE2 1 00127 #endif -00128 #endif -00129 -00133 #ifndef PX_VC -00134 #define PX_VC 0 -00135 #endif -00136 #ifndef PX_CLANG -00137 #define PX_CLANG 0 -00138 #endif -00139 #ifndef PX_GCC -00140 #define PX_GCC 0 +00128 #if defined(_M_ARM) || defined(__ARM_NEON__) || defined(__ARM_NEON) +00129 #define PX_NEON 1 +00130 #endif +00131 #if defined(_M_PPC) || defined(__CELLOS_LV2__) +00132 #define PX_VMX 1 +00133 #endif +00134 #endif +00135 +00139 #ifndef PX_VC +00140 #define PX_VC 0 00141 #endif -00142 #ifndef PX_XBOXONE -00143 #define PX_XBOXONE 0 +00142 #ifndef PX_CLANG +00143 #define PX_CLANG 0 00144 #endif -00145 #ifndef PX_WIN64 -00146 #define PX_WIN64 0 +00145 #ifndef PX_GCC +00146 #define PX_GCC 0 00147 #endif -00148 #ifndef PX_WIN32 -00149 #define PX_WIN32 0 +00148 #ifndef PX_XBOXONE +00149 #define PX_XBOXONE 0 00150 #endif -00151 #ifndef PX_ANDROID -00152 #define PX_ANDROID 0 +00151 #ifndef PX_WIN64 +00152 #define PX_WIN64 0 00153 #endif -00154 #ifndef PX_LINUX -00155 #define PX_LINUX 0 +00154 #ifndef PX_WIN32 +00155 #define PX_WIN32 0 00156 #endif -00157 #ifndef PX_IOS -00158 #define PX_IOS 0 +00157 #ifndef PX_ANDROID +00158 #define PX_ANDROID 0 00159 #endif -00160 #ifndef PX_OSX -00161 #define PX_OSX 0 +00160 #ifndef PX_LINUX +00161 #define PX_LINUX 0 00162 #endif -00163 #ifndef PX_PS4 -00164 #define PX_PS4 0 +00163 #ifndef PX_IOS +00164 #define PX_IOS 0 00165 #endif -00166 #ifndef PX_SWITCH -00167 #define PX_SWITCH 0 +00166 #ifndef PX_OSX +00167 #define PX_OSX 0 00168 #endif -00169 #ifndef PX_X64 -00170 #define PX_X64 0 +00169 #ifndef PX_PS4 +00170 #define PX_PS4 0 00171 #endif -00172 #ifndef PX_X86 -00173 #define PX_X86 0 +00172 #ifndef PX_SWITCH +00173 #define PX_SWITCH 0 00174 #endif -00175 #ifndef PX_A64 -00176 #define PX_A64 0 +00175 #ifndef PX_X64 +00176 #define PX_X64 0 00177 #endif -00178 #ifndef PX_ARM -00179 #define PX_ARM 0 +00178 #ifndef PX_X86 +00179 #define PX_X86 0 00180 #endif -00181 #ifndef PX_PPC -00182 #define PX_PPC 0 +00181 #ifndef PX_A64 +00182 #define PX_A64 0 00183 #endif -00184 #ifndef PX_SSE2 -00185 #define PX_SSE2 0 +00184 #ifndef PX_ARM +00185 #define PX_ARM 0 00186 #endif -00187 #ifndef PX_NEON -00188 #define PX_NEON 0 +00187 #ifndef PX_PPC +00188 #define PX_PPC 0 00189 #endif -00190 #ifndef PX_VMX -00191 #define PX_VMX 0 +00190 #ifndef PX_SSE2 +00191 #define PX_SSE2 0 00192 #endif -00193 -00194 /* -00195 define anything not defined through the command line to 0 -00196 */ -00197 #ifndef PX_DEBUG -00198 #define PX_DEBUG 0 -00199 #endif -00200 #ifndef PX_CHECKED -00201 #define PX_CHECKED 0 -00202 #endif -00203 #ifndef PX_PROFILE -00204 #define PX_PROFILE 0 +00193 #ifndef PX_NEON +00194 #define PX_NEON 0 +00195 #endif +00196 #ifndef PX_VMX +00197 #define PX_VMX 0 +00198 #endif +00199 +00200 /* +00201 define anything not defined through the command line to 0 +00202 */ +00203 #ifndef PX_DEBUG +00204 #define PX_DEBUG 0 00205 #endif -00206 #ifndef PX_NVTX -00207 #define PX_NVTX 0 +00206 #ifndef PX_CHECKED +00207 #define PX_CHECKED 0 00208 #endif -00209 #ifndef PX_DOXYGEN -00210 #define PX_DOXYGEN 0 +00209 #ifndef PX_PROFILE +00210 #define PX_PROFILE 0 00211 #endif -00212 -00216 // compiler -00217 #define PX_GCC_FAMILY (PX_CLANG || PX_GCC) -00218 // os -00219 #define PX_WINDOWS_FAMILY (PX_WIN32 || PX_WIN64) -00220 #define PX_MICROSOFT_FAMILY (PX_XBOXONE || PX_WINDOWS_FAMILY) -00221 #define PX_LINUX_FAMILY (PX_LINUX || PX_ANDROID) -00222 #define PX_APPLE_FAMILY (PX_IOS || PX_OSX) // equivalent to #if __APPLE__ -00223 #define PX_UNIX_FAMILY (PX_LINUX_FAMILY || PX_APPLE_FAMILY) // shortcut for unix/posix platforms -00224 #if defined(__EMSCRIPTEN__) -00225 #define PX_EMSCRIPTEN 1 -00226 #else -00227 #define PX_EMSCRIPTEN 0 -00228 #endif -00229 // architecture -00230 #define PX_INTEL_FAMILY (PX_X64 || PX_X86) -00231 #define PX_ARM_FAMILY (PX_ARM || PX_A64) -00232 #define PX_P64_FAMILY (PX_X64 || PX_A64) // shortcut for 64-bit architectures -00233 -00237 #if defined(_LIBCPP_VERSION) || PX_WIN64 || PX_WIN32 || PX_PS4 || PX_XBOXONE || PX_EMSCRIPTEN -00238 #define PX_LIBCPP 1 -00239 #else -00240 #define PX_LIBCPP 0 -00241 #endif -00242 -00243 // legacy define for PhysX -00244 #define PX_WINDOWS (PX_WINDOWS_FAMILY && !PX_ARM_FAMILY) -00245 -00249 #ifndef PX_ENABLE_ASSERTS -00250 #if PX_DEBUG && !defined(__CUDACC__) -00251 #define PX_ENABLE_ASSERTS 1 -00252 #else -00253 #define PX_ENABLE_ASSERTS 0 -00254 #endif -00255 #endif -00256 -00260 #ifndef PX_C_EXPORT -00261 #if PX_WINDOWS_FAMILY || PX_LINUX -00262 #define PX_C_EXPORT extern "C" -00263 #else -00264 #define PX_C_EXPORT -00265 #endif -00266 #endif -00267 -00268 #if PX_UNIX_FAMILY&& __GNUC__ >= 4 -00269 #define PX_UNIX_EXPORT __attribute__((visibility("default"))) -00270 #else -00271 #define PX_UNIX_EXPORT +00212 #ifndef PX_NVTX +00213 #define PX_NVTX 0 +00214 #endif +00215 #ifndef PX_DOXYGEN +00216 #define PX_DOXYGEN 0 +00217 #endif +00218 +00222 // compiler +00223 #define PX_GCC_FAMILY (PX_CLANG || PX_GCC) +00224 // os +00225 #define PX_WINDOWS_FAMILY (PX_WIN32 || PX_WIN64) +00226 #define PX_MICROSOFT_FAMILY (PX_XBOXONE || PX_WINDOWS_FAMILY) +00227 #define PX_LINUX_FAMILY (PX_LINUX || PX_ANDROID) +00228 #define PX_APPLE_FAMILY (PX_IOS || PX_OSX) // equivalent to #if __APPLE__ +00229 #define PX_UNIX_FAMILY (PX_LINUX_FAMILY || PX_APPLE_FAMILY) // shortcut for unix/posix platforms +00230 #if defined(__EMSCRIPTEN__) +00231 #define PX_EMSCRIPTEN 1 +00232 #else +00233 #define PX_EMSCRIPTEN 0 +00234 #endif +00235 // architecture +00236 #define PX_INTEL_FAMILY (PX_X64 || PX_X86) +00237 #define PX_ARM_FAMILY (PX_ARM || PX_A64) +00238 #define PX_P64_FAMILY (PX_X64 || PX_A64) // shortcut for 64-bit architectures +00239 +00243 #if defined(_LIBCPP_VERSION) || PX_WIN64 || PX_WIN32 || PX_PS4 || PX_XBOXONE || PX_EMSCRIPTEN +00244 #define PX_LIBCPP 1 +00245 #else +00246 #define PX_LIBCPP 0 +00247 #endif +00248 +00249 // legacy define for PhysX +00250 #define PX_WINDOWS (PX_WINDOWS_FAMILY && !PX_ARM_FAMILY) +00251 +00255 #ifndef PX_ENABLE_ASSERTS +00256 #if PX_DEBUG && !defined(__CUDACC__) +00257 #define PX_ENABLE_ASSERTS 1 +00258 #else +00259 #define PX_ENABLE_ASSERTS 0 +00260 #endif +00261 #endif +00262 +00266 #ifndef PX_C_EXPORT +00267 #if PX_WINDOWS_FAMILY || PX_LINUX +00268 #define PX_C_EXPORT extern "C" +00269 #else +00270 #define PX_C_EXPORT +00271 #endif 00272 #endif 00273 -00274 #if PX_WINDOWS_FAMILY -00275 #define PX_DLL_EXPORT __declspec(dllexport) -00276 #define PX_DLL_IMPORT __declspec(dllimport) -00277 #else -00278 #define PX_DLL_EXPORT PX_UNIX_EXPORT -00279 #define PX_DLL_IMPORT -00280 #endif -00281 -00291 #if PX_WINDOWS_FAMILY && !PX_ARM_FAMILY -00292 #ifndef PX_FOUNDATION_DLL -00293 #define PX_FOUNDATION_API PX_DLL_IMPORT -00294 #elif PX_FOUNDATION_DLL -00295 #define PX_FOUNDATION_API PX_DLL_EXPORT -00296 #endif -00297 #elif PX_UNIX_FAMILY -00298 #ifdef PX_FOUNDATION_DLL -00299 #define PX_FOUNDATION_API PX_UNIX_EXPORT -00300 #endif -00301 #endif -00302 -00303 #ifndef PX_FOUNDATION_API -00304 #define PX_FOUNDATION_API -00305 #endif -00306 -00310 #ifndef PX_CALL_CONV -00311 #if PX_MICROSOFT_FAMILY -00312 #define PX_CALL_CONV __cdecl -00313 #else -00314 #define PX_CALL_CONV -00315 #endif -00316 #endif -00317 -00321 #if PX_VC -00322 #define PX_PUSH_PACK_DEFAULT __pragma(pack(push, 8)) -00323 #define PX_POP_PACK __pragma(pack(pop)) -00324 #elif PX_GCC_FAMILY -00325 #define PX_PUSH_PACK_DEFAULT _Pragma("pack(push, 8)") -00326 #define PX_POP_PACK _Pragma("pack(pop)") -00327 #else -00328 #define PX_PUSH_PACK_DEFAULT -00329 #define PX_POP_PACK -00330 #endif -00331 -00335 #define PX_INLINE inline -00336 #if PX_MICROSOFT_FAMILY -00337 #pragma inline_depth(255) -00338 #endif -00339 -00343 #if PX_VC -00344 #define PX_FORCE_INLINE __forceinline -00345 #elif PX_LINUX // Workaround; Fedora Core 3 do not agree with force inline and PxcPool -00346 #define PX_FORCE_INLINE inline -00347 #elif PX_GCC_FAMILY -00348 #define PX_FORCE_INLINE inline __attribute__((always_inline)) -00349 #else -00350 #define PX_FORCE_INLINE inline -00351 #endif -00352 -00356 #if PX_MICROSOFT_FAMILY -00357 #define PX_NOINLINE __declspec(noinline) -00358 #elif PX_GCC_FAMILY -00359 #define PX_NOINLINE __attribute__((noinline)) -00360 #else -00361 #define PX_NOINLINE -00362 #endif -00363 -00367 #if defined(__CUDACC__) -00368 #define PX_RESTRICT __restrict__ -00369 #else -00370 #define PX_RESTRICT __restrict -00371 #endif -00372 -00376 #if PX_MICROSOFT_FAMILY -00377 #define PX_NOALIAS __declspec(noalias) -00378 #else -00379 #define PX_NOALIAS -00380 #endif -00381 -00393 #ifndef PX_ALIGN -00394 #if PX_MICROSOFT_FAMILY -00395 #define PX_ALIGN(alignment, decl) __declspec(align(alignment)) decl -00396 #define PX_ALIGN_PREFIX(alignment) __declspec(align(alignment)) -00397 #define PX_ALIGN_SUFFIX(alignment) -00398 #elif PX_GCC_FAMILY -00399 #define PX_ALIGN(alignment, decl) decl __attribute__((aligned(alignment))) -00400 #define PX_ALIGN_PREFIX(alignment) -00401 #define PX_ALIGN_SUFFIX(alignment) __attribute__((aligned(alignment))) -00402 #elif defined __CUDACC__ -00403 #define PX_ALIGN(alignment, decl) __align__(alignment) decl -00404 #define PX_ALIGN_PREFIX(alignment) -00405 #define PX_ALIGN_SUFFIX(alignment) __align__(alignment)) -00406 #else -00407 #define PX_ALIGN(alignment, decl) -00408 #define PX_ALIGN_PREFIX(alignment) -00409 #define PX_ALIGN_SUFFIX(alignment) -00410 #endif -00411 #endif -00412 -00423 #define PX_DEPRECATED -00424 -00429 // static assert -00430 #if(defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (PX_PS4) || (PX_APPLE_FAMILY) || (PX_SWITCH) || (PX_CLANG && PX_ARM) -00431 #define PX_COMPILE_TIME_ASSERT(exp) typedef char PxCompileTimeAssert_Dummy[(exp) ? 1 : -1] __attribute__((unused)) -00432 #else -00433 #define PX_COMPILE_TIME_ASSERT(exp) typedef char PxCompileTimeAssert_Dummy[(exp) ? 1 : -1] -00434 #endif -00435 -00436 #if PX_GCC_FAMILY -00437 #define PX_OFFSET_OF(X, Y) __builtin_offsetof(X, Y) +00274 #if PX_UNIX_FAMILY&& __GNUC__ >= 4 +00275 #define PX_UNIX_EXPORT __attribute__((visibility("default"))) +00276 #else +00277 #define PX_UNIX_EXPORT +00278 #endif +00279 +00280 #if PX_WINDOWS_FAMILY +00281 #define PX_DLL_EXPORT __declspec(dllexport) +00282 #define PX_DLL_IMPORT __declspec(dllimport) +00283 #else +00284 #define PX_DLL_EXPORT PX_UNIX_EXPORT +00285 #define PX_DLL_IMPORT +00286 #endif +00287 +00297 #if PX_WINDOWS_FAMILY && !PX_ARM_FAMILY +00298 #ifndef PX_FOUNDATION_DLL +00299 #define PX_FOUNDATION_API PX_DLL_IMPORT +00300 #elif PX_FOUNDATION_DLL +00301 #define PX_FOUNDATION_API PX_DLL_EXPORT +00302 #endif +00303 #elif PX_UNIX_FAMILY +00304 #ifdef PX_FOUNDATION_DLL +00305 #define PX_FOUNDATION_API PX_UNIX_EXPORT +00306 #endif +00307 #endif +00308 +00309 #ifndef PX_FOUNDATION_API +00310 #define PX_FOUNDATION_API +00311 #endif +00312 +00316 #ifndef PX_CALL_CONV +00317 #if PX_MICROSOFT_FAMILY +00318 #define PX_CALL_CONV __cdecl +00319 #else +00320 #define PX_CALL_CONV +00321 #endif +00322 #endif +00323 +00327 #if PX_VC +00328 #define PX_PUSH_PACK_DEFAULT __pragma(pack(push, 8)) +00329 #define PX_POP_PACK __pragma(pack(pop)) +00330 #elif PX_GCC_FAMILY +00331 #define PX_PUSH_PACK_DEFAULT _Pragma("pack(push, 8)") +00332 #define PX_POP_PACK _Pragma("pack(pop)") +00333 #else +00334 #define PX_PUSH_PACK_DEFAULT +00335 #define PX_POP_PACK +00336 #endif +00337 +00341 #define PX_INLINE inline +00342 #if PX_MICROSOFT_FAMILY +00343 #pragma inline_depth(255) +00344 #endif +00345 +00349 #if PX_VC +00350 #define PX_FORCE_INLINE __forceinline +00351 #elif PX_LINUX // Workaround; Fedora Core 3 do not agree with force inline and PxcPool +00352 #define PX_FORCE_INLINE inline +00353 #elif PX_GCC_FAMILY +00354 #define PX_FORCE_INLINE inline __attribute__((always_inline)) +00355 #else +00356 #define PX_FORCE_INLINE inline +00357 #endif +00358 +00362 #if PX_MICROSOFT_FAMILY +00363 #define PX_NOINLINE __declspec(noinline) +00364 #elif PX_GCC_FAMILY +00365 #define PX_NOINLINE __attribute__((noinline)) +00366 #else +00367 #define PX_NOINLINE +00368 #endif +00369 +00373 #if defined(__CUDACC__) +00374 #define PX_RESTRICT __restrict__ +00375 #else +00376 #define PX_RESTRICT __restrict +00377 #endif +00378 +00382 #if PX_MICROSOFT_FAMILY +00383 #define PX_NOALIAS __declspec(noalias) +00384 #else +00385 #define PX_NOALIAS +00386 #endif +00387 +00399 #ifndef PX_ALIGN +00400 #if PX_MICROSOFT_FAMILY +00401 #define PX_ALIGN(alignment, decl) __declspec(align(alignment)) decl +00402 #define PX_ALIGN_PREFIX(alignment) __declspec(align(alignment)) +00403 #define PX_ALIGN_SUFFIX(alignment) +00404 #elif PX_GCC_FAMILY +00405 #define PX_ALIGN(alignment, decl) decl __attribute__((aligned(alignment))) +00406 #define PX_ALIGN_PREFIX(alignment) +00407 #define PX_ALIGN_SUFFIX(alignment) __attribute__((aligned(alignment))) +00408 #elif defined __CUDACC__ +00409 #define PX_ALIGN(alignment, decl) __align__(alignment) decl +00410 #define PX_ALIGN_PREFIX(alignment) +00411 #define PX_ALIGN_SUFFIX(alignment) __align__(alignment)) +00412 #else +00413 #define PX_ALIGN(alignment, decl) +00414 #define PX_ALIGN_PREFIX(alignment) +00415 #define PX_ALIGN_SUFFIX(alignment) +00416 #endif +00417 #endif +00418 +00429 #define PX_DEPRECATED +00430 +00435 // static assert +00436 #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (PX_PS4) || (PX_APPLE_FAMILY) || (PX_SWITCH) || (PX_CLANG && PX_ARM) +00437 #define PX_COMPILE_TIME_ASSERT(exp) typedef char PX_CONCAT(PxCompileTimeAssert_Dummy, __COUNTER__)[(exp) ? 1 : -1] __attribute__((unused)) 00438 #else -00439 #define PX_OFFSET_OF(X, Y) offsetof(X, Y) +00439 #define PX_COMPILE_TIME_ASSERT(exp) typedef char PxCompileTimeAssert_Dummy[(exp) ? 1 : -1] 00440 #endif 00441 -00442 #define PX_OFFSETOF_BASE 0x100 // casting the null ptr takes a special-case code path, which we don't want -00443 #define PX_OFFSET_OF_RT(Class, Member) \ -00444 (reinterpret_cast<size_t>(&reinterpret_cast<Class*>(PX_OFFSETOF_BASE)->Member) - size_t(PX_OFFSETOF_BASE)) -00445 -00446 // check that exactly one of NDEBUG and _DEBUG is defined -00447 #if !defined(NDEBUG) ^ defined(_DEBUG) -00448 #error Exactly one of NDEBUG and _DEBUG needs to be defined! -00449 #endif -00450 -00451 // make sure PX_CHECKED is defined in all _DEBUG configurations as well -00452 #if !PX_CHECKED && PX_DEBUG -00453 #error PX_CHECKED must be defined when PX_DEBUG is defined -00454 #endif -00455 -00456 #ifdef __CUDACC__ -00457 #define PX_CUDA_CALLABLE __host__ __device__ -00458 #else -00459 #define PX_CUDA_CALLABLE +00442 #if PX_GCC_FAMILY +00443 #define PX_OFFSET_OF(X, Y) __builtin_offsetof(X, Y) +00444 #else +00445 #define PX_OFFSET_OF(X, Y) offsetof(X, Y) +00446 #endif +00447 +00448 #define PX_OFFSETOF_BASE 0x100 // casting the null ptr takes a special-case code path, which we don't want +00449 #define PX_OFFSET_OF_RT(Class, Member) \ +00450 (reinterpret_cast<size_t>(&reinterpret_cast<Class*>(PX_OFFSETOF_BASE)->Member) - size_t(PX_OFFSETOF_BASE)) +00451 +00452 // check that exactly one of NDEBUG and _DEBUG is defined +00453 #if !defined(NDEBUG) ^ defined(_DEBUG) +00454 #error Exactly one of NDEBUG and _DEBUG needs to be defined! +00455 #endif +00456 +00457 // make sure PX_CHECKED is defined in all _DEBUG configurations as well +00458 #if !PX_CHECKED && PX_DEBUG +00459 #error PX_CHECKED must be defined when PX_DEBUG is defined 00460 #endif 00461 -00462 // avoid unreferenced parameter warning -00463 // preferred solution: omit the parameter's name from the declaration -00464 template <class T> -00465 PX_CUDA_CALLABLE PX_INLINE void PX_UNUSED(T const&) -00466 { -00467 } -00468 -00469 // Ensure that the application hasn't tweaked the pack value to less than 8, which would break -00470 // matching between the API headers and the binaries -00471 // This assert works on win32/win64, but may need further specialization on other platforms. -00472 // Some GCC compilers need the compiler flag -malign-double to be set. -00473 // Apparently the apple-clang-llvm compiler doesn't support malign-double. -00474 #if PX_PS4 || PX_APPLE_FAMILY || (PX_CLANG && !PX_ARM) -00475 struct PxPackValidation -00476 { -00477 char _; -00478 long a; -00479 }; -00480 #elif PX_ANDROID || (PX_CLANG && PX_ARM) +00462 #ifdef __CUDACC__ +00463 #define PX_CUDA_CALLABLE __host__ __device__ +00464 #else +00465 #define PX_CUDA_CALLABLE +00466 #endif +00467 +00468 // avoid unreferenced parameter warning +00469 // preferred solution: omit the parameter's name from the declaration +00470 template <class T> +00471 PX_CUDA_CALLABLE PX_INLINE void PX_UNUSED(T const&) +00472 { +00473 } +00474 +00475 // Ensure that the application hasn't tweaked the pack value to less than 8, which would break +00476 // matching between the API headers and the binaries +00477 // This assert works on win32/win64, but may need further specialization on other platforms. +00478 // Some GCC compilers need the compiler flag -malign-double to be set. +00479 // Apparently the apple-clang-llvm compiler doesn't support malign-double. +00480 #if PX_PS4 || PX_APPLE_FAMILY || (PX_CLANG && !PX_ARM) 00481 struct PxPackValidation 00482 { 00483 char _; -00484 double a; +00484 long a; 00485 }; -00486 #else -00487 struct PxPackValidation +00486 #elif PX_ANDROID || (PX_CLANG && PX_ARM) +00487 struct PxPackValidation 00488 { -00489 char _; -00490 long long a; +00489 char _; +00490 double a; 00491 }; -00492 #endif -00493 // clang (as of version 3.9) cannot align doubles on 8 byte boundary when compiling for Intel 32 bit target -00494 #if !PX_APPLE_FAMILY && !PX_EMSCRIPTEN && !(PX_CLANG && PX_X86) -00495 PX_COMPILE_TIME_ASSERT(PX_OFFSET_OF(PxPackValidation, a) == 8); -00496 #endif -00497 -00498 // use in a cpp file to suppress LNK4221 -00499 #if PX_VC -00500 #define PX_DUMMY_SYMBOL \ -00501 namespace \ -00502 { \ -00503 char PxDummySymbol; \ -00504 } -00505 #else -00506 #define PX_DUMMY_SYMBOL -00507 #endif -00508 -00509 #if PX_GCC_FAMILY -00510 #define PX_WEAK_SYMBOL __attribute__((weak)) // this is to support SIMD constant merging in template specialization +00492 #else +00493 struct PxPackValidation +00494 { +00495 char _; +00496 long long a; +00497 }; +00498 #endif +00499 // clang (as of version 3.9) cannot align doubles on 8 byte boundary when compiling for Intel 32 bit target +00500 #if !PX_APPLE_FAMILY && !PX_EMSCRIPTEN && !(PX_CLANG && PX_X86) +00501 PX_COMPILE_TIME_ASSERT(PX_OFFSET_OF(PxPackValidation, a) == 8); +00502 #endif +00503 +00504 // use in a cpp file to suppress LNK4221 +00505 #if PX_VC +00506 #define PX_DUMMY_SYMBOL \ +00507 namespace \ +00508 { \ +00509 char PxDummySymbol; \ +00510 } 00511 #else -00512 #define PX_WEAK_SYMBOL +00512 #define PX_DUMMY_SYMBOL 00513 #endif 00514 -00515 // Macro for avoiding default assignment and copy, because doing this by inheritance can increase class size on some -00516 // platforms. -00517 #define PX_NOCOPY(Class) \ -00518 \ -00519 protected: \ -00520 Class(const Class&); \ -00521 Class& operator=(const Class&); -00522 -00523 #define PX_STRINGIZE_HELPER(X) #X -00524 #define PX_STRINGIZE(X) PX_STRINGIZE_HELPER(X) -00525 -00526 #define PX_CONCAT_HELPER(X, Y) X##Y -00527 #define PX_CONCAT(X, Y) PX_CONCAT_HELPER(X, Y) +00515 #if PX_GCC_FAMILY +00516 #define PX_WEAK_SYMBOL __attribute__((weak)) // this is to support SIMD constant merging in template specialization +00517 #else +00518 #define PX_WEAK_SYMBOL +00519 #endif +00520 +00521 // Macro for avoiding default assignment and copy, because doing this by inheritance can increase class size on some +00522 // platforms. +00523 #define PX_NOCOPY(Class) \ +00524 \ +00525 protected: \ +00526 Class(const Class&); \ +00527 Class& operator=(const Class&); 00528 00529 #ifndef DISABLE_CUDA_PHYSX 00530 //CUDA is currently supported only on windows @@ -480,6 +480,6 @@

-Copyright © 2008-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com +Copyright © 2008-2018 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. www.nvidia.com -- cgit v1.2.3