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

SCM Repository

[diderot] Diff of /trunk/src/include/Diderot/types.h
ViewVC logotype

Diff of /trunk/src/include/Diderot/types.h

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

revision 1232, Mon May 16 23:37:52 2011 UTC revision 1640, Wed Nov 16 02:19:51 2011 UTC
# Line 45  Line 45 
45  typedef int32_t vec4i_t __attribute__ ((vector_size (16)));  typedef int32_t vec4i_t __attribute__ ((vector_size (16)));
46  typedef int32_t vec8i_t __attribute__ ((vector_size (32)));  typedef int32_t vec8i_t __attribute__ ((vector_size (32)));
47    
48  typedef float vec2d_t __attribute__ ((vector_size (16)));  typedef double vec2d_t __attribute__ ((vector_size (16)));
49  typedef float vec4d_t __attribute__ ((vector_size (32)));  typedef double vec4d_t __attribute__ ((vector_size (32)));
50  typedef float vec8d_t __attribute__ ((vector_size (64)));  typedef double vec8d_t __attribute__ ((vector_size (64)));
51    
52  typedef int64_t vec2l_t __attribute__ ((vector_size (16)));  typedef int64_t vec2l_t __attribute__ ((vector_size (16)));
53  typedef int64_t vec4l_t __attribute__ ((vector_size (32)));  typedef int64_t vec4l_t __attribute__ ((vector_size (32)));
# Line 81  Line 81 
81    
82  /* typedefs for Diderot types */  /* typedefs for Diderot types */
83  #if defined(DIDEROT_SINGLE_PRECISION)  #if defined(DIDEROT_SINGLE_PRECISION)
 typedef int32_t Diderot_int_t;  
84  typedef float Diderot_real_t;  typedef float Diderot_real_t;
85  typedef vec2f_t Diderot_vec2_t;  typedef vec2f_t Diderot_vec2_t;
86  typedef vec3f_t Diderot_vec3_t;  typedef vec3f_t Diderot_vec3_t;
# Line 92  Line 91 
91  typedef union2f_t Diderot_Mat2x2_t[2];  // represented as row vectors  typedef union2f_t Diderot_Mat2x2_t[2];  // represented as row vectors
92  typedef union3f_t Diderot_Mat3x3_t[3];  // represented as row vectors  typedef union3f_t Diderot_Mat3x3_t[3];  // represented as row vectors
93  typedef union4f_t Diderot_Mat4x4_t[4];  // represented as row vectors  typedef union4f_t Diderot_Mat4x4_t[4];  // represented as row vectors
94  #else  #elif defined(DIDEROT_DOUBLE_PRECISION)
 typedef int64_t Diderot_int_t;  
95  typedef double Diderot_real_t;  typedef double Diderot_real_t;
96  typedef vec2d_t Diderot_vec2_t;  typedef vec2d_t Diderot_vec2_t;
97  typedef vec3d_t Diderot_vec3_t;  typedef vec3d_t Diderot_vec3_t;
# Line 104  Line 102 
102  typedef union2d_t Diderot_Mat2x2_t[2];  // represented as row vectors  typedef union2d_t Diderot_Mat2x2_t[2];  // represented as row vectors
103  typedef union3d_t Diderot_Mat3x3_t[3];  // represented as row vectors  typedef union3d_t Diderot_Mat3x3_t[3];  // represented as row vectors
104  typedef union4d_t Diderot_Mat4x4_t[4];  // represented as row vectors  typedef union4d_t Diderot_Mat4x4_t[4];  // represented as row vectors
105    #else
106    #  error floating-point precision unknown
107    #endif
108    #if defined(DIDEROT_INT)
109    typedef int32_t Diderot_int_t;
110    typedef vec2i_t Diderot_ivec2_t;
111    typedef vec3i_t Diderot_ivec3_t;
112    typedef vec4i_t Diderot_ivec4_t;
113    typedef union2i_t Diderot_iunion2_t;
114    typedef union3i_t Diderot_iunion3_t;
115    typedef union4i_t Diderot_iunion4_t;
116    #elif defined(DIDEROT_LONGINT)
117    typedef int64_t Diderot_int_t;
118    typedef vec2l_t Diderot_ivec2_t;
119    typedef vec3l_t Diderot_ivec3_t;
120    typedef vec4l_t Diderot_ivec4_t;
121    typedef union2l_t Diderot_iunion2_t;
122    typedef union3l_t Diderot_iunion3_t;
123    typedef union4l_t Diderot_iunion4_t;
124    #else
125    #  error integer precision unknown
126  #endif  #endif
127  typedef const char *Diderot_string_t;  typedef const char *Diderot_string_t;
128    
129  typedef struct {                        // wrapper for 1D image data  typedef struct {                        // wrapper for 1D image data
130      uint32_t            dim;            // dimension (== 1)      uint32_t            dim;            //!< dimension (== 1)
131      uint32_t            size[1];      uint32_t            size[1];
132        size_t              dataSzb;        //!< size of data in bytes
133      void                *data;      void                *data;
134      Diderot_real_t      s;              // scaling from world-space to image-space      Diderot_real_t      s;              //!< scaling from world-space to image-space
135      Diderot_real_t      t;              // translation from world-space to image-space      Diderot_real_t      t;              //!< translation from world-space to image-space
136  } Diderot_image1D_t;  } Diderot_image1D_t;
137    
138  typedef struct {                        // wrapper for 2D image data  typedef struct {                        // wrapper for 2D image data
139      uint32_t            dim;            // dimension (== 2)      uint32_t            dim;            //!< dimension (== 2)
140      uint32_t            size[2];        // sizes (fast to slow)      uint32_t            size[2];        //!< sizes (fast to slow)
141        size_t              dataSzb;        //!< size of data in bytes
142      void                *data;      void                *data;
143      Diderot_Mat2x2_t    w2i;            // affine tranform from world space to index space.  This is the      Diderot_Mat2x2_t    w2i;            //!< affine tranform from world space to index space.  This is the
144                                          // inverse of the index to world-space transform that is loaded from                                          //!  inverse of the index to world-space transform that is loaded from
145                                          // the Nrrd file.                                          //!  the Nrrd file.
146      Diderot_vec2_t      tVec;           // translation part of world to index transform      Diderot_vec2_t      tVec;           //!< translation part of world to index transform
147      Diderot_Mat2x2_t    w2iT;           // transpose w3i      Diderot_Mat2x2_t    w2iT;           //!< transpose w3i
148  } Diderot_image2D_t;  } Diderot_image2D_t;
149    
150  typedef struct {                        // wrapper for 3D image data  typedef struct {                        // wrapper for 3D image data
151      uint32_t            dim;            // dimension (== 3)      uint32_t            dim;            //!< dimension (== 3)
152      uint32_t            size[3];        // sizes (fast to slow)      uint32_t            size[3];        //!< sizes (fast to slow)
153        size_t              dataSzb;        //!< size of data in bytes
154      void                *data;      void                *data;
155      Diderot_Mat3x3_t    w2i;            // affine tranform from world space to index space.  This is the      Diderot_Mat3x3_t    w2i;            //!< affine tranform from world space to index space.  This is the
156                                          // inverse of the index to world-space transform that is loaded from                                          //!  inverse of the index to world-space transform that is loaded from
157                                          // the Nrrd file.                                          //!  the Nrrd file.
158      Diderot_vec3_t      tVec;           // translation part of world to index transform      Diderot_vec3_t      tVec;           //!< translation part of world to index transform
159      Diderot_Mat3x3_t    w2iT;           // transpose w3i      Diderot_Mat3x3_t    w2iT;           //!< transpose w3i
160  } Diderot_image3D_t;  } Diderot_image3D_t;
161    
162  #endif /* !_DIDEROT_TYPES_H_ */  #endif /* !_DIDEROT_TYPES_H_ */

Legend:
Removed from v.1232  
changed lines
  Added in v.1640

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