Teuchos Package Browser (Single Doxygen Collection) Version of the Day
Teuchos_BLAS.cpp
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 #include "Teuchos_BLAS.hpp"
00030 #include "Teuchos_BLAS_wrappers.hpp"
00031 
00032 #ifdef TEUCHOS_BLAS_APPLE_VECLIB_ERROR
00033 #include <vecLib/cblas.h>
00034 #endif
00035 
00036 const char Teuchos::ESideChar[] = {'L' , 'R' };
00037 const char Teuchos::ETranspChar[] = {'N' , 'T' , 'C' };
00038 const char Teuchos::EUploChar[] = {'U' , 'L' };
00039 const char Teuchos::EDiagChar[] = {'U' , 'N' };
00040 //const char Teuchos::EFactChar[] = {'F', 'N' };
00041 //const char Teuchos::ENormChar[] = {'O', 'I' };
00042 //const char Teuchos::ECompQChar[] = {'N', 'I', 'V' };
00043 //const char Teuchos::EJobChar[] = {'E', 'V', 'B' };
00044 //const char Teuchos::EJobSChar[] = {'E', 'S' };
00045 //const char Teuchos::EJobVSChar[] = {'V', 'N' };
00046 //const char Teuchos::EHowmnyChar[] = {'A', 'S' };
00047 //const char Teuchos::ECMachChar[] = {'E', 'S', 'B', 'P', 'N', 'R', 'M', 'U', 'L', 'O' };
00048 //const char Teuchos::ESortChar[] = {'N', 'S'};
00049 
00050 
00051 namespace {
00052 
00053 
00054 template<typename Scalar>
00055 Scalar generic_dot(const int n, const Scalar* x, const int incx,
00056   const Scalar* y, const int incy)
00057 {
00058   typedef Teuchos::ScalarTraits<Scalar> ST;
00059   Scalar dot = 0.0;
00060   if (incx==1 && incy==1) {
00061     for (int i = 0; i < n; ++i)
00062       dot += (*x++)*ST::conjugate(*y++);
00063   }
00064   else {
00065     if (incx < 0)
00066       x = x - incx*(n-1);
00067     if (incy < 0)
00068       y = y - incy*(n-1);
00069     for (int i = 0; i < n; ++i, x+=incx, y+=incy)
00070       dot += (*x)*ST::conjugate(*y);
00071   }
00072   return dot;
00073 }  
00074 
00075 
00076 } // namespace
00077 
00078 
00079 namespace Teuchos {
00080 
00081   // *************************** BLAS<int,float> DEFINITIONS ******************************  
00082 
00083   void BLAS<int, float>::ROTG(float* da, float* db, float* c, float* s) const
00084   { SROTG_F77(da, db, c, s ); }
00085 
00086   void BLAS<int, float>::ROT(const int n, float* dx, const int incx, float* dy, const int incy, float* c, float* s) const
00087   { SROT_F77(&n, dx, &incx, dy, &incy, c, s); }
00088 
00089   
00090   float BLAS<int, float>::ASUM(const int n, const float* x, const int incx) const
00091   {
00092     typedef ScalarTraits<float> ST;
00093 #ifdef HAVE_TEUCHOS_BLASFLOAT
00094     float tmp = SASUM_F77(&n, x, &incx);
00095     return tmp;
00096 #else
00097     float sum = 0.0;
00098     if (incx == 1) {
00099       for (int i = 0; i < n; ++i)
00100         sum += ST::magnitude(*x++);
00101     }
00102     else {
00103       for (int i = 0; i < n; ++i, x+=incx)
00104         sum += ST::magnitude(*x);
00105     }
00106     return sum;
00107 #endif
00108   }
00109     
00110   void BLAS<int, float>::AXPY(const int n, const float alpha, const float* x, const int incx, float* y, const int incy) const
00111   { SAXPY_F77(&n, &alpha, x, &incx, y, &incy); }
00112   
00113   void BLAS<int, float>::COPY(const int n, const float* x, const int incx, float* y, const int incy) const 
00114   { SCOPY_F77(&n, x, &incx, y, &incy); }
00115   
00116   float BLAS<int, float>::DOT(const int n, const float* x, const int incx, const float* y, const int incy) const
00117   {
00118 #ifdef HAVE_TEUCHOS_BLASFLOAT
00119     return SDOT_F77(&n, x, &incx, y, &incy);
00120 #else
00121     return generic_dot(n, x, incx, y, incy);
00122 #endif
00123   }
00124   
00125   int BLAS<int, float>::IAMAX(const int n, const float* x, const int incx) const
00126   { return ISAMAX_F77(&n, x, &incx); }
00127 
00128   float BLAS<int, float>::NRM2(const int n, const float* x, const int incx) const
00129   {
00130 #if defined(HAVE_TEUCHOS_BLASFLOAT)
00131     return SNRM2_F77(&n, x, &incx);
00132 #else
00133     return ScalarTraits<float>::squareroot(generic_dot(n, x, incx, x, incx));
00134 #endif
00135   }
00136   
00137   void BLAS<int, float>::SCAL(const int n, const float alpha, float* x, const int incx) const
00138   { SSCAL_F77(&n, &alpha, x, &incx); }
00139   
00140   void BLAS<int, float>::GEMV(ETransp trans, const int m, const int n, const float alpha, const float* A, const int lda, const float* x, const int incx, const float beta, float* y, const int incy) const
00141   { SGEMV_F77(CHAR_MACRO(ETranspChar[trans]), &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy); }
00142   
00143   void BLAS<int, float>::GER(const int m, const int n, const float alpha, const float* x, const int incx, const float* y, const int incy, float* A, const int lda) const
00144   { SGER_F77(&m, &n, &alpha, x, &incx, y, &incy, A, &lda); }
00145 
00146   void BLAS<int, float>::TRMV(EUplo uplo, ETransp trans, EDiag diag, const int n, const float* A, const int lda, float* x, const int incx) const
00147   { STRMV_F77(CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[trans]), CHAR_MACRO(EDiagChar[diag]), &n, A, &lda, x, &incx); }
00148   
00149   void BLAS<int, float>::GEMM(ETransp transa, ETransp transb, const int m, const int n, const int k, const float alpha, const float* A, const int lda, const float* B, const int ldb, const float beta, float* C, const int ldc) const
00150   { SGEMM_F77(CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(ETranspChar[transb]), &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc); }
00151   
00152   void BLAS<int, float>::SYMM(ESide side, EUplo uplo, const int m, const int n, const float alpha, const float* A, const int lda, const float* B, const int ldb, const float beta, float* C, const int ldc) const
00153   { SSYMM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), &m, &n, &alpha, A, &lda, B, &ldb, &beta, C, &ldc); }
00154   
00155   void BLAS<int, float>::TRMM(ESide side, EUplo uplo, ETransp transa, EDiag diag, const int m, const int n, const float alpha, const float* A, const int lda, float* B, const int ldb) const
00156   { STRMM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(EDiagChar[diag]), &m, &n, &alpha, A, &lda, B, &ldb); }
00157   
00158   void BLAS<int, float>::TRSM(ESide side, EUplo uplo, ETransp transa, EDiag diag, const int m, const int n, const float alpha, const float* A, const int lda, float* B, const int ldb) const
00159   { STRSM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(EDiagChar[diag]), &m, &n, &alpha, A, &lda, B, &ldb); }
00160 
00161   // *************************** BLAS<int,double> DEFINITIONS ******************************  
00162   
00163   void BLAS<int, double>::ROTG(double* da, double* db, double* c, double* s) const
00164   { DROTG_F77(da, db, c, s); }
00165 
00166   void BLAS<int, double>::ROT(const int n, double* dx, const int incx, double* dy, const int incy, double* c, double* s) const
00167   { DROT_F77(&n, dx, &incx, dy, &incy, c, s); }
00168 
00169   double BLAS<int, double>::ASUM(const int n, const double* x, const int incx) const
00170   { return DASUM_F77(&n, x, &incx); }
00171   
00172   void BLAS<int, double>::AXPY(const int n, const double alpha, const double* x, const int incx, double* y, const int incy) const
00173   { DAXPY_F77(&n, &alpha, x, &incx, y, &incy); }
00174   
00175   void BLAS<int, double>::COPY(const int n, const double* x, const int incx, double* y, const int incy) const
00176   { DCOPY_F77(&n, x, &incx, y, &incy); }
00177   
00178   double BLAS<int, double>::DOT(const int n, const double* x, const int incx, const double* y, const int incy) const
00179   {
00180     return DDOT_F77(&n, x, &incx, y, &incy);
00181   }
00182   
00183   int BLAS<int, double>::IAMAX(const int n, const double* x, const int incx) const
00184   { return IDAMAX_F77(&n, x, &incx); }
00185 
00186   double BLAS<int, double>::NRM2(const int n, const double* x, const int incx) const
00187   { return DNRM2_F77(&n, x, &incx); }
00188   
00189   void BLAS<int, double>::SCAL(const int n, const double alpha, double* x, const int incx) const
00190   { DSCAL_F77(&n, &alpha, x, &incx); }
00191   
00192   void BLAS<int, double>::GEMV(ETransp trans, const int m, const int n, const double alpha, const double* A, const int lda, const double* x, const int incx, const double beta, double* y, const int incy) const
00193   { DGEMV_F77(CHAR_MACRO(ETranspChar[trans]), &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy); }
00194   
00195   void BLAS<int, double>::GER(const int m, const int n, const double alpha, const double* x, const int incx, const double* y, const int incy, double* A, const int lda) const
00196   { DGER_F77(&m, &n, &alpha, x, &incx, y, &incy, A, &lda); }
00197 
00198   void BLAS<int, double>::TRMV(EUplo uplo, ETransp trans, EDiag diag, const int n, const double* A, const int lda, double* x, const int incx) const
00199   { DTRMV_F77(CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[trans]), CHAR_MACRO(EDiagChar[diag]), &n, A, &lda, x, &incx); }
00200   
00201   void BLAS<int, double>::GEMM(ETransp transa, ETransp transb, const int m, const int n, const int k, const double alpha, const double* A, const int lda, const double* B, const int ldb, const double beta, double* C, const int ldc) const
00202   { DGEMM_F77(CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(ETranspChar[transb]), &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc); }
00203   
00204   void BLAS<int, double>::SYMM(ESide side, EUplo uplo, const int m, const int n, const double alpha, const double* A, const int lda, const double *B, const int ldb, const double beta, double *C, const int ldc) const
00205   { DSYMM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), &m, &n, &alpha, A, &lda, B, &ldb, &beta, C, &ldc); }
00206   
00207   void BLAS<int, double>::TRMM(ESide side, EUplo uplo, ETransp transa, EDiag diag, const int m, const int n, const double alpha, const double* A, const int lda, double* B, const int ldb) const
00208   { DTRMM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(EDiagChar[diag]), &m, &n, &alpha, A, &lda, B, &ldb); }
00209 
00210   void BLAS<int, double>::TRSM(ESide side, EUplo uplo, ETransp transa, EDiag diag, const int m, const int n, const double alpha, const double* A, const int lda, double* B, const int ldb) const
00211   { DTRSM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(EDiagChar[diag]), &m, &n, &alpha, A, &lda, B, &ldb); }
00212   
00213 #ifdef HAVE_TEUCHOS_COMPLEX
00214 
00215   // *************************** BLAS<int,std::complex<float> > DEFINITIONS ******************************  
00216 
00217   void BLAS<int, std::complex<float> >::ROTG(std::complex<float>* da, std::complex<float>* db, float* c, std::complex<float>* s) const
00218   { CROTG_F77(da, db, c, s ); }
00219 
00220   void BLAS<int, std::complex<float> >::ROT(const int n, std::complex<float>* dx, const int incx, std::complex<float>* dy, const int incy, float* c, std::complex<float>* s) const
00221   { CROT_F77(&n, dx, &incx, dy, &incy, c, s); }
00222 
00223   float BLAS<int, std::complex<float> >::ASUM(const int n, const std::complex<float>* x, const int incx) const
00224   { return CASUM_F77(&n, x, &incx); }
00225   
00226   void BLAS<int, std::complex<float> >::AXPY(const int n, const std::complex<float> alpha, const std::complex<float>* x, const int incx, std::complex<float>* y, const int incy) const
00227   { CAXPY_F77(&n, &alpha, x, &incx, y, &incy); }
00228   
00229   void BLAS<int, std::complex<float> >::COPY(const int n, const std::complex<float>* x, const int incx, std::complex<float>* y, const int incy) const
00230   { CCOPY_F77(&n, x, &incx, y, &incy); }
00231   
00232   std::complex<float> BLAS<int, std::complex<float> >::DOT(const int n, const std::complex<float>* x, const int incx, const std::complex<float>* y, const int incy) const
00233   { 
00234 #if defined(TEUCHOS_BLAS_APPLE_VECLIB_ERROR)
00235     std::complex<float> z;
00236     cblas_cdotc_sub(n,x,incx,y,incy,&z);
00237     return z;
00238 #elif defined(HAVE_COMPLEX_BLAS_PROBLEM) && defined(HAVE_FIXABLE_COMPLEX_BLAS_PROBLEM)
00239     std::complex<float> z;
00240     CDOT_F77(&z, &n, x, &incx, y, &incy); 
00241     return z;
00242 #else
00243     return CDOT_F77(&n, x, &incx, y, &incy); 
00244 #endif
00245   }
00246   
00247   int BLAS<int, std::complex<float> >::IAMAX(const int n, const std::complex<float>* x, const int incx) const
00248   { return ICAMAX_F77(&n, x, &incx); }
00249 
00250   float BLAS<int, std::complex<float> >::NRM2(const int n, const std::complex<float>* x, const int incx) const
00251   { return CNRM2_F77(&n, x, &incx); }
00252   
00253   void BLAS<int, std::complex<float> >::SCAL(const int n, const std::complex<float> alpha, std::complex<float>* x, const int incx) const
00254   { CSCAL_F77(&n, &alpha, x, &incx); }
00255   
00256   void BLAS<int, std::complex<float> >::GEMV(ETransp trans, const int m, const int n, const std::complex<float> alpha, const std::complex<float>* A, const int lda, const std::complex<float>* x, const int incx, const std::complex<float> beta, std::complex<float>* y, const int incy) const
00257   { CGEMV_F77(CHAR_MACRO(ETranspChar[trans]), &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy); }
00258   
00259   void BLAS<int, std::complex<float> >::GER(const int m, const int n, const std::complex<float> alpha, const std::complex<float>* x, const int incx, const std::complex<float>* y, const int incy, std::complex<float>* A, const int lda) const
00260   { CGER_F77(&m, &n, &alpha, x, &incx, y, &incy, A, &lda); }
00261 
00262   void BLAS<int, std::complex<float> >::TRMV(EUplo uplo, ETransp trans, EDiag diag, const int n, const std::complex<float>* A, const int lda, std::complex<float>* x, const int incx) const
00263   { CTRMV_F77(CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[trans]), CHAR_MACRO(EDiagChar[diag]), &n, A, &lda, x, &incx); }
00264   
00265   void BLAS<int, std::complex<float> >::GEMM(ETransp transa, ETransp transb, const int m, const int n, const int k, const std::complex<float> alpha, const std::complex<float>* A, const int lda, const std::complex<float>* B, const int ldb, const std::complex<float> beta, std::complex<float>* C, const int ldc) const
00266   { CGEMM_F77(CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(ETranspChar[transb]), &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc); } 
00267  
00268   void BLAS<int, std::complex<float> >::SYMM(ESide side, EUplo uplo, const int m, const int n, const std::complex<float> alpha, const std::complex<float>* A, const int lda, const std::complex<float>* B, const int ldb, const std::complex<float> beta, std::complex<float>* C, const int ldc) const
00269   { CSYMM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), &m, &n, &alpha, A, &lda, B, &ldb, &beta, C, &ldc); }
00270   
00271   void BLAS<int, std::complex<float> >::TRMM(ESide side, EUplo uplo, ETransp transa, EDiag diag, 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) const
00272   { CTRMM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(EDiagChar[diag]), &m, &n, &alpha, A, &lda, B, &ldb); }
00273   
00274   void BLAS<int, std::complex<float> >::TRSM(ESide side, EUplo uplo, ETransp transa, EDiag diag, 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) const
00275   { CTRSM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(EDiagChar[diag]), &m, &n, &alpha, A, &lda, B, &ldb); }
00276 
00277   // *************************** BLAS<int,std::complex<double> > DEFINITIONS ******************************  
00278 
00279   void BLAS<int, std::complex<double> >::ROTG(std::complex<double>* da, std::complex<double>* db, double* c, std::complex<double>* s) const
00280   { ZROTG_F77(da, db, c, s); }
00281 
00282   void BLAS<int, std::complex<double> >::ROT(const int n, std::complex<double>* dx, const int incx, std::complex<double>* dy, const int incy, double* c, std::complex<double>* s) const
00283   { ZROT_F77(&n, dx, &incx, dy, &incy, c, s); }
00284 
00285   double BLAS<int, std::complex<double> >::ASUM(const int n, const std::complex<double>* x, const int incx) const
00286   { return ZASUM_F77(&n, x, &incx); }
00287   
00288   void BLAS<int, std::complex<double> >::AXPY(const int n, const std::complex<double> alpha, const std::complex<double>* x, const int incx, std::complex<double>* y, const int incy) const
00289   { ZAXPY_F77(&n, &alpha, x, &incx, y, &incy); }
00290   
00291   void BLAS<int, std::complex<double> >::COPY(const int n, const std::complex<double>* x, const int incx, std::complex<double>* y, const int incy) const
00292   { ZCOPY_F77(&n, x, &incx, y, &incy); }
00293   
00294   std::complex<double> BLAS<int, std::complex<double> >::DOT(const int n, const std::complex<double>* x, const int incx, const std::complex<double>* y, const int incy) const
00295   { 
00296 #if defined(TEUCHOS_BLAS_APPLE_VECLIB_ERROR)
00297     std::complex<double> z;
00298     cblas_zdotc_sub(n,x,incx,y,incy,&z);
00299     return z;
00300 #elif defined(HAVE_COMPLEX_BLAS_PROBLEM) && defined(HAVE_FIXABLE_COMPLEX_BLAS_PROBLEM)
00301     std::complex<double> z;
00302     ZDOT_F77(&z, &n, x, &incx, y, &incy); 
00303     return z;
00304 #else
00305     return ZDOT_F77(&n, x, &incx, y, &incy); 
00306 #endif
00307   }
00308   
00309   int BLAS<int, std::complex<double> >::IAMAX(const int n, const std::complex<double>* x, const int incx) const
00310   { return IZAMAX_F77(&n, x, &incx); }
00311 
00312   double BLAS<int, std::complex<double> >::NRM2(const int n, const std::complex<double>* x, const int incx) const
00313   { return ZNRM2_F77(&n, x, &incx); }
00314   
00315   void BLAS<int, std::complex<double> >::SCAL(const int n, const std::complex<double> alpha, std::complex<double>* x, const int incx) const
00316   { ZSCAL_F77(&n, &alpha, x, &incx); }
00317   
00318   void BLAS<int, std::complex<double> >::GEMV(ETransp trans, const int m, const int n, const std::complex<double> alpha, const std::complex<double>* A, const int lda, const std::complex<double>* x, const int incx, const std::complex<double> beta, std::complex<double>* y, const int incy) const
00319   { ZGEMV_F77(CHAR_MACRO(ETranspChar[trans]), &m, &n, &alpha, A, &lda, x, &incx, &beta, y, &incy); }
00320   
00321   void BLAS<int, std::complex<double> >::GER(const int m, const int n, const std::complex<double> alpha, const std::complex<double>* x, const int incx, const std::complex<double>* y, const int incy, std::complex<double>* A, const int lda) const
00322   { ZGER_F77(&m, &n, &alpha, x, &incx, y, &incy, A, &lda); }
00323 
00324   void BLAS<int, std::complex<double> >::TRMV(EUplo uplo, ETransp trans, EDiag diag, const int n, const std::complex<double>* A, const int lda, std::complex<double>* x, const int incx) const
00325   { ZTRMV_F77(CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[trans]), CHAR_MACRO(EDiagChar[diag]), &n, A, &lda, x, &incx); }
00326   
00327   void BLAS<int, std::complex<double> >::GEMM(ETransp transa, ETransp transb, const int m, const int n, const int k, const std::complex<double> alpha, const std::complex<double>* A, const int lda, const std::complex<double>* B, const int ldb, const std::complex<double> beta, std::complex<double>* C, const int ldc) const
00328   { ZGEMM_F77(CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(ETranspChar[transb]), &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc); }
00329   
00330   void BLAS<int, std::complex<double> >::SYMM(ESide side, EUplo uplo, const int m, const int n, const std::complex<double> alpha, const std::complex<double>* A, const int lda, const std::complex<double> *B, const int ldb, const std::complex<double> beta, std::complex<double> *C, const int ldc) const
00331   { ZSYMM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), &m, &n, &alpha, A, &lda, B, &ldb, &beta, C, &ldc); }
00332   
00333   void BLAS<int, std::complex<double> >::TRMM(ESide side, EUplo uplo, ETransp transa, EDiag diag, 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) const
00334   { ZTRMM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(EDiagChar[diag]), &m, &n, &alpha, A, &lda, B, &ldb); }
00335 
00336   void BLAS<int, std::complex<double> >::TRSM(ESide side, EUplo uplo, ETransp transa, EDiag diag, 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) const
00337   { ZTRSM_F77(CHAR_MACRO(ESideChar[side]), CHAR_MACRO(EUploChar[uplo]), CHAR_MACRO(ETranspChar[transa]), CHAR_MACRO(EDiagChar[diag]), &m, &n, &alpha, A, &lda, B, &ldb); }
00338   
00339 #endif // HAVE_TEUCHOS_COMPLEX
00340 
00341 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines