libflame  revision_anchor
FLA_Apply_GT_2x2.h
Go to the documentation of this file.
00001 /*
00002    libflame
00003    An object-based infrastructure for developing high-performance
00004    dense linear algebra libraries.
00005 
00006    Copyright (C) 2011, The University of Texas
00007 
00008    libflame is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU Lesser General Public License as
00010    published by the Free Software Foundation; either version 2.1 of
00011    the License, or (at your option) any later version.
00012 
00013    libflame is distributed in the hope that it will be useful, but
00014    WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with libflame; if you did not receive a copy, see
00020    http://www.gnu.org/licenses/.
00021 
00022    For more information, please contact us at flame@cs.utexas.edu or
00023    send mail to:
00024 
00025    Field G. Van Zee and/or
00026    Robert A. van de Geijn
00027    The University of Texas at Austin
00028    Department of Computer Sciences
00029    1 University Station C0500
00030    Austin TX 78712
00031 */
00032 
00033 #define MAC_Apply_GT_2x2_ops( gamma, sigma, epsilon1, delta2, beta, epsilon2 ) \
00034 { \
00035     float g, s; \
00036     float e1, d2, e2; \
00037 \
00038     g = *(gamma); \
00039     s = *(sigma); \
00040 \
00041     e1 = *(epsilon1); \
00042     d2 = *(delta2); \
00043     e2 = *(epsilon2); \
00044 \
00045     *(epsilon1)  =  g * e1 + s * d2; \
00046     *(delta2)    = -s * e1 + g * d2; \
00047 \
00048     *(beta)      = s * e2; \
00049     *(epsilon2)  = g * e2; \
00050 }
00051 
00052 #define MAC_Apply_GT_2x2_opd( gamma, sigma, epsilon1, delta2, beta, epsilon2 ) \
00053 { \
00054     double g, s; \
00055     double e1, d2, e2; \
00056 \
00057     g = *(gamma); \
00058     s = *(sigma); \
00059 \
00060     e1 = *(epsilon1); \
00061     d2 = *(delta2); \
00062     e2 = *(epsilon2); \
00063 \
00064     *(epsilon1)  =  g * e1 + s * d2; \
00065     *(delta2)    = -s * e1 + g * d2; \
00066 \
00067     *(beta)      = s * e2; \
00068     *(epsilon2)  = g * e2; \
00069 }
00070 
00071 #define MAC_Apply_GT_2x1_ops( gamma, sigma, epsilon1, delta2 ) \
00072 { \
00073     float g, s; \
00074     float e1, d2; \
00075 \
00076     g = *(gamma); \
00077     s = *(sigma); \
00078 \
00079     e1 = *(epsilon1); \
00080     d2 = *(delta2); \
00081 \
00082     *(epsilon1)  =  g * e1 + s * d2; \
00083     *(delta2)    = -s * e1 + g * d2; \
00084 }
00085 
00086 #define MAC_Apply_GT_2x1_opd( gamma, sigma, epsilon1, delta2 ) \
00087 { \
00088     double g, s; \
00089     double e1, d2; \
00090 \
00091     g = *(gamma); \
00092     s = *(sigma); \
00093 \
00094     e1 = *(epsilon1); \
00095     d2 = *(delta2); \
00096 \
00097     *(epsilon1)  =  g * e1 + s * d2; \
00098     *(delta2)    = -s * e1 + g * d2; \
00099 }
00100