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

SCM Repository

[diderot] Annotation of /branches/pure-cfg/src/include/Diderot/inline-vec4.h
ViewVC logotype

Annotation of /branches/pure-cfg/src/include/Diderot/inline-vec4.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 710 - (view) (download) (as text)

1 : jhr 710 /*! \file inline-vec4.h
2 :     *
3 :     * \author John Reppy
4 :     *
5 :     * \brief inline functions for 4D vectors
6 :     */
7 :    
8 :     /*
9 :     * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
10 :     * All rights reserved.
11 :     */
12 :    
13 :     #ifndef _DIDEROT_INLINE_VEC4_H_
14 :     #define _DIDEROT_INLINE_VEC4_H_
15 :    
16 :     #ifndef _DIDEROT_TYPES_H_
17 :     #include "Diderot/types.h"
18 :     #endif
19 :    
20 :     STATIC_INLINE vec4f_t vec4f (float a, float b, float c, float d)
21 :     {
22 :     return __extension__ (vec4f_t){ a, b, c, d };
23 :     }
24 :    
25 :     STATIC_INLINE float dot4f (vec4f_t u, vec4f_t v)
26 :     {
27 :     union4f_t uv = __extension__ (union4f_t)(u*v);
28 :     return uv.r[0] + uv.r[1] + uv.r[2] + uv.r[3];
29 :     }
30 :    
31 :     #endif /* !_DIDEROT_INLINE_VEC4_H_ */

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