Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/pure-cfg/src/include/Diderot/cl-types.h
ViewVC logotype

Diff of /branches/pure-cfg/src/include/Diderot/cl-types.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1283, Mon Jun 6 22:24:53 2011 UTC revision 1284, Tue Jun 7 09:39:24 2011 UTC
# Line 20  Line 20 
20      DIDEROT_STABLE              //!< a stable strand      DIDEROT_STABLE              //!< a stable strand
21  } StrandStatus_t;  } StrandStatus_t;
22    
23    /* we need these union types to support subscripting vectors */
24    typedef union { float r[2]; float2 v; } union2f_t;
25    typedef union { float r[4]; float4 v; } union4f_t;
26    typedef union { float r[8]; float8 v; } union8f_t;
27    typedef union { float r[16]; float16 v; } union16f_t;
28    
29    typedef union { int i[2]; int2 v; } union2i_t;
30    typedef union { int i[4]; int4 v; } union4i_t;
31    typedef union { int i[8]; int8 v; } union8i_t;
32    typedef union { int i[16]; int16 v; } union16i_t;
33    
34    //typedef union { double r[2]; double2 v; } union2d_t;
35    //typedef union { double r[4]; double4 v; } union4d_t;
36    //typedef union { double r[8]; double8 v; } union8d_t;
37    //typedef union { double r[16]; double16 v; } union16d_t;
38    
39    typedef union { long r[2]; long2 v; } union2l_t;
40    typedef union { long r[4]; long4 v; } union4l_t;
41    typedef union { long r[8]; long8 v; } union8l_t;
42    typedef union { long r[16]; long16 v; } union16l_t;
43    
44  /* OpenCL version 1.00 does not support 3-element vectors */  /* OpenCL version 1.00 does not support 3-element vectors */
45  #if __OPENCL_VERSION__ < 110  #if __OPENCL_VERSION__ < 110
46  typedef int4 int3;  typedef int4 int3;
47  typedef float4 float3;  typedef float4 float3;
48    typedef union4f_t union3f_t;
49    typedef union4i_t union3i_t;
50  #define VEC3(a, b, c)   (float3)(a, b, c, 0)  #define VEC3(a, b, c)   (float3)(a, b, c, 0)
51  #else  #else
52    typedef union { float r[3]; float3 v; } union3f_t;
53    typedef union { int i[3]; int3 v; } union3i_t;
54  #define VEC3(a, b, c)   (float3)(a, b, c)  #define VEC3(a, b, c)   (float3)(a, b, c)
55  #endif  #endif
56    

Legend:
Removed from v.1283  
changed lines
  Added in v.1284

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0