[dali_2.3.21] Merge branch 'devel/master'
[platform/core/uifw/dali-toolkit.git] / dali-physics / third-party / bullet3 / src / Bullet3Common / shared / b3PlatformDefinitions.h
1 #ifndef B3_PLATFORM_DEFINITIONS_H
2 #define B3_PLATFORM_DEFINITIONS_H
3
4 struct MyTest
5 {
6         int bla;
7 };
8
9 #ifdef __cplusplus
10 //#define b3ConstArray(a) const b3AlignedObjectArray<a>&
11 #define b3ConstArray(a) const a *
12 #define b3AtomicInc(a) ((*a)++)
13
14 inline int b3AtomicAdd(volatile int *p, int val)
15 {
16         int oldValue = *p;
17         int newValue = oldValue + val;
18         *p = newValue;
19         return oldValue;
20 }
21
22 #define __global
23
24 #define B3_STATIC static
25 #else
26 //keep B3_LARGE_FLOAT*B3_LARGE_FLOAT < FLT_MAX
27 #define B3_LARGE_FLOAT 1e18f
28 #define B3_INFINITY 1e18f
29 #define b3Assert(a)
30 #define b3ConstArray(a) __global const a *
31 #define b3AtomicInc atomic_inc
32 #define b3AtomicAdd atomic_add
33 #define b3Fabs fabs
34 #define b3Sqrt native_sqrt
35 #define b3Sin native_sin
36 #define b3Cos native_cos
37
38 #define B3_STATIC
39 #endif
40
41 #endif