Nektar++
Blas.hpp
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File Blas.hpp
4 //
5 // For more information, please see: http://www.nektar.info
6 //
7 // The MIT License
8 //
9 // Copyright (c) 2006 Division of Applied Mathematics, Brown University (USA),
10 // Department of Aeronautics, Imperial College London (UK), and Scientific
11 // Computing and Imaging Institute, University of Utah (USA).
12 //
13 // Permission is hereby granted, free of charge, to any person obtaining a
14 // copy of this software and associated documentation files (the "Software"),
15 // to deal in the Software without restriction, including without limitation
16 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 // and/or sell copies of the Software, and to permit persons to whom the
18 // Software is furnished to do so, subject to the following conditions:
19 //
20 // The above copyright notice and this permission notice shall be included
21 // in all copies or substantial portions of the Software.
22 //
23 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29 // DEALINGS IN THE SOFTWARE.
30 //
31 // Description: wrapper of functions around standard BLAS routines
32 //
33 ///////////////////////////////////////////////////////////////////////////////
34 
35 #ifndef NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_BLAS_HPP
36 #define NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_BLAS_HPP
37 
38 #include <boost/core/ignore_unused.hpp>
39 
42 
43 // Translations for using Fortran version of blas
44 namespace Blas
45 {
46  extern "C"
47  {
48  // -- BLAS Level 1:
49  void F77NAME(dcopy) (const int& n, const double *x, const int& incx,
50  double *y, const int& incy);
51  void F77NAME(scopy) (const int& n, const float *x, const int& incx,
52  float *y, const int& incy);
53  void F77NAME(daxpy) (const int& n, const double& alpha, const double *x,
54  const int& incx, const double *y, const int& incy);
55  void F77NAME(saxpy) (const int& n, const float& alpha, const float *x,
56  const int& incx, const float *y, const int& incy);
57  void F77NAME(dswap) (const int& n, double *x, const int& incx,
58  double *y, const int& incy);
59  void F77NAME(sswap) (const int& n, float *x, const int& incx,
60  float *y, const int& incy);
61  void F77NAME(dscal) (const int& n, const double& alpha, double *x,
62  const int& incx);
63  void F77NAME(sscal) (const int& n, const float& alpha, float *x,
64  const int& incx);
65  void F77NAME(drot) (const int& n, double *x, const int& incx,
66  double *y, const int& incy, const double& c,
67  const double& s);
68  void F77NAME(srot) (const int& n, float *x, const int& incx,
69  float *y, const int& incy, const float& c,
70  const float& s);
71  double F77NAME(ddot) (const int& n, const double *x, const int& incx,
72  const double *y, const int& incy);
73  float F77NAME(sdot) (const int& n, const float *x, const int& incx,
74  const float *y, const int& incy);
75  double F77NAME(dnrm2) (const int& n, const double *x, const int& incx);
76  float F77NAME(snrm2) (const int& n, const float *x, const int& incx);
77  double F77NAME(dasum) (const int& n, const double *x, const int& incx);
78  float F77NAME(sasum) (const int& n, const float *x, const int& incx);
79  int F77NAME(idamax)(const int& n, const double *x, const int& incx);
80  int F77NAME(isamax)(const int& n, const float *x, const int& incx);
81 
82  // -- BLAS level 2
83  void F77NAME(dgemv) (const char& trans, const int& m,
84  const int& n, const double& alpha,
85  const double* a, const int& lda,
86  const double* x, const int& incx,
87  const double& beta, double* y, const int& incy);
88  // -- BLAS level 2
89  void F77NAME(sgemv) (const char& trans, const int& m,
90  const int& n, const float& alpha,
91  const float* a, const int& lda,
92  const float* x, const int& incx,
93  const float& beta, float* y, const int& incy);
94 
95  void F77NAME(dgbmv) (const char& trans, const int& m,
96  const int& n, const int& kl, const int& ku,
97  const double& alpha,
98  const double* a, const int& lda,
99  const double* x, const int& incx,
100  const double& beta, double* y, const int& incy);
101  void F77NAME(sgbmv) (const char& trans, const int& m,
102  const int& n, const int& kl, const int& ku,
103  const float& alpha,
104  const float* a, const int& lda,
105  const float* x, const int& incx,
106  const float& beta, float* y, const int& incy);
107 
108  void F77NAME(dtpmv) (const char& uplo, const char& trans, const char& diag,
109  const int& n, const double* ap, double* x, const int& incx);
110  void F77NAME(stpmv) (const char& uplo, const char& trans,
111  const char& diag, const int& n, const float* ap, float* x,
112  const int& incx);
113 
114  void F77NAME(dspmv) (const char& uplo, const int& n, const double& alpha,
115  const double* a, const double* x, const int& incx,
116  const double& beta, double* y, const int& incy);
117  void F77NAME(sspmv) (const char& uplo, const int& n, const float& alpha,
118  const float* a, const float* x, const int& incx,
119  const float& beta, float* y, const int& incy);
120 
121  void F77NAME(dsbmv) (const char& uplo, const int& m,
122  const int& k, const double& alpha,
123  const double* a, const int& lda,
124  const double* x, const int& incx,
125  const double& beta, double* y, const int& incy);
126  void F77NAME(ssbmv) (const char& uplo, const int& m,
127  const int& k, const float& alpha,
128  const float* a, const int& lda,
129  const float* x, const int& incx,
130  const float& beta, float* y, const int& incy);
131 
132  void F77NAME(dger) (const int& m,
133  const int& n, const double& alpha,
134  const double* x, const int& incx,
135  const double* y, const int& incy,
136  double* a, const int& lda);
137  void F77NAME(sger) (const int& m,
138  const int& n, const float& alpha,
139  const float* x, const int& incx,
140  const float* y, const int& incy,
141  float* a, const int& lda);
142 
143  // -- BLAS level 3:
144  void F77NAME(dgemm) (const char& trans, const char& transb,
145  const int& m1, const int& n,
146  const int& k, const double& alpha,
147  const double* a, const int& lda,
148  const double* b, const int& ldb,
149  const double& beta, double* c, const int& ldc);
150  // -- BLAS level 3:
151  void F77NAME(sgemm) (const char& trans, const char& transb,
152  const int& m1, const int& n,
153  const int& k, const float& alpha,
154  const float* a, const int& lda,
155  const float* b, const int& ldb,
156  const float& beta, float* c, const int& ldc);
157  }
158 
159  /// \brief BLAS level 1: Copy \a x to \a y
160  static inline void Dcopy (const int& n, const double *x, const int& incx,
161  double *y, const int& incy)
162  {
163  F77NAME(dcopy)(n,x,incx,y,incy);
164  }
165 
166  /// \brief BLAS level 1: y = alpha \a x plus \a y
167  static inline void Daxpy (const int& n, const double& alpha, const double *x,
168  const int& incx, const double *y, const int& incy)
169  {
170  F77NAME(daxpy)(n,alpha,x,incx,y,incy);
171  }
172 
173 
174  /// \brief BLAS level 1: Swap \a x with \a y
175  static inline void Dswap (const int& n,double *x, const int& incx,
176  double *y, const int& incy)
177  {
178  F77NAME(dswap)(n,x,incx,y,incy);
179  }
180 
181  /// \brief BLAS level 1: x = alpha \a x
182  static inline void Dscal (const int& n, const double& alpha, double *x,
183  const int& incx)
184  {
185  F77NAME(dscal)(n,alpha,x,incx);
186  }
187 
188  /// \brief BLAS level 1: Plane rotation by c = cos(theta), s = sin(theta)
189  static inline void Drot (const int& n, double *x, const int& incx,
190  double *y, const int& incy, const double& c,
191  const double& s)
192  {
193  F77NAME(drot)(n,x,incx,y,incy,c,s);
194  }
195 
196  /// \brief BLAS level 1: output = \f$ x^T y \f$
197  static inline double Ddot (const int& n, const double *x, const int& incx,
198  const double *y, const int& incy)
199  {
200  return F77NAME(ddot)(n,x,incx,y,incy);
201  }
202 
203  // \brief BLAS level 1: output = \f$ ||x||_2 \f$
204 
205  static inline double Dnrm2 (const int& n, const double *x, const int& incx)
206  {
207  return F77NAME(dnrm2)(n,x,incx);
208  }
209 
210  /// \brief BLAS level 1: output = \f$ ||x||_1 \f$
211  static inline double Dasum (const int& n, const double *x, const int& incx)
212  {
213  return F77NAME(dasum)(n,x,incx);
214  }
215 
216  /// \brief BLAS level 1: output = 1st value where \f$ |x[i]| = max |x|_1 \f$
217  /// Note it is modified to return a value between (0,n-1) as per
218  /// the standard C convention
219  static inline int Idamax (const int& n, const double *x, const int& incx)
220  {
221  return F77NAME(idamax)(n,x,incx) -1;
222  }
223 
224  /// \brief BLAS level 2: Matrix vector multiply A = alpha*x*y**T + A
225  /// where A[m x n]
226  static inline void Ger (const int& m,
227  const int& n, const double& alpha,
228  const double* x, const int& incx,
229  const double* y, const int& incy,
230  double* a, const int& lda)
231  {
232  F77NAME(dger) (m,n,alpha,x,incx,y,incy,a,lda);
233  }
234 
235  /// \brief BLAS level 2: Matrix vector multiply A = alpha*x*y**T + A
236  /// where A[m x n]
237  static inline void Ger (const int& m,
238  const int& n, const float& alpha,
239  const float* x, const int& incx,
240  const float* y, const int& incy,
241  float* a, const int& lda)
242  {
243  F77NAME(sger) (m,n,alpha,x,incx,y,incy,a,lda);
244  }
245 
246  /// \brief BLAS level 2: Matrix vector multiply y = A \e x where A[m x n]
247  static inline void Gemv (const char& trans, const int& m, const int& n,
248  const double& alpha, const double* a, const int& lda,
249  const double* x, const int& incx, const double& beta,
250  double* y, const int& incy)
251  {
252  F77NAME(dgemv) (trans,m,n,alpha,a,lda,x,incx,beta,y,incy);
253  }
254 
255  /// \brief BLAS level 2: Matrix vector multiply y = A \e x where A[m x n]
256  static inline void Gemv (const char& trans, const int& m, const int& n,
257  const float& alpha, const float* a, const int& lda,
258  const float* x, const int& incx, const float& beta,
259  float* y, const int& incy)
260  {
261  F77NAME(sgemv) (trans,m,n,alpha,a,lda,x,incx,beta,y,incy);
262  }
263 
264  /// \brief BLAS level 2: Matrix vector multiply y = A \e x where A[m x n]
265  static inline void Dgemv (const char& trans, const int& m, const int& n,
266  const double& alpha, const double* a, const int& lda,
267  const double* x, const int& incx, const double& beta,
268  double* y, const int& incy)
269  {
270  F77NAME(dgemv) (trans,m,n,alpha,a,lda,x,incx,beta,y,incy);
271  }
272 
273  static inline void Gbmv (const char& trans, const int& m,
274  const int& n, const int& kl, const int& ku,
275  const double& alpha,
276  const double* a, const int& lda,
277  const double* x, const int& incx,
278  const double& beta, double* y, const int& incy)
279  {
280  F77NAME(dgbmv) (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y,
281  incy);
282  }
283 
284  static inline void Gbmv (const char& trans, const int& m,
285  const int& n, const int& kl, const int& ku,
286  const float& alpha,
287  const float* a, const int& lda,
288  const float* x, const int& incx,
289  const float& beta, float* y, const int& incy)
290  {
291  F77NAME(sgbmv) (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y,
292  incy);
293  }
294 
295  static inline void Dgbmv (const char& trans, const int& m,
296  const int& n, const int& kl, const int& ku,
297  const double& alpha,
298  const double* a, const int& lda,
299  const double* x, const int& incx,
300  const double& beta, double* y, const int& incy)
301  {
302  F77NAME(dgbmv) (trans, m, n, kl, ku, alpha, a, lda, x, incx, beta, y, incy);
303  }
304 
305  static inline void Tpmv(const char& uplo, const char& trans,
306  const char& diag, const int& n, const double* ap, double* x,
307  const int& incx)
308  {
309  F77NAME(dtpmv) (uplo, trans, diag, n, ap, x, incx);
310  }
311 
312  static inline void Tpmv(const char& uplo, const char& trans,
313  const char& diag, const int& n, const float* ap, float* x,
314  const int& incx)
315  {
316  F77NAME(stpmv) (uplo, trans, diag, n, ap, x, incx);
317  }
318 
319  static inline void Dtpmv(const char& uplo, const char& trans, const char& diag,
320  const int& n, const double* ap, double* x, const int& incx)
321  {
322  F77NAME(dtpmv) (uplo, trans, diag, n, ap, x, incx);
323  }
324 
325  /// \brief BLAS level 2: Matrix vector multiply y = A \e x where A
326  /// is symmetric packed
327  static inline void Spmv (const char& uplo, const int& n,
328  const double& alpha,
329  const double* a, const double* x, const int& incx,
330  const double& beta, double* y, const int& incy)
331  {
332  F77NAME(dspmv) (uplo,n,alpha,a,x,incx,beta,y,incy);
333  }
334  /// \brief BLAS level 2: Matrix vector multiply y = A \e x where A
335  /// is symmetric packed
336  static inline void Spmv (const char& uplo, const int& n,
337  const float& alpha,
338  const float* a, const float* x, const int& incx,
339  const float& beta, float* y, const int& incy)
340  {
341  F77NAME(sspmv) (uplo,n,alpha,a,x,incx,beta,y,incy);
342  }
343 
344  /// \brief BLAS level 2: Matrix vector multiply y = A \e x where A
345  /// is symmetric packed
346  static inline void Dspmv (const char& uplo, const int& n, const double& alpha,
347  const double* a, const double* x, const int& incx,
348  const double& beta, double* y, const int& incy)
349  {
350  F77NAME(dspmv) (uplo,n,alpha,a,x,incx,beta,y,incy);
351  }
352 
353  static inline void Dsbmv (const char& uplo, const int& m, const int& k,
354  const double& alpha, const double* a, const int& lda,
355  const double* x, const int& incx, const double& beta,
356  double* y, const int& incy)
357  {
358  F77NAME(dsbmv) (uplo,m,k,alpha,a,lda,x,incx,beta,y,incy);
359  }
360 
361  /// \brief BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k],
362  /// op(B)[k x n], C[m x n]
363  /// DGEMM performs one of the matrix-matrix operations:
364  /// C := alpha*op( A )*op( B ) + beta*C,
365  static inline void Gemm (const char& transa, const char& transb,
366  const int& m,
367  const int& n, const int& k, const double& alpha,
368  const double* a, const int& lda, const double* b,
369  const int& ldb, const double& beta, double* c,
370  const int& ldc)
371  {
372  F77NAME(dgemm) (transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc);
373  }
374 
375  /// \brief BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k],
376  /// op(B)[k x n], C[m x n]
377  /// DGEMM performs one of the matrix-matrix operations:
378  /// C := alpha*op( A )*op( B ) + beta*C,
379  static inline void Gemm (const char& transa, const char& transb,
380  const int& m,
381  const int& n, const int& k, const float& alpha,
382  const float* a, const int& lda, const float* b,
383  const int& ldb, const float& beta, float* c,
384  const int& ldc)
385  {
386  F77NAME(sgemm) (transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc);
387  }
388 
389 
390  /// \brief BLAS level 3: Matrix-matrix multiply C = A x B
391  /// where op(A)[m x k], op(B)[k x n], C[m x n]
392  /// DGEMM performs one of the matrix-matrix operations:
393  /// C := alpha*op( A )*op( B ) + beta*C,
394  static inline void Dgemm (const char& transa, const char& transb, const int& m,
395  const int& n, const int& k, const double& alpha,
396  const double* a, const int& lda, const double* b,
397  const int& ldb, const double& beta, double* c,
398  const int& ldc)
399  {
400  F77NAME(dgemm) (transa,transb,m,n,k,alpha,a,lda,b,ldb,beta,c,ldc);
401  }
402 
403  // \brief Wrapper to mutliply two (row major) matrices together C =
404  // a*A*B + b*C
405  static inline void Cdgemm(const int M, const int N, const int K, const double a,
406  const double *A, const int ldA, const double * B, const int ldB,
407  const double b, double *C, const int ldC)
408  {
409  boost::ignore_unused(ldA, ldB, ldC);
410  Dgemm('N','N',N,M,K,a,B,N,A,K,b,C,N) ;
411  }
412 }
413 #endif //NEKTAR_LIB_UTILITIES_LINEAR_ALGEBRA_BLAS_HPP
#define F77NAME(x)
Fortran routines need an underscore.
Definition: TransF77.hpp:46
Definition: Blas.hpp:45
int F77NAME() idamax(const int &n, const double *x, const int &incx)
void F77NAME() sscal(const int &n, const float &alpha, float *x, const int &incx)
static void Dgemv(const char &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)
BLAS level 2: Matrix vector multiply y = A x where A[m x n].
Definition: Blas.hpp:265
static void Dgbmv(const char &trans, const int &m, const int &n, const int &kl, const int &ku, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
Definition: Blas.hpp:295
static void Dswap(const int &n, double *x, const int &incx, double *y, const int &incy)
BLAS level 1: Swap x with y.
Definition: Blas.hpp:175
void F77NAME() saxpy(const int &n, const float &alpha, const float *x, const int &incx, const float *y, const int &incy)
static void Drot(const int &n, double *x, const int &incx, double *y, const int &incy, const double &c, const double &s)
BLAS level 1: Plane rotation by c = cos(theta), s = sin(theta)
Definition: Blas.hpp:189
void F77NAME() daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
static void Dscal(const int &n, const double &alpha, double *x, const int &incx)
BLAS level 1: x = alpha x.
Definition: Blas.hpp:182
void F77NAME() dswap(const int &n, double *x, const int &incx, double *y, const int &incy)
void F77NAME() drot(const int &n, double *x, const int &incx, double *y, const int &incy, const double &c, const double &s)
static void Gemm(const char &transa, const char &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)
BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k], op(B)[k x n], C[m x n] DGEMM perfo...
Definition: Blas.hpp:365
double F77NAME() dasum(const int &n, const double *x, const int &incx)
void F77NAME() dtpmv(const char &uplo, const char &trans, const char &diag, const int &n, const double *ap, double *x, const int &incx)
void F77NAME() stpmv(const char &uplo, const char &trans, const char &diag, const int &n, const float *ap, float *x, const int &incx)
static void Gemv(const char &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)
BLAS level 2: Matrix vector multiply y = A x where A[m x n].
Definition: Blas.hpp:247
static double Dasum(const int &n, const double *x, const int &incx)
BLAS level 1: output = .
Definition: Blas.hpp:211
void F77NAME() dspmv(const char &uplo, const int &n, const double &alpha, const double *a, const double *x, const int &incx, const double &beta, double *y, const int &incy)
void F77NAME() dscal(const int &n, const double &alpha, double *x, const int &incx)
double F77NAME() ddot(const int &n, const double *x, const int &incx, const double *y, const int &incy)
static void Gbmv(const char &trans, const int &m, const int &n, const int &kl, const int &ku, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
Definition: Blas.hpp:273
float F77NAME() sasum(const int &n, const float *x, const int &incx)
static void Dsbmv(const char &uplo, const int &m, const int &k, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
Definition: Blas.hpp:353
static int Idamax(const int &n, const double *x, const int &incx)
BLAS level 1: output = 1st value where Note it is modified to return a value between (0,...
Definition: Blas.hpp:219
void F77NAME() ssbmv(const char &uplo, const int &m, const int &k, const float &alpha, const float *a, const int &lda, const float *x, const int &incx, const float &beta, float *y, const int &incy)
static void Dcopy(const int &n, const double *x, const int &incx, double *y, const int &incy)
BLAS level 1: Copy x to y.
Definition: Blas.hpp:160
void F77NAME() dsbmv(const char &uplo, const int &m, const int &k, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
void F77NAME() sspmv(const char &uplo, const int &n, const float &alpha, const float *a, const float *x, const int &incx, const float &beta, float *y, const int &incy)
float F77NAME() snrm2(const int &n, const float *x, const int &incx)
void F77NAME() sgbmv(const char &trans, const int &m, const int &n, const int &kl, const int &ku, const float &alpha, const float *a, const int &lda, const float *x, const int &incx, const float &beta, float *y, const int &incy)
static double Dnrm2(const int &n, const double *x, const int &incx)
Definition: Blas.hpp:205
void F77NAME() dcopy(const int &n, const double *x, const int &incx, double *y, const int &incy)
void F77NAME() sger(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)
void F77NAME() sgemv(const char &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)
void F77NAME() dgbmv(const char &trans, const int &m, const int &n, const int &kl, const int &ku, const double &alpha, const double *a, const int &lda, const double *x, const int &incx, const double &beta, double *y, const int &incy)
void F77NAME() srot(const int &n, float *x, const int &incx, float *y, const int &incy, const float &c, const float &s)
void F77NAME() dgemm(const char &trans, const char &transb, const int &m1, 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)
void F77NAME() dgemv(const char &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)
int F77NAME() isamax(const int &n, const float *x, const int &incx)
static double Ddot(const int &n, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: output = .
Definition: Blas.hpp:197
static void Cdgemm(const int M, const int N, const int K, const double a, const double *A, const int ldA, const double *B, const int ldB, const double b, double *C, const int ldC)
Definition: Blas.hpp:405
static void Dgemm(const char &transa, const char &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)
BLAS level 3: Matrix-matrix multiply C = A x B where op(A)[m x k], op(B)[k x n], C[m x n] DGEMM perfo...
Definition: Blas.hpp:394
void F77NAME() sgemm(const char &trans, const char &transb, const int &m1, 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)
double F77NAME() dnrm2(const int &n, const double *x, const int &incx)
static void Tpmv(const char &uplo, const char &trans, const char &diag, const int &n, const double *ap, double *x, const int &incx)
Definition: Blas.hpp:305
float F77NAME() sdot(const int &n, const float *x, const int &incx, const float *y, const int &incy)
void F77NAME() sswap(const int &n, float *x, const int &incx, float *y, const int &incy)
static void Dspmv(const char &uplo, const int &n, const double &alpha, const double *a, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = A x where A is symmetric packed.
Definition: Blas.hpp:346
void F77NAME() dger(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)
void F77NAME() scopy(const int &n, const float *x, const int &incx, float *y, const int &incy)
static void Daxpy(const int &n, const double &alpha, const double *x, const int &incx, const double *y, const int &incy)
BLAS level 1: y = alpha x plus y.
Definition: Blas.hpp:167
static void 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)
BLAS level 2: Matrix vector multiply A = alpha*x*y**T + A where A[m x n].
Definition: Blas.hpp:226
static void Spmv(const char &uplo, const int &n, const double &alpha, const double *a, const double *x, const int &incx, const double &beta, double *y, const int &incy)
BLAS level 2: Matrix vector multiply y = A x where A is symmetric packed.
Definition: Blas.hpp:327
static void Dtpmv(const char &uplo, const char &trans, const char &diag, const int &n, const double *ap, double *x, const int &incx)
Definition: Blas.hpp:319