template_blas_common.h

Go to the documentation of this file.
00001 /* Ergo, version 3.2, a program for linear scaling electronic structure
00002  * calculations.
00003  * Copyright (C) 2012 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek.
00004  * 
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation, either version 3 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  * 
00018  * Primary academic reference:
00019  * Kohn−Sham Density Functional Theory Electronic Structure Calculations 
00020  * with Linearly Scaling Computational Time and Memory Usage,
00021  * Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek,
00022  * J. Chem. Theory Comput. 7, 340 (2011),
00023  * <http://dx.doi.org/10.1021/ct100611z>
00024  * 
00025  * For further information about Ergo, see <http://www.ergoscf.org>.
00026  */
00027  
00028  /* This file belongs to the template_lapack part of the Ergo source 
00029   * code. The source files in the template_lapack directory are modified
00030   * versions of files originally distributed as CLAPACK, see the
00031   * Copyright/license notice in the file template_lapack/COPYING.
00032   */
00033  
00034 
00035 //#define sqrt HULAhulaHULAsqrt
00036 //#define log  HULAhulaHULAlog
00037 
00038 typedef int integer;
00039 typedef bool logical;
00040 typedef int ftnlen;
00041 typedef char *address;
00042 
00043 #define maxMACRO(a,b) (a >= b ? a : b)
00044 #define minMACRO(a,b) (a <= b ? a : b)
00045 #define absMACRO(x) (x >= 0 ? x : (-x))
00046 
00047 #if 0
00048 // Pawel suggests this variant:
00049 template<typename A>
00050 A maxMACRO(const A& a, const A&b) { return a >= b ? a : b; }
00051 maxMACRO(f(a), b)
00052 #endif
00053 
00054 // include math.h to get sqrt etc
00055 #include <math.h>
00056 
00057 
00058 #include "template_blas_basicmath.h"
00059 
00060 
00061 logical template_blas_lsame(const char *ca, const char *cb);
00062 int template_blas_erbla(const char *srname, integer *info);
00063 void template_blas_s_cat(char *lp, char *rpp[], ftnlen rnp[], ftnlen *np, ftnlen ll);
00064 
00065 #include "template_blas_axpy.h"
00066 #include "template_blas_scal.h"
00067 #include "template_blas_dot.h"
00068 #include "template_blas_spr.h"
00069 #include "template_blas_spr2.h"
00070 #include "template_blas_gemv.h"
00071 #include "template_blas_gemm.h"
00072 #include "template_blas_trmm.h"
00073 #include "template_blas_trsm.h"
00074 #include "template_blas_syrk.h"
00075 #include "template_blas_syr2.h"
00076 #include "template_blas_syr2k.h"
00077 #include "template_blas_symv.h"
00078 #include "template_blas_symm.h"
00079 #include "template_blas_tpsv.h"
00080 #include "template_blas_tpmv.h"
00081 #include "template_blas_spmv.h"
00082 #include "template_blas_trsv.h"
00083 #include "template_blas_trmv.h"
00084 #include "template_blas_swap.h"
00085 #include "template_blas_nrm2.h"
00086 #include "template_blas_copy.h"
00087 #include "template_blas_ger.h"
00088 #include "template_blas_idamax.h"
00089 #include "template_blas_rot.h"
00090 #include "template_blas_asum.h"

Generated on Wed Nov 21 09:32:01 2012 for ergo by  doxygen 1.4.7