35 #ifndef _BLAZE_MATH_BLAS_LEVEL2_H_
36 #define _BLAZE_MATH_BLAS_LEVEL2_H_
43 #include <boost/cast.hpp>
72 template<
typename VT1,
typename MT1,
bool SO,
typename VT2 >
74 const DenseVector<VT2,false>& x,
float alpha,
float beta );
76 template<
typename VT1,
typename VT2,
typename MT1,
bool SO >
78 const DenseMatrix<MT1,SO>& A,
float alpha,
float beta );
80 template<
typename VT1,
typename MT1,
bool SO,
typename VT2 >
82 const DenseVector<VT2,false>& x,
double alpha,
double beta );
84 template<
typename VT1,
typename VT2,
typename MT1,
bool SO >
86 const DenseMatrix<MT1,SO>& A,
double alpha,
double beta );
88 template<
typename VT1,
typename MT1,
bool SO,
typename VT2 >
90 const DenseVector<VT2,false>& x, complex<float> alpha, complex<float> beta );
92 template<
typename VT1,
typename VT2,
typename MT1,
bool SO >
94 const DenseMatrix<MT1,SO>& A, complex<float> alpha, complex<float> beta );
96 template<
typename VT1,
typename MT1,
bool SO,
typename VT2 >
98 const DenseVector<VT2,false>& x, complex<double> alpha, complex<double> beta );
100 template<
typename VT1,
typename VT2,
typename MT1,
bool SO >
102 const DenseMatrix<MT1,SO>& A, complex<double> alpha, complex<double> beta );
104 template<
typename VT,
typename MT,
bool SO >
108 template<
typename VT,
typename MT,
bool SO >
112 template<
typename VT,
typename MT,
bool SO >
116 template<
typename VT,
typename MT,
bool SO >
120 template<
typename VT,
typename MT,
bool SO >
124 template<
typename VT,
typename MT,
bool SO >
128 template<
typename VT,
typename MT,
bool SO >
132 template<
typename VT,
typename MT,
bool SO >
159 template<
typename VT1
164 const DenseVector<VT2,false>& x,
float alpha,
float beta )
166 using boost::numeric_cast;
180 const int M ( numeric_cast<int>( (~A).
rows() ) );
181 const int N ( numeric_cast<int>( (~A).
columns() ) );
182 const int lda( numeric_cast<int>( (~A).
spacing() ) );
184 cblas_sgemv( ( SO )?( CblasColMajor ):( CblasRowMajor ), CblasNoTrans, M, N, alpha,
185 (~A).data(), lda, (~x).data(), 1, beta, (~y).data(), 1 );
209 template<
typename VT1
214 const DenseMatrix<MT1,SO>& A,
float alpha,
float beta )
216 using boost::numeric_cast;
230 const int M ( numeric_cast<int>( (~A).
rows() ) );
231 const int N ( numeric_cast<int>( (~A).
columns() ) );
232 const int lda( numeric_cast<int>( (~A).
spacing() ) );
234 cblas_sgemv( ( SO )?( CblasColMajor ):( CblasRowMajor ), CblasTrans, M, N, alpha,
235 (~A).data(), lda, (~x).data(), 1, beta, (~y).data(), 1 );
259 template<
typename VT1
264 const DenseVector<VT2,false>& x,
double alpha,
double beta )
266 using boost::numeric_cast;
280 const int M ( numeric_cast<int>( (~A).
rows() ) );
281 const int N ( numeric_cast<int>( (~A).
columns() ) );
282 const int lda( numeric_cast<int>( (~A).
spacing() ) );
284 cblas_dgemv( ( SO )?( CblasColMajor ):( CblasRowMajor ), CblasNoTrans, M, N, alpha,
285 (~A).data(), lda, (~x).data(), 1, beta, (~y).data(), 1 );
309 template<
typename VT1
314 const DenseMatrix<MT1,SO>& A,
double alpha,
double beta )
316 using boost::numeric_cast;
330 const int M ( numeric_cast<int>( (~A).
rows() ) );
331 const int N ( numeric_cast<int>( (~A).
columns() ) );
332 const int lda( numeric_cast<int>( (~A).
spacing() ) );
334 cblas_dgemv( ( SO )?( CblasColMajor ):( CblasRowMajor ), CblasTrans, M, N, alpha,
335 (~A).data(), lda, (~x).data(), 1, beta, (~y).data(), 1 );
360 template<
typename VT1
365 const DenseVector<VT2,false>& x, complex<float> alpha, complex<float> beta )
367 using boost::numeric_cast;
384 const int M ( numeric_cast<int>( (~A).
rows() ) );
385 const int N ( numeric_cast<int>( (~A).
columns() ) );
386 const int lda( numeric_cast<int>( (~A).
spacing() ) );
388 cblas_cgemv( ( SO )?( CblasColMajor ):( CblasRowMajor ), CblasNoTrans, M, N, &alpha,
389 (~A).data(), lda, (~x).data(), 1, &beta, (~y).data(), 1 );
414 template<
typename VT1
419 const DenseMatrix<MT1,SO>& A, complex<float> alpha, complex<float> beta )
421 using boost::numeric_cast;
438 const int M ( numeric_cast<int>( (~A).
rows() ) );
439 const int N ( numeric_cast<int>( (~A).
columns() ) );
440 const int lda( numeric_cast<int>( (~A).
spacing() ) );
442 cblas_cgemv( ( SO )?( CblasColMajor ):( CblasRowMajor ), CblasTrans, M, N, &alpha,
443 (~A).data(), lda, (~x).data(), 1, &beta, (~y).data(), 1 );
468 template<
typename VT1
473 const DenseVector<VT2,false>& x, complex<double> alpha, complex<double> beta )
475 using boost::numeric_cast;
492 const int M ( numeric_cast<int>( (~A).
rows() ) );
493 const int N ( numeric_cast<int>( (~A).
columns() ) );
494 const int lda( numeric_cast<int>( (~A).
spacing() ) );
496 cblas_zgemv( ( SO )?( CblasColMajor ):( CblasRowMajor ), CblasNoTrans, M, N, &alpha,
497 (~A).data(), lda, (~x).data(), 1, &beta, (~y).data(), 1 );
522 template<
typename VT1
527 const DenseMatrix<MT1,SO>& A, complex<double> alpha, complex<double> beta )
529 using boost::numeric_cast;
546 const int M ( numeric_cast<int>( (~A).
rows() ) );
547 const int N ( numeric_cast<int>( (~A).
columns() ) );
548 const int lda( numeric_cast<int>( (~A).
spacing() ) );
550 cblas_zgemv( ( SO )?( CblasColMajor ):( CblasRowMajor ), CblasTrans, M, N, &alpha,
551 (~A).data(), lda, (~x).data(), 1, &beta, (~y).data(), 1 );
573 template<
typename VT
579 using boost::numeric_cast;
593 const int N ( numeric_cast<int>( (~A).
rows() ) );
594 const int lda( numeric_cast<int>( (~A).
spacing() ) );
596 cblas_strmv( ( IsRowMajorMatrix<MT>::value )?( CblasRowMajor ):( CblasColMajor ),
597 uplo, CblasNoTrans, CblasNonUnit, N, (~A).data(), lda, (~y).data(), 1 );
619 template<
typename VT
625 using boost::numeric_cast;
639 const int N ( numeric_cast<int>( (~A).
rows() ) );
640 const int lda( numeric_cast<int>( (~A).
spacing() ) );
642 cblas_strmv( ( IsRowMajorMatrix<MT>::value )?( CblasRowMajor ):( CblasColMajor ),
643 uplo, CblasTrans, CblasNonUnit, N, (~A).data(), lda, (~y).data(), 1 );
665 template<
typename VT
671 using boost::numeric_cast;
685 const int N ( numeric_cast<int>( (~A).
rows() ) );
686 const int lda( numeric_cast<int>( (~A).
spacing() ) );
688 cblas_dtrmv( ( IsRowMajorMatrix<MT>::value )?( CblasRowMajor ):( CblasColMajor ),
689 uplo, CblasNoTrans, CblasNonUnit, N, (~A).data(), lda, (~y).data(), 1 );
711 template<
typename VT
717 using boost::numeric_cast;
731 const int N ( numeric_cast<int>( (~A).
rows() ) );
732 const int lda( numeric_cast<int>( (~A).
spacing() ) );
734 cblas_dtrmv( ( IsRowMajorMatrix<MT>::value )?( CblasRowMajor ):( CblasColMajor ),
735 uplo, CblasTrans, CblasNonUnit, N, (~A).data(), lda, (~y).data(), 1 );
757 template<
typename VT
763 using boost::numeric_cast;
779 const int N ( numeric_cast<int>( (~A).
rows() ) );
780 const int lda( numeric_cast<int>( (~A).
spacing() ) );
782 cblas_ctrmv( ( IsRowMajorMatrix<MT>::value )?( CblasRowMajor ):( CblasColMajor ),
783 uplo, CblasNoTrans, CblasNonUnit, N, (~A).data(), lda, (~y).data(), 1 );
805 template<
typename VT
811 using boost::numeric_cast;
827 const int N ( numeric_cast<int>( (~A).
rows() ) );
828 const int lda( numeric_cast<int>( (~A).
spacing() ) );
830 cblas_ctrmv( ( IsRowMajorMatrix<MT>::value )?( CblasRowMajor ):( CblasColMajor ),
831 uplo, CblasTrans, CblasNonUnit, N, (~A).data(), lda, (~y).data(), 1 );
853 template<
typename VT
859 using boost::numeric_cast;
875 const int N ( numeric_cast<int>( (~A).
rows() ) );
876 const int lda( numeric_cast<int>( (~A).
spacing() ) );
878 cblas_ztrmv( ( IsRowMajorMatrix<MT>::value )?( CblasRowMajor ):( CblasColMajor ),
879 uplo, CblasNoTrans, CblasNonUnit, N, (~A).data(), lda, (~y).data(), 1 );
901 template<
typename VT
907 using boost::numeric_cast;
923 const int N ( numeric_cast<int>( (~A).
rows() ) );
924 const int lda( numeric_cast<int>( (~A).
spacing() ) );
926 cblas_ztrmv( ( IsRowMajorMatrix<MT>::value )?( CblasRowMajor ):( CblasColMajor ),
927 uplo, CblasTrans, CblasNonUnit, N, (~A).data(), lda, (~y).data(), 1 );
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_HAVE_MUTABLE_DATA_ACCESS(T)
Constraint on the data type.In case the given data type T does not provide low-level data access to m...
Definition: MutableDataAccess.h:79
#define BLAZE_CONSTRAINT_MUST_HAVE_CONST_DATA_ACCESS(T)
Constraint on the data type.In case the given data type T does not provide low-level data access to c...
Definition: ConstDataAccess.h:79
#define BLAZE_CONSTRAINT_MUST_NOT_BE_COMPUTATION_TYPE(T)
Constraint on the data type.In case the given data type T is a computational expression (i...
Definition: Computation.h:118
Constraint on the data type.
BLAZE_ALWAYS_INLINE size_t rows(const Matrix< MT, SO > &matrix)
Returns the current number of rows of the matrix.
Definition: Matrix.h:316
Header file for the DenseVector base class.
#define BLAZE_CONSTRAINT_MUST_BE_FLOAT_TYPE(T)
Constraint on the data type.This compile time constraint checks that the given data type T is of type...
Definition: Float.h:80
Constraint on the data type.
Namespace of the Blaze C++ math library.
Definition: Blaze.h:57
#define BLAZE_ALWAYS_INLINE
Platform dependent setup of an enforced inline keyword.
Definition: Inline.h:85
#define BLAZE_CONSTRAINT_MUST_BE_DOUBLE_TYPE(T)
Constraint on the data type.This compile time constraint checks that the given data type T is of type...
Definition: Double.h:80
Header file for the DenseMatrix base class.
Type ElementType
Type of the sparse matrix elements.
Definition: CompressedMatrix.h:2505
Constraint on the data type.
const bool spacing
Adding an additional spacing line between two log messages.This setting gives the opportunity to add ...
Definition: Logging.h:70
System settings for the BLAS mode.
Header file for run time assertion macros.
Constraint on the data type.
#define BLAZE_CONSTRAINT_MUST_BE_COMPLEX_TYPE(T)
Constraint on the data type.This compile time constraint checks that the given data type T is a compl...
Definition: Complex.h:80
Header file for the IsRowMajorMatrix type trait.
BLAZE_ALWAYS_INLINE size_t columns(const Matrix< MT, SO > &matrix)
Returns the current number of columns of the matrix.
Definition: Matrix.h:332
Header file for the complex data type.
Constraint on the data type.
System settings for the inline keywords.
#define BLAZE_INTERNAL_ASSERT(expr, msg)
Run time assertion macro for internal checks.In case of an invalid run time expression, the program execution is terminated. The BLAZE_INTERNAL_ASSERT macro can be disabled by setting the BLAZE_USER_ASSERTION flag to zero or by defining NDEBUG during the compilation.
Definition: Assert.h:101