1 //
2 //  vector.h
3 //  BulletTest
4 //
5 //  Copyright (c) 2011 Apple Inc.
6 //
7 
8 #ifndef BulletTest_vector_h
9 #define BulletTest_vector_h
10 
11 #ifdef __SSE__
12 typedef float float4 __attribute__((__vector_size__(16)));
13 #include <xmmintrin.h>
14 #endif
15 
16 #ifdef __SSE2__
17 typedef double double2 __attribute__((__vector_size__(16)));
18 typedef char char16 __attribute__((__vector_size__(16)));
19 typedef unsigned char uchar16 __attribute__((__vector_size__(16)));
20 typedef short short8 __attribute__((__vector_size__(16)));
21 typedef unsigned short ushort8 __attribute__((__vector_size__(16)));
22 typedef int int4 __attribute__((__vector_size__(16)));
23 // typedef unsigned int uint4      __attribute__ ((__vector_size__(16)));
24 #ifdef __LP64__
25 typedef long long2 __attribute__((__vector_size__(16)));
26 typedef unsigned long ulong2 __attribute__((__vector_size__(16)));
27 #else
28 typedef long long long2 __attribute__((__vector_size__(16)));
29 typedef unsigned long long ulong2 __attribute__((__vector_size__(16)));
30 #endif
31 #include <emmintrin.h>
32 #endif
33 
34 #ifdef __SSE3__
35 #include <pmmintrin.h>
36 #endif
37 
38 #ifdef __SSSE3__
39 #include <tmmintrin.h>
40 #endif
41 
42 #ifdef __SSE4_1__
43 #include <smmintrin.h>
44 #endif
45 
46 #ifdef __arm__
47 #include <arm/arch.h>
48 #ifdef _ARM_ARCH_7
49 #define ARM_NEON_GCC_COMPATIBILITY 1
50 #include <arm_neon.h>
51 typedef float float4 __attribute__((__vector_size__(16)));
52 typedef double double2 __attribute__((__vector_size__(16)));
53 typedef char char16 __attribute__((__vector_size__(16)));
54 typedef unsigned char uchar16 __attribute__((__vector_size__(16)));
55 typedef short short8 __attribute__((__vector_size__(16)));
56 typedef unsigned short ushort8 __attribute__((__vector_size__(16)));
57 typedef int int4 __attribute__((__vector_size__(16)));
58 typedef unsigned int uint4 __attribute__((__vector_size__(16)));
59 #ifdef __LP64__
60 typedef long long2 __attribute__((__vector_size__(16)));
61 typedef unsigned long ulong2 __attribute__((__vector_size__(16)));
62 #else
63 typedef long long long2 __attribute__((__vector_size__(16)));
64 typedef unsigned long long ulong2 __attribute__((__vector_size__(16)));
65 #endif
66 #endif
67 #endif
68 
69 #endif
70