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

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

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

revision 1354, Tue Jun 21 01:01:36 2011 UTC revision 1355, Tue Jun 21 01:15:27 2011 UTC
# Line 70  Line 70 
70      Shadow_Mat3x3_t     w2iT;           //!< transpose w3i      Shadow_Mat3x3_t     w2iT;           //!< transpose w3i
71  } Shadow_image3D_t;  } Shadow_image3D_t;
72    
73    /*! \brief initialize a shadow 2D vector from a host vector.
74     *  \param dst the shadow value to initialize (an array)
75     *  \param src the host vector to shadow.
76     *
77     * Note that the correctness of this function depends on the fact that
78     * the Shadow_vec2_t type is an array.
79     */
80    STATIC_INLINE void ShadowVec2 (Shadow_vec2_t dst, Diderot_vec2_t src)
81    {
82        dst[0] = ((Diderot_union2_t)(src)).r[0];
83        dst[1] = ((Diderot_union2_t)(src)).r[1];
84    }
85    
86    /*! \brief initialize a shadow 3D vector from a host vector.
87     *  \param dst the shadow value to initialize (an array)
88     *  \param src the host vector to shadow.
89     *
90     * Note that the correctness of this function depends on the fact that
91     * the Shadow_vec3_t type is an array.
92     */
93    STATIC_INLINE void ShadowVec3 (Shadow_vec3_t dst, Diderot_vec3_t src)
94    {
95        dst[0] = ((Diderot_union3_t)(src)).r[0];
96        dst[1] = ((Diderot_union3_t)(src)).r[1];
97        dst[2] = ((Diderot_union3_t)(src)).r[2];
98    }
99    
100    /*! \brief initialize a shadow 4D vector from a host vector.
101     *  \param dst the shadow value to initialize (an array)
102     *  \param src the host vector to shadow.
103     *
104     * Note that the correctness of this function depends on the fact that
105     * the Shadow_vec4_t type is an array.
106     */
107    STATIC_INLINE void ShadowVec4 (Shadow_vec4_t dst, Diderot_vec4_t src)
108    {
109        dst[0] = ((Diderot_union4_t)(src)).r[0];
110        dst[1] = ((Diderot_union4_t)(src)).r[1];
111        dst[2] = ((Diderot_union4_t)(src)).r[2];
112        dst[3] = ((Diderot_union4_t)(src)).r[3];
113    }
114    
115    /*! \brief initialize a shadow 2x2 matrix from a host matrix.
116     *  \param dst the shadow value to initialize (an array of arrays)
117     *  \param src the host matrix to shadow.
118     */
119    STATIC_INLINE void ShadowMat2x2 (Shadow_Mat2x2_t dst, Diderot_Mat2x2_t src)
120    {
121        ShadowVec2 (dst[0], src[0].v);
122        ShadowVec2 (dst[1], src[1].v);
123    }
124    
125    /*! \brief initialize a shadow 3x3 matrix from a host matrix.
126     *  \param dst the shadow value to initialize (an array of arrays)
127     *  \param src the host matrix to shadow.
128     */
129    STATIC_INLINE void ShadowMat3x3 (Shadow_Mat3x3_t dst, Diderot_Mat3x3_t src)
130    {
131        ShadowVec3 (dst[0], src[0].v);
132        ShadowVec3 (dst[1], src[1].v);
133        ShadowVec3 (dst[2], src[2].v);
134    }
135    
136    /*! \brief initialize a shadow 4x4 matrix from a host matrix.
137     *  \param dst the shadow value to initialize (an array of arrays)
138     *  \param src the host matrix to shadow.
139     */
140    STATIC_INLINE void ShadowMat4x4 (Shadow_Mat4x4_t dst, Diderot_Mat4x4_t src)
141    {
142        ShadowVec4 (dst[0], src[0].v);
143        ShadowVec4 (dst[1], src[1].v);
144        ShadowVec4 (dst[2], src[2].v);
145        ShadowVec4 (dst[3], src[3].v);
146    }
147    
148  /*! \brief initialize a shadow for a 1D image  /*! \brief initialize a shadow for a 1D image
149   *  \param cxt the OpenCL context used to allocate the shadow buffer   *  \param cxt the OpenCL context used to allocate the shadow buffer
150   *  \param dst the pointer to the shadow image   *  \param dst the pointer to the shadow image

Legend:
Removed from v.1354  
changed lines
  Added in v.1355

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