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

SCM Repository

[diderot] View of /branches/vis12-cl/src/compiler/cl-target/fragments/cl-types.in
ViewVC logotype

View of /branches/vis12-cl/src/compiler/cl-target/fragments/cl-types.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2716 - (download) (annotate)
Mon Sep 22 15:58:45 2014 UTC (7 years, 1 month ago) by jhr
File size: 2422 byte(s)
 Working on OpenCL
#if defined(DIDEROT_INT)
typedef int Diderot_int_t;
#else
typedef long Diderot_int_t;
#endif

#if defined(DIDEROT_SINGLE_PRECISION)
typedef float Diderot_real_t;
typedef float2 Diderot_vec2_t;
typedef float3 Diderot_vec3_t;
typedef float4 Diderot_vec4_t;
#define VEC2(a,b)               (float2)((a), (b))
#define VEC3(a,b,c)             (float3)_V3((a), (b), (c))
#define VEC4(a,b,c,d)           (float4)((a), (b), (c), (d))
#define VEC8(a,b,c,d,e,f,g,h)   (float8)((a), (b), (c), (d), (e), (f), (g), (h))
#define EPSILON                 1.0E-12
#else
# error double precision not yet supported
#endif

typedef Diderot_vec2_t Diderot_Mat2x2_t[2];     // represented as row vectors
typedef Diderot_vec3_t Diderot_Mat3x3_t[3];     // represented as row vectors
typedef Diderot_vec4_t Diderot_Mat4x4_t[4];     // represented as row vectors

// Image types.  Note that these should have the same organization as
// the Shadow_image[123]D_t types.
//
typedef struct {                       
    uint                size[1];
    Diderot_real_t      s;              // scaling from world-space to image-space
    Diderot_real_t      t;              // translation from world-space to image-space
    void		*data;		// pointer to image data
} Diderot_image1D_t;

typedef struct {                     
    uint                size[2];        // sizes (fast to slow)
    Diderot_Mat2x2_t    w2i;            // affine tranform from world space to index space.  This is the
                                        // inverse of the index to world-space transform that is loaded from
                                        // the Nrrd file.
    Diderot_vec2_t      tVec;           // translation part of world to index transform
    Diderot_Mat2x2_t    w2iT;           // transpose w3i
    void		*data;		// pointer to image data
} Diderot_image2D_t;

typedef struct {                     
    uint                size[3];        // sizes (fast to slow)
    Diderot_Mat3x3_t    w2i;            // affine tranform from world space to index space.  This is the
                                        // inverse of the index to world-space transform that is loaded from
                                        // the Nrrd file.
    Diderot_vec3_t      tVec;           // translation part of world to index transform
    Diderot_Mat3x3_t    w2iT;           // transpose w3i
    void		*data;		// pointer to image data
} Diderot_image3D_t;

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