libflame  revision_anchor
FLA_Apply_G_2x2.h
Go to the documentation of this file.
00001 /*
00002 
00003     Copyright (C) 2014, The University of Texas at Austin
00004 
00005     This file is part of libflame and is available under the 3-Clause
00006     BSD license, which can be found in the LICENSE file at the top-level
00007     directory, or at http://opensource.org/licenses/BSD-3-Clause
00008 
00009 */
00010 
00011 #define MAC_Apply_G_2x2_ops( gamma, sigma, delta1, beta, epsilon1, delta2 ) \
00012 { \
00013     float g, s; \
00014     float d1, e1, d2; \
00015 \
00016     g = *(gamma); \
00017     s = *(sigma); \
00018 \
00019     d1 = *(delta1); \
00020     e1 = *(epsilon1); \
00021     d2 = *(delta2); \
00022 \
00023     *(delta1)    =  g * d1 + s * e1; \
00024     *(epsilon1)  = -s * d1 + g * e1; \
00025 \
00026     *(beta)      = s * d2; \
00027     *(delta2)    = g * d2; \
00028 }
00029 
00030 #define MAC_Apply_G_2x2_opd( gamma, sigma, delta1, beta, epsilon1, delta2 ) \
00031 { \
00032     double g, s; \
00033     double d1, e1, d2; \
00034 \
00035     g = *(gamma); \
00036     s = *(sigma); \
00037 \
00038     d1 = *(delta1); \
00039     e1 = *(epsilon1); \
00040     d2 = *(delta2); \
00041 \
00042     *(delta1)    =  g * d1 + s * e1; \
00043     *(epsilon1)  = -s * d1 + g * e1; \
00044 \
00045     *(beta)      = s * d2; \
00046     *(delta2)    = g * d2; \
00047 }
00048