summaryrefslogtreecommitdiff
path: root/thirdparty/bullet/LinearMath/btScalar.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/bullet/LinearMath/btScalar.h')
-rw-r--r--thirdparty/bullet/LinearMath/btScalar.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/thirdparty/bullet/LinearMath/btScalar.h b/thirdparty/bullet/LinearMath/btScalar.h
index ba49d6700b..86d94e8974 100644
--- a/thirdparty/bullet/LinearMath/btScalar.h
+++ b/thirdparty/bullet/LinearMath/btScalar.h
@@ -25,13 +25,23 @@ subject to the following restrictions:
#include <float.h>
/* SVN $Revision$ on $Date$ from http://bullet.googlecode.com*/
-#define BT_BULLET_VERSION 288
+#define BT_BULLET_VERSION 289
inline int btGetVersion()
{
return BT_BULLET_VERSION;
}
+inline int btIsDoublePrecision()
+{
+ #ifdef BT_USE_DOUBLE_PRECISION
+ return true;
+ #else
+ return false;
+ #endif
+}
+
+
// The following macro "BT_NOT_EMPTY_FILE" can be put into a file
// in order suppress the MS Visual C++ Linker warning 4221
//
@@ -63,7 +73,12 @@ inline int btGetVersion()
#endif
#ifdef _WIN32
- #if defined(__MINGW32__) || defined(__CYGWIN__) || (defined (_MSC_VER) && _MSC_VER < 1300)
+ #if defined(__GNUC__) // it should handle both MINGW and CYGWIN
+ #define SIMD_FORCE_INLINE __inline__ __attribute__((always_inline))
+ #define ATTRIBUTE_ALIGNED16(a) a __attribute__((aligned(16)))
+ #define ATTRIBUTE_ALIGNED64(a) a __attribute__((aligned(64)))
+ #define ATTRIBUTE_ALIGNED128(a) a __attribute__((aligned(128)))
+ #elif ( defined(_MSC_VER) && _MSC_VER < 1300 )
#define SIMD_FORCE_INLINE inline
#define ATTRIBUTE_ALIGNED16(a) a
#define ATTRIBUTE_ALIGNED64(a) a
@@ -95,11 +110,16 @@ inline int btGetVersion()
#if defined (_M_ARM)
//Do not turn SSE on for ARM (may want to turn on BT_USE_NEON however)
#elif (defined (_WIN32) && (_MSC_VER) && _MSC_VER >= 1400) && (!defined (BT_USE_DOUBLE_PRECISION))
+
+#ifdef __clang__
+#define __BT_DISABLE_SSE__
+#endif
+#ifndef __BT_DISABLE_SSE__
#if _MSC_VER>1400
#define BT_USE_SIMD_VECTOR3
#endif
-
#define BT_USE_SSE
+#endif//__BT_DISABLE_SSE__
#ifdef BT_USE_SSE
#if (_MSC_FULL_VER >= 170050727)//Visual Studio 2012 can compile SSE4/FMA3 (but SSE4/FMA3 is not enabled by default)