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/c-shadow-types.in
ViewVC logotype

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2716 - (download) (annotate)
Mon Sep 22 15:58:45 2014 UTC (7 years, 2 months ago) by jhr
File size: 2144 byte(s)
 Working on OpenCL
#if defined(DIDEROT_INT)
typedef cl_int Shadow_int_t;
#else /* DIDEROT_LONGINT */
typedef cl_long Shadow_int_t;
#endif

#if defined(DIDEROT_SINGLE_PRECISION)
typedef cl_float Shadow_real_t;
typedef cl_float2 Shadow_vec2_t;
typedef cl_float3 Shadow_vec3_t;
typedef cl_float4 Shadow_vec4_t;
#else
typedef cl_double Shadow_real_t;
typedef cl_double2 Shadow_vec2_t;
typedef cl_double3 Shadow_vec3_t;
typedef cl_double4 Shadow_vec4_t;
#endif

typedef Shadow_vec2_t Shadow_Mat2x2_t[2];
typedef Shadow_vec3_t Shadow_Mat3x3_t[3];
typedef Shadow_vec4_t Shadow_Mat4x4_t[4];

// Shadow of GPU-side image types.  Note that these should have the same organization as
// the Diderot_image[123]D_t types defined in cl-types.h

//! shadow wrapper for 1D image meta-info
typedef struct {
    cl_int              size[1];
    Shadow_real_t       s;              //!< scaling from world-space to image-space
    Shadow_real_t       t;              //!< translation from world-space to image-space
} Shadow_image1D_t;

//! shadow wrapper for 2D image meta-info
typedef struct {
    cl_int              size[2];        //!< sizes (fast to slow)
    Shadow_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.
    Shadow_vec2_t       tVec;           //!< translation part of world to index transform
    Shadow_Mat2x2_t     w2iT;           //!< transpose w3i
} Shadow_image2D_t;

//! shadow wrapper for 3D image meta-info
typedef struct {
    cl_int              size[3];        //!< sizes (fast to slow)
    Shadow_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.
    Shadow_vec3_t       tVec;           //!< translation part of world to index transform
    Shadow_Mat3x3_t     w2iT;           //!< transpose w3i
} Shadow_image3D_t;

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