le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
simd.h
Go to the documentation of this file.
1 
33 #ifndef LE_SIMD_H
34 #define LE_SIMD_H
35 
36 /*****************************************************************************/
37 #ifndef LE_USE_SIMD
38  #error LE_USE_SIMD undefined.
39  #error Use LE_USE_SIMD in (config.h) to enable or disable SIMD acceleration for calculations.
40 #endif // LE_USE_SIMD
41 
42 #if LE_USE_SIMD == 1
43 
44 /*****************************************************************************/
46 #if LE_USE_SSE2 == 1
47  #include "xmmintrin.h"
48  #include "emmintrin.h"
49 #endif // LE_USE_SSE2
50 
51 #if LE_USE_AMMX == 1
52  #include "ammx/ammx.h"
53 #endif // LE_USE_AMMX
54 
55 /*****************************************************************************/
57 #ifdef __GNUC_
58 
59  typedef float V4SF __attribute__ ((vector_size (16)));
60  typedef union {V4SF v; float f[4];} v4sf;
61 
63  typedef int32_t V4SI __attribute__ ((vector_size (16)));
64  typedef union {V4SI v; int32_t i[4];} v4si;
65 
67  typedef uint32_t V4SU __attribute__ ((vector_size (16)));
68  typedef union {V4SU v; uint32_t u[4];} v4su;
69 
71  typedef int16_t V8SH __attribute__ ((vector_size (16)));
72  typedef union {V8SH v; int16_t i[8];} v8sh;
73 
75  typedef uint16_t V8SW __attribute__ ((vector_size (16)));
76  typedef union {V8SW v; uint16_t u[8];} v8sw;
77 #endif
78 
79 #endif
80 
81 #endif // LE_SIMD_H
struct __attribute__((aligned(16))) LeVertex
Definition: geometry_simd.h:47
LightEngine 3D: Amiga ammx function declaration.