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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 710 - (download) (as text) (annotate)
Wed Mar 30 16:56:13 2011 UTC (10 years, 6 months ago) by jhr
File size: 654 byte(s)
  Split up diderot header file into multiple files.
/*! \file inline-vec4.h
 * \author John Reppy
 * \brief inline functions for 4D vectors

 * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
 * All rights reserved.


#include "Diderot/types.h"

STATIC_INLINE vec4f_t vec4f (float a, float b, float c, float d)
    return __extension__ (vec4f_t){ a, b, c, d };

STATIC_INLINE float dot4f (vec4f_t u, vec4f_t v)
    union4f_t uv = __extension__ (union4f_t)(u*v);
    return uv.r[0] + uv.r[1] + uv.r[2] + uv.r[3];

#endif /* !_DIDEROT_INLINE_VEC4_H_ */

ViewVC Help
Powered by ViewVC 1.0.0