vector_types.h
Go to the documentation of this file.
1 /***************************************************************************/
32 /***************************************************************************/
38 #ifndef _MMC_VECTOR_H
39 #define _MMC_VECTOR_H
40 
41 #ifndef __VECTOR_TYPES_H__
42 
43 
44 #ifdef _MSC_VER
45  #define PRE_ALIGN(x) __declspec(align(x))
46  #define POST_ALIGN(x)
47 #else
48  #define PRE_ALIGN(x)
49  #define POST_ALIGN(x) __attribute__ ((aligned(x)))
50 #endif
51 
59 typedef struct PRE_ALIGN(16) MMC_float4 {
60  float x, y, z, w;
61 } float4 POST_ALIGN(16);
62 
70 #if defined(MMC_USE_SSE) || defined(USE_OPENCL)
71 typedef struct MMC_float4 float3;
72 #else
73 typedef struct MMC_float3 {
74  float x, y, z;
75 } float3;
76 #endif
77 
83 typedef struct MMC_int2 {
84  int x, y;
85 } int2;
86 
92 typedef struct MMC_int3 {
93  int x, y, z;
94 } int3;
95 
100 typedef struct PRE_ALIGN(16) MMC_int4 {
101  int x, y, z, w;
102 } int4 POST_ALIGN(16);
103 
108 typedef struct MMC_uint3 {
109  unsigned int x, y, z;
110 } uint3;
111 
116 typedef struct PRE_ALIGN(16) MMC_uint4 {
117  unsigned int x, y, z, w;
118 } uint4 POST_ALIGN(16);
119 
125 typedef struct MMC_uint2 {
126  unsigned int x, y;
127 } uint2;
128 
129 
130 typedef unsigned int uint;
131 typedef unsigned char uchar;
132 
133 #endif
134 
135 #endif
integer pair {ix,iy}
Definition: vector_types.h:83
integer triplet {ix,iy,iz}
Definition: vector_types.h:92
floating-point quadraplet {x,y,z,w}
unsigned integer triplet {ix,iy,iz}
Definition: vector_types.h:108
floating-point triplet {x,y,z}
Definition: vector_types.h:73
unsigned integer pair {ix,iy}
Definition: vector_types.h:125