Teuchos_BLAS_wrappers.hpp

Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //                    Teuchos: Common Tools Package
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 // Kris
00030 // 07.08.03 -- Move into Teuchos package/namespace
00031 
00032 #ifndef _TEUCHOS_BLAS_WRAPPERS_HPP_
00033 #define _TEUCHOS_BLAS_WRAPPERS_HPP_
00034 
00035 #include "Teuchos_ConfigDefs.hpp"
00036 
00041 /* Define fcd (Fortran Teuchos_fcd descriptor) for non-standard situations */
00042 
00043 #if defined(CRAY_T3X) || defined(INTEL_CXML) || defined(INTEL_MKL)
00044 
00045 
00046 #if defined(CRAY_T3X)
00047 
00048 #include <fortran.h>
00049 #define PREFIX
00050 #define Teuchos_fcd fcd 
00051 
00052 #define DROTG_F77   F77_FUNC(srotg,SROTG)
00053 #define DROT_F77    F77_FUNC(srot,SROT)
00054 #define DASUM_F77   F77_FUNC(sasum,SASUM) 
00055 #define DAXPY_F77   F77_FUNC(saxpy,SAXPY)
00056 #define DCOPY_F77   F77_FUNC(scopy,SCOPY)
00057 #define DDOT_F77    F77_FUNC(sdot,SDOT)
00058 #define DNRM2_F77   F77_FUNC(snrm2,SNRM2)
00059 #define DSCAL_F77   F77_FUNC(sscal,SSCAL)
00060 #define IDAMAX_F77  F77_FUNC(isamax,ISAMAX)
00061 #define DGEMV_F77   F77_FUNC(sgemv,SGEMV)
00062 #define DGER_F77    F77_FUNC(sger,SGER)
00063 #define DTRMV_F77   F77_FUNC(strmv,STRMV)
00064 #define DGEMM_F77   F77_FUNC(sgemm,SGEMM)
00065 #define DSYMM_F77   F77_FUNC(ssymm,SSYMM)
00066 #define DTRMM_F77   F77_FUNC(strmm,STRMM)
00067 #define DTRSM_F77   F77_FUNC(strsm,STRSM)
00068  
00069 #ifdef HAVE_TEUCHOS_COMPLEX
00070 
00071 #define ZROTG_F77   F77_FUNC(crotg,CROTG)
00072 #define ZROT_F77    F77_FUNC(crot,CROT)
00073 #define ZASUM_F77   F77_FUNC(scasum,SCASUM) 
00074 #define ZAXPY_F77   F77_FUNC(caxpy,CAXPY)
00075 #define ZCOPY_F77   F77_FUNC(ccopy,CCOPY)
00076 #define ZDOT_F77    F77_FUNC(cdotc,CDOTC)
00077 #define ZNRM2_F77   F77_FUNC(scnrm2,SCNRM2)
00078 #define ZSCAL_F77   F77_FUNC(cscal,CSCAL)
00079 #define IZAMAX_F77  F77_FUNC(icamax,ICAMAX)
00080 #define ZGEMV_F77   F77_FUNC(cgemv,CGEMV)
00081 #define ZGER_F77    F77_FUNC(cgerc,CGERC)
00082 #define ZTRMV_F77   F77_FUNC(ctrmv,CTRMV)
00083 #define ZGEMM_F77   F77_FUNC(cgemm,CGEMM)
00084 #define ZSYMM_F77   F77_FUNC(csymm,CSYMM)
00085 #define ZTRMM_F77   F77_FUNC(ctrmm,CTRMM)
00086 #define ZTRSM_F77   F77_FUNC(ctrsm,CTRSM)
00087 
00088 #endif /* HAVE_TEUCHOS_COMPLEX */
00089 
00090 #elif defined(INTEL_CXML)
00091 
00092 #define PREFIX __stdcall 
00093 #define Teuchos_fcd const char *, unsigned int 
00094 
00095 #define DROTG_F77   F77_FUNC(drotg,DROTG)
00096 #define DROT_F77    F77_FUNC(drot,DROT)
00097 #define DASUM_F77   F77_FUNC(dasum,DASUM)
00098 #define DAXPY_F77   F77_FUNC(daxpy,DAXPY)
00099 #define DCOPY_F77   F77_FUNC(dcopy,DCOPY)
00100 #define DDOT_F77    F77_FUNC(ddot,DDOT)  
00101 #define DNRM2_F77   F77_FUNC(dnrm2,DNRM2)
00102 #define DSCAL_F77   F77_FUNC(dscal,DSCAL)
00103 #define IDAMAX_F77  F77_FUNC(idamax,IDAMAX)
00104 #define DGEMV_F77   F77_FUNC(dgemv,DGEMV)
00105 #define DGER_F77    F77_FUNC(dger,DGER)
00106 #define DTRMV_F77   F77_FUNC(dtrmv,DTRMV)
00107 #define DGEMM_F77   F77_FUNC(dgemm,DGEMM)
00108 #define DSYMM_F77   F77_FUNC(dsymm,DSYMM)
00109 #define DTRMM_F77   F77_FUNC(dtrmm,DTRMM)
00110 #define DTRSM_F77   F77_FUNC(dtrsm,DTRSM)
00111 
00112 #ifdef HAVE_TEUCHOS_COMPLEX
00113 
00114 #define ZROTG_F77   F77_FUNC(zrotg,ZROTG)
00115 #define ZROT_F77    F77_FUNC(zrot,ZROT)
00116 #define ZASUM_F77   F77_FUNC(dzasum,DZASUM)
00117 #define ZAXPY_F77   F77_FUNC(zaxpy,ZAXPY)
00118 #define ZCOPY_F77   F77_FUNC(zcopy,ZCOPY)
00119 #define ZDOT_F77    F77_FUNC(zdotc,ZDOTC)  
00120 #define ZNRM2_F77   F77_FUNC(dznrm2,DZNRM2)
00121 #define ZSCAL_F77   F77_FUNC(zscal,ZSCAL)
00122 #define IZAMAX_F77  F77_FUNC(izamax,IZAMAX)
00123 #define ZGEMV_F77   F77_FUNC(zgemv,ZGEMV)
00124 #define ZGER_F77    F77_FUNC(zgerc,ZGERC)
00125 #define ZTRMV_F77   F77_FUNC(ztrmv,ZTRMV)
00126 #define ZGEMM_F77   F77_FUNC(zgemm,ZGEMM)
00127 #define ZSYMM_F77   F77_FUNC(zsymm,ZSYMM)
00128 #define ZTRMM_F77   F77_FUNC(ztrmm,ZTRMM)
00129 #define ZTRSM_F77   F77_FUNC(ztrsm,ZTRSM)
00130 
00131 #endif /* HAVE_TEUCHOS_COMPLEX */
00132 
00133 #elif defined(INTEL_MKL)
00134 
00135 #define PREFIX
00136 #define Teuchos_fcd const char *
00137 
00138 #define DROTG_F77   F77_FUNC(drotg,DROTG)
00139 #define DROT_F77    F77_FUNC(drot,DROT)
00140 #define DASUM_F77   F77_FUNC(dasum,DASUM)
00141 #define DAXPY_F77   F77_FUNC(daxpy,DAXPY)
00142 #define DCOPY_F77   F77_FUNC(dcopy,DCOPY)
00143 #define DDOT_F77    F77_FUNC(ddot,DDOT)  
00144 #define DNRM2_F77   F77_FUNC(dnrm2,DNRM2)
00145 #define DSCAL_F77   F77_FUNC(dscal,DSCAL)
00146 #define IDAMAX_F77  F77_FUNC(idamax,IDAMAX)
00147 #define DGEMV_F77   F77_FUNC(dgemv,DGEMV)
00148 #define DGER_F77    F77_FUNC(dger,DGER)
00149 #define DTRMV_F77   F77_FUNC(dtrmv,DTRMV)
00150 #define DGEMM_F77   F77_FUNC(dgemm,DGEMM)
00151 #define DSYMM_F77   F77_FUNC(dsymm,DSYMM)
00152 #define DTRMM_F77   F77_FUNC(dtrmm,DTRMM)
00153 #define DTRSM_F77   F77_FUNC(dtrsm,DTRSM)
00154 
00155 #ifdef HAVE_TEUCHOS_COMPLEX
00156 
00157 #define ZROTG_F77   F77_FUNC(zrotg,ZROTG)
00158 #define ZROT_F77    F77_FUNC(zrot,ZROT)
00159 #define ZASUM_F77   F77_FUNC(dzasum,DZASUM)
00160 #define ZAXPY_F77   F77_FUNC(zaxpy,ZAXPY)
00161 #define ZCOPY_F77   F77_FUNC(zcopy,ZCOPY)
00162 #define ZDOT_F77    F77_FUNC(zdotc,ZDOTC)  
00163 #define ZNRM2_F77   F77_FUNC(dznrm2,DZNRM2)
00164 #define ZSCAL_F77   F77_FUNC(zscal,ZSCAL)
00165 #define IZAMAX_F77  F77_FUNC(izamax,IZAMAX)
00166 #define ZGEMV_F77   F77_FUNC(zgemv,ZGEMV)
00167 #define ZGER_F77    F77_FUNC(zgerc,ZGERC)
00168 #define ZTRMV_F77   F77_FUNC(ztrmv,ZTRMV)
00169 #define ZGEMM_F77   F77_FUNC(zgemm,ZGEMM)
00170 #define ZSYMM_F77   F77_FUNC(zsymm,ZSYMM)
00171 #define ZTRMM_F77   F77_FUNC(ztrmm,ZTRMM)
00172 #define ZTRSM_F77   F77_FUNC(ztrsm,ZTRSM)
00173 
00174 #endif /* HAVE_TEUCHOS_COMPLEX */
00175 
00176 #endif 
00177 
00178 /* All three of these machines use a simple uppercase mangling of Fortran names */
00179 
00180 /* if F77_FUNC is defined undefine it because we want to redefine */
00181 
00182 #ifdef F77_FUNC
00183 #undef F77_FUNC
00184 #endif
00185 
00186 
00187 #define F77_FUNC(lcase,UCASE) PREFIX UCASE
00188 
00189 #else /* Define Teuchos_fcd for all other machines */
00190 
00191 #define PREFIX
00192 #define Teuchos_fcd const char * 
00193 
00194 /* In the future use autoconf's definition of F77_FUNC */ 
00195 
00196 #ifndef HAVE_CONFIG_H
00197 
00198 #ifdef F77_FUNC
00199 #undef F77_FUNC
00200 #endif
00201 
00202 #ifdef TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE
00203 #define F77_FUNC(lcase,UCASE) lcase
00204 #else /* TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE not defined*/
00205 #define F77_FUNC(lcase,UCASE) lcase ## _
00206 #endif /* TRILINOS_HAVE_NO_FORTRAN_UNDERSCORE */
00207 
00208 #endif /* HAVE_CONFIG_H */
00209 
00210 #define DROTG_F77   F77_FUNC(drotg,DROTG)
00211 #define DROT_F77    F77_FUNC(drot,DROT)
00212 #define DASUM_F77   F77_FUNC(dasum,DASUM)
00213 #define DAXPY_F77   F77_FUNC(daxpy,DAXPY)
00214 #define DCOPY_F77   F77_FUNC(dcopy,DCOPY)
00215 #define DDOT_F77    F77_FUNC(ddot,DDOT)
00216 #define DNRM2_F77   F77_FUNC(dnrm2,DNRM2)
00217 #define DSCAL_F77   F77_FUNC(dscal,DSCAL)
00218 #define IDAMAX_F77  F77_FUNC(idamax,IDAMAX)
00219 #define DGEMV_F77   F77_FUNC(dgemv,DGEMV)
00220 #define DGER_F77    F77_FUNC(dger,DGER)
00221 #define DTRMV_F77   F77_FUNC(dtrmv,DTRMV)
00222 #define DGEMM_F77   F77_FUNC(dgemm,DGEMM) 
00223 #define DSYMM_F77   F77_FUNC(dsymm,DSYMM)
00224 #define DTRMM_F77   F77_FUNC(dtrmm,DTRMM)
00225 #define DTRSM_F77   F77_FUNC(dtrsm,DTRSM)
00226 
00227 #ifdef HAVE_TEUCHOS_COMPLEX
00228 
00229 #define ZROTG_F77   F77_FUNC(zrotg,ZROTG)
00230 #define ZROT_F77    F77_FUNC(zrot,ZROT)
00231 #define ZASUM_F77   F77_FUNC(dzasum,DZASUM)
00232 #define ZAXPY_F77   F77_FUNC(zaxpy,ZAXPY)
00233 #define ZCOPY_F77   F77_FUNC(zcopy,ZCOPY)
00234 #define ZDOT_F77    F77_FUNC(zdotc,ZDOTC)  
00235 #define ZNRM2_F77   F77_FUNC(dznrm2,DZNRM2)
00236 #define ZSCAL_F77   F77_FUNC(zscal,ZSCAL)
00237 #define IZAMAX_F77  F77_FUNC(izamax,IZAMAX)
00238 #define ZGEMV_F77   F77_FUNC(zgemv,ZGEMV)
00239 #define ZGER_F77    F77_FUNC(zgerc,ZGERC)
00240 #define ZTRMV_F77   F77_FUNC(ztrmv,ZTRMV)
00241 #define ZGEMM_F77   F77_FUNC(zgemm,ZGEMM)
00242 #define ZSYMM_F77   F77_FUNC(zsymm,ZSYMM)
00243 #define ZTRMM_F77   F77_FUNC(ztrmm,ZTRMM)
00244 #define ZTRSM_F77   F77_FUNC(ztrsm,ZTRSM)
00245 
00246 #endif /* HAVE_TEUCHOS_COMPLEX */
00247 
00248 #endif
00249 
00250 
00251 /* Explicitly define each F77 name for all BLAS kernels */
00252 
00253 #define SROTG_F77   F77_FUNC(srotg,SROTG)
00254 #define SROT_F77    F77_FUNC(srot,SROT)
00255 #define SSCAL_F77   F77_FUNC(sscal,SSCAL) 
00256 #define SCOPY_F77   F77_FUNC(scopy,SCOPY)
00257 #define SAXPY_F77   F77_FUNC(saxpy,SAXPY)
00258 #define SDOT_F77    F77_FUNC(sdot,SDOT)
00259 #define SNRM2_F77   F77_FUNC(snrm2,SNRM2)
00260 #define SASUM_F77   F77_FUNC(sasum,SASUM)
00261 #define ISAMAX_F77  F77_FUNC(isamax,ISAMAX)
00262 
00263 #define SGEMV_F77   F77_FUNC(sgemv,SGEMV)
00264 #define SGER_F77    F77_FUNC(sger,SGER)
00265 #define STRMV_F77   F77_FUNC(strmv,STRMV)
00266 #define SGEMM_F77   F77_FUNC(sgemm,SGEMM)
00267 #define SSYMM_F77   F77_FUNC(ssymm,SSYMM)
00268 #define STRMM_F77   F77_FUNC(strmm,STRMM)
00269 #define STRSM_F77   F77_FUNC(strsm,STRSM)
00270 
00271 #ifdef HAVE_TEUCHOS_COMPLEX
00272 
00273 #define CROTG_F77   F77_FUNC(crotg,CROTG)
00274 #define CROT_F77    F77_FUNC(crot,CROT)
00275 #define CASUM_F77   F77_FUNC(scasum,SCASUM) 
00276 #define CAXPY_F77   F77_FUNC(caxpy,CAXPY)
00277 #define CCOPY_F77   F77_FUNC(ccopy,CCOPY)
00278 #define CDOT_F77    F77_FUNC(cdotc,CDOTC)
00279 #define CNRM2_F77   F77_FUNC(scnrm2,SCNRM2)
00280 #define CSCAL_F77   F77_FUNC(cscal,CSCAL)
00281 #define ICAMAX_F77  F77_FUNC(icamax,ICAMAX)
00282 #define CGEMV_F77   F77_FUNC(cgemv,CGEMV)
00283 #define CGER_F77    F77_FUNC(cgerc,CGERC)
00284 #define CTRMV_F77   F77_FUNC(ctrmv,CTRMV)
00285 #define CGEMM_F77   F77_FUNC(cgemm,CGEMM)
00286 #define CSYMM_F77   F77_FUNC(csymm,CSYMM)
00287 #define CTRMM_F77   F77_FUNC(ctrmm,CTRMM)
00288 #define CTRSM_F77   F77_FUNC(ctrsm,CTRSM)
00289 
00290 #endif /* HAVE_TEUCHOS_COMPLEX */
00291 
00292 #ifdef __cplusplus
00293 extern "C" {
00294 #endif
00295 
00296 
00297 /* Double precision BLAS 1 */
00298 void PREFIX DROTG_F77(double* da, double* db, double* c, double* s);
00299 void PREFIX DROT_F77(const int* n, double* dx, const int* incx, double* dy, const int* incy, double* c, double* s);
00300 double PREFIX DASUM_F77(const int* n, const double x[], const int* incx);
00301 void PREFIX DAXPY_F77(const int* n, const double* alpha, const double x[], const int* incx, double y[], const int* incy);
00302 void PREFIX DCOPY_F77(const int* n, const double *x, const int* incx, double *y, const int* incy);
00303 double PREFIX DDOT_F77(const int* n, const double x[], const int* incx, const double y[], const int* incy);
00304 double PREFIX DNRM2_F77(const int* n, const double x[], const int* incx); 
00305 void PREFIX DSCAL_F77(const int* n, const double* alpha, double *x, const int* incx);
00306 int PREFIX IDAMAX_F77(const int* n, const double *x, const int* incx);
00307 
00308 /* Double std::complex precision BLAS 1 */
00309 #ifdef HAVE_TEUCHOS_COMPLEX
00310 
00311 void PREFIX ZROTG_F77(std::complex<double>* da, std::complex<double>* db, double* c, std::complex<double>* s);
00312 void PREFIX ZROT_F77(const int* n, std::complex<double>* dx, const int* incx, std::complex<double>* dy, const int* incy, double* c, std::complex<double>* s);
00313 double PREFIX ZASUM_F77(const int* n, const std::complex<double> x[], const int* incx);
00314 void PREFIX ZAXPY_F77(const int* n, const std::complex<double>* alpha, const std::complex<double> x[], const int* incx, std::complex<double> y[], const int* incy);
00315 void PREFIX ZCOPY_F77(const int* n, const std::complex<double> *x, const int* incx, std::complex<double> *y, const int* incy);
00316 std::complex<double> PREFIX ZDOT_F77(const int* n, const std::complex<double> x[], const int* incx, const std::complex<double> y[], const int* incy);
00317 double PREFIX ZNRM2_F77(const int* n, const std::complex<double> x[], const int* incx); 
00318 void PREFIX ZSCAL_F77(const int* n, const std::complex<double>* alpha, std::complex<double> *x, const int* incx);
00319 int PREFIX IZAMAX_F77(const int* n, const std::complex<double> *x, const int* incx);
00320 
00321 #endif // HAVE_TEUCHOS_COMPLEX
00322 
00323 #ifdef HAVE_TEUCHOS_BLASFLOAT
00324 
00325 /* Single precision BLAS 1 */ 
00326 void PREFIX SROTG_F77(float* da, float* db, float* c, float* s);
00327 void PREFIX SROT_F77(const int* n, float* dx, const int* incx, float* dy, const int* incy, float* c, float* s);
00328 float PREFIX SASUM_F77(const int* n, const float x[], const int* incx);
00329 void PREFIX SAXPY_F77(const int* n, const float* alpha, const float x[], const int* incx, float y[], const int* incy);
00330 void PREFIX SCOPY_F77(const int* n, const float *x, const int* incx, float *y, const int* incy);
00331 float PREFIX SDOT_F77(const int* n, const float x[], const int* incx, const float y[], const int* incy);
00332 float PREFIX SNRM2_F77(const int* n, const float x[], const int* incx); 
00333 void PREFIX SSCAL_F77(const int* n, const float* alpha, float *x, const int* incx);
00334 int PREFIX ISAMAX_F77(const int* n, const float *x, const int* incx);
00335 
00336 #endif // HAVE_TEUCHOS_BLASFLOAT
00337 
00338 /* Single std::complex precision BLAS 1 */ 
00339 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_BLASFLOAT)
00340 
00341 void PREFIX CROTG_F77(std::complex<float>* da, std::complex<float>* db, float* c, std::complex<float>* s);
00342 void PREFIX CROT_F77(const int* n, std::complex<float>* dx, const int* incx, std::complex<float>* dy, const int* incy, float* c, std::complex<float>* s);
00343 float PREFIX CASUM_F77(const int* n, const std::complex<float> x[], const int* incx);
00344 void PREFIX CAXPY_F77(const int* n, const std::complex<float>* alpha, const std::complex<float> x[], const int* incx, std::complex<float> y[], const int* incy);
00345 void PREFIX CCOPY_F77(const int* n, const std::complex<float> *x, const int* incx, std::complex<float> *y, const int* incy);
00346 std::complex<float> PREFIX CDOT_F77(const int* n, const std::complex<float> x[], const int* incx, const std::complex<float> y[], const int* incy);
00347 float PREFIX CNRM2_F77(const int* n, const std::complex<float> x[], const int* incx); 
00348 void PREFIX CSCAL_F77(const int* n, const std::complex<float>* alpha, std::complex<float> *x, const int* incx);
00349 int PREFIX ICAMAX_F77(const int* n, const std::complex<float> *x, const int* incx);
00350 
00351 #endif //  defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_BLASFLOAT)
00352 
00353 /* Double precision BLAS 2 */
00354 void PREFIX DGEMV_F77(Teuchos_fcd, const int* m, const int* n, const double* alpha, const double A[], const int* lda,
00355                  const double x[], const int* incx, const double* beta, double y[], const int* incy);
00356 void PREFIX DTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 
00357                 const double *a, const int *lda, double *x, const int *incx); 
00358 void PREFIX DGER_F77(const int *m, const int *n, const double *alpha, const double *x, const int *incx, const double *y,
00359                const int *incy, double *a, const int *lda);
00360 
00361 /* Double precision BLAS 2 */
00362 #ifdef HAVE_TEUCHOS_COMPLEX
00363 
00364 void PREFIX ZGEMV_F77(Teuchos_fcd, const int* m, const int* n, const std::complex<double>* alpha, const std::complex<double> A[], const int* lda,
00365                  const std::complex<double> x[], const int* incx, const std::complex<double>* beta, std::complex<double> y[], const int* incy);
00366 void PREFIX ZTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n, 
00367                 const std::complex<double> *a, const int *lda, std::complex<double> *x, const int *incx); 
00368 void PREFIX ZGER_F77(const int *m, const int *n, const std::complex<double> *alpha, const std::complex<double> *x, const int *incx, const std::complex<double> *y,
00369                const int *incy, std::complex<double> *a, const int *lda);
00370 
00371 #endif /* HAVE_TEUCHOS_COMPLEX */
00372 
00373 #ifdef HAVE_TEUCHOS_BLASFLOAT
00374 
00375 /* Single precision BLAS 2 */
00376 void PREFIX SGEMV_F77(Teuchos_fcd, const int* m, const int* n, const float* alpha, const float A[], const int* lda,
00377                  const float x[], const int* incx, const float* beta, float y[], const int* incy);
00378 void PREFIX STRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n,
00379                 const float *a, const int *lda, float *x, const int *incx); 
00380 void PREFIX SGER_F77(const int *m, const int *n, const float *alpha, const float *x, const int *incx, const float *y,
00381                const int *incy, float *a, const int *lda);
00382 
00383 #endif // HAVE_TEUCHOS_BLASFLOAT
00384 
00385 /* Single std::complex precision BLAS 2 */
00386 #if defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_BLASFLOAT)
00387 
00388 void PREFIX CGEMV_F77(Teuchos_fcd, const int* m, const int* n, const std::complex<float>* alpha, const std::complex<float> A[], const int* lda,
00389                  const std::complex<float> x[], const int* incx, const std::complex<float>* beta, std::complex<float> y[], const int* incy);
00390 void PREFIX CTRMV_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, const int *n,
00391                 const std::complex<float> *a, const int *lda, std::complex<float> *x, const int *incx); 
00392 void PREFIX CGER_F77(const int *m, const int *n, const std::complex<float> *alpha, const std::complex<float> *x, const int *incx, const std::complex<float> *y,
00393                const int *incy, std::complex<float> *a, const int *lda);
00394 
00395 #endif // defined(HAVE_TEUCHOS_COMPLEX) && defined(HAVE_TEUCHOS_BLASFLOAT)
00396 
00397 /* Double precision BLAS 3 */
00398 void PREFIX DGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 
00399                 n, const int *k, const double *alpha, const double *a, const int *lda, 
00400                 const double *b, const int *ldb, const double *beta, double *c, const int *ldc);
00401 void PREFIX DSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n,
00402                 const double *alpha, const double *a, const int *lda, 
00403                 const double *b, const int *ldb, const double *beta, double *c, const int *ldc);
00404 void PREFIX DTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd,  
00405                 const int *m, const int *n, const double *alpha, const double *a, const int * lda, double *b, const int *ldb);
00406 void PREFIX DTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 
00407                 const int *m, const int *n, const double *alpha, const double *a, const int *
00408                 lda, double *b, const int *ldb);
00409 
00410 /* Double std::complex precision BLAS 3 */
00411 #ifdef HAVE_TEUCHOS_COMPLEX
00412 
00413 void PREFIX ZGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * 
00414                 n, const int *k, const std::complex<double> *alpha, const std::complex<double> *a, const int *lda, 
00415                 const std::complex<double> *b, const int *ldb, const std::complex<double> *beta, std::complex<double> *c, const int *ldc);
00416 void PREFIX ZSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n,
00417                 const std::complex<double> *alpha, const std::complex<double> *a, const int *lda, 
00418                 const std::complex<double> *b, const int *ldb, const std::complex<double> *beta, std::complex<double> *c, const int *ldc);
00419 void PREFIX ZTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd,  
00420                 const int *m, const int *n, const std::complex<double> *alpha, const std::complex<double> *a, const int * lda, std::complex<double> *b, const int *ldb);
00421 void PREFIX ZTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 
00422                 const int *m, const int *n, const std::complex<double> *alpha, const std::complex<double> *a, const int *
00423                 lda, std::complex<double> *b, const int *ldb);
00424 
00425 #endif /* HAVE_TEUCHOS_COMPLEX */
00426 
00427 #ifdef HAVE_TEUCHOS_BLASFLOAT
00428 
00429 /* Single precision BLAS 3 */
00430 void PREFIX SGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int *
00431                 n, const int *k, const float *alpha, const float *a, const int *lda, 
00432                 const float *b, const int *ldb, const float *beta, float *c, const int *ldc);
00433 void PREFIX SSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n,
00434                 const float *alpha, const float *a, const int *lda, 
00435                 const float *b, const int *ldb, const float *beta, float *c, const int *ldc);
00436 void PREFIX STRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 
00437                 const int *m, const int *n, const float *alpha, const float *a, const int * lda, float *b, const int *ldb);
00438 void PREFIX STRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd,
00439                 const int *m, const int *n, const float *alpha, const float *a, const int *
00440                 lda, float *b, const int *ldb);
00441 
00442 #endif // HAVE_TEUCHOS_BLASFLOAT
00443 
00444 /* Single std::complex precision BLAS 3 */
00445 
00446 #ifdef HAVE_TEUCHOS_COMPLEX
00447 
00448 void PREFIX CGEMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int *
00449                 n, const int *k, const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 
00450                 const std::complex<float> *b, const int *ldb, const std::complex<float> *beta, std::complex<float> *c, const int *ldc);
00451 void PREFIX CSYMM_F77(Teuchos_fcd, Teuchos_fcd, const int *m, const int * n,
00452                 const std::complex<float> *alpha, const std::complex<float> *a, const int *lda, 
00453                 const std::complex<float> *b, const int *ldb, const std::complex<float> *beta, std::complex<float> *c, const int *ldc);
00454 void PREFIX CTRMM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, 
00455                 const int *m, const int *n, const std::complex<float> *alpha, const std::complex<float> *a, const int * lda, std::complex<float> *b, const int *ldb);
00456 void PREFIX CTRSM_F77(Teuchos_fcd, Teuchos_fcd, Teuchos_fcd, Teuchos_fcd,
00457                 const int *m, const int *n, const std::complex<float> *alpha, const std::complex<float> *a, const int *
00458                 lda, std::complex<float> *b, const int *ldb);
00459 
00460 #endif /* HAVE_TEUCHOS_COMPLEX */
00461 
00462 #ifdef __cplusplus
00463 }
00464 #endif
00465 
00466 #endif // end of TEUCHOS_BLAS_WRAPPERS_HPP_

Generated on Tue Oct 20 12:45:25 2009 for Teuchos - Trilinos Tools Package by doxygen 1.4.7