libflame  revision_anchor
FLA_Apply_G_2x2.h
Go to the documentation of this file.
1 /*
2 
3  Copyright (C) 2014, The University of Texas at Austin
4 
5  This file is part of libflame and is available under the 3-Clause
6  BSD license, which can be found in the LICENSE file at the top-level
7  directory, or at http://opensource.org/licenses/BSD-3-Clause
8 
9 */
10 
11 #define MAC_Apply_G_2x2_ops( gamma, sigma, delta1, beta, epsilon1, delta2 ) \
12 { \
13  float g, s; \
14  float d1, e1, d2; \
15 \
16  g = *(gamma); \
17  s = *(sigma); \
18 \
19  d1 = *(delta1); \
20  e1 = *(epsilon1); \
21  d2 = *(delta2); \
22 \
23  *(delta1) = g * d1 + s * e1; \
24  *(epsilon1) = -s * d1 + g * e1; \
25 \
26  *(beta) = s * d2; \
27  *(delta2) = g * d2; \
28 }
29 
30 #define MAC_Apply_G_2x2_opd( gamma, sigma, delta1, beta, epsilon1, delta2 ) \
31 { \
32  double g, s; \
33  double d1, e1, d2; \
34 \
35  g = *(gamma); \
36  s = *(sigma); \
37 \
38  d1 = *(delta1); \
39  e1 = *(epsilon1); \
40  d2 = *(delta2); \
41 \
42  *(delta1) = g * d1 + s * e1; \
43  *(epsilon1) = -s * d1 + g * e1; \
44 \
45  *(beta) = s * d2; \
46  *(delta2) = g * d2; \
47 }
48