33 #ifndef EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H    34 #define EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H    49 template<
typename Index, 
typename LhsScalar, 
int StorageOrder, 
bool ConjugateLhs, 
typename RhsScalar, 
bool ConjugateRhs>
    52 #define EIGEN_BLAS_GEMV_SPECIALIZE(Scalar) \    53 template<typename Index, bool ConjugateLhs, bool ConjugateRhs> \    54 struct general_matrix_vector_product<Index,Scalar,const_blas_data_mapper<Scalar,Index,ColMajor>,ColMajor,ConjugateLhs,Scalar,const_blas_data_mapper<Scalar,Index,RowMajor>,ConjugateRhs,Specialized> { \    56   Index rows, Index cols, \    57   const const_blas_data_mapper<Scalar,Index,ColMajor> &lhs, \    58   const const_blas_data_mapper<Scalar,Index,RowMajor> &rhs, \    59   Scalar* res, Index resIncr, Scalar alpha) \    62     general_matrix_vector_product<Index,Scalar,const_blas_data_mapper<Scalar,Index,ColMajor>,ColMajor,ConjugateLhs,Scalar,const_blas_data_mapper<Scalar,Index,RowMajor>,ConjugateRhs,BuiltIn>::run( \    63       rows, cols, lhs, rhs, res, resIncr, alpha); \    65     general_matrix_vector_product_gemv<Index,Scalar,ColMajor,ConjugateLhs,Scalar,ConjugateRhs>::run( \    66       rows, cols, lhs.data(), lhs.stride(), rhs.data(), rhs.stride(), res, resIncr, alpha); \    70 template<typename Index, bool ConjugateLhs, bool ConjugateRhs> \    71 struct general_matrix_vector_product<Index,Scalar,const_blas_data_mapper<Scalar,Index,RowMajor>,RowMajor,ConjugateLhs,Scalar,const_blas_data_mapper<Scalar,Index,ColMajor>,ConjugateRhs,Specialized> { \    73   Index rows, Index cols, \    74   const const_blas_data_mapper<Scalar,Index,RowMajor> &lhs, \    75   const const_blas_data_mapper<Scalar,Index,ColMajor> &rhs, \    76   Scalar* res, Index resIncr, Scalar alpha) \    78     general_matrix_vector_product_gemv<Index,Scalar,RowMajor,ConjugateLhs,Scalar,ConjugateRhs>::run( \    79       rows, cols, lhs.data(), lhs.stride(), rhs.data(), rhs.stride(), res, resIncr, alpha); \    88 #define EIGEN_BLAS_GEMV_SPECIALIZATION(EIGTYPE,BLASTYPE,BLASPREFIX) \    89 template<typename Index, int LhsStorageOrder, bool ConjugateLhs, bool ConjugateRhs> \    90 struct general_matrix_vector_product_gemv<Index,EIGTYPE,LhsStorageOrder,ConjugateLhs,EIGTYPE,ConjugateRhs> \    92 typedef Matrix<EIGTYPE,Dynamic,1,ColMajor> GEMVVector;\    95   Index rows, Index cols, \    96   const EIGTYPE* lhs, Index lhsStride, \    97   const EIGTYPE* rhs, Index rhsIncr, \    98   EIGTYPE* res, Index resIncr, EIGTYPE alpha) \   100   BlasIndex m=convert_index<BlasIndex>(rows), n=convert_index<BlasIndex>(cols), \   101             lda=convert_index<BlasIndex>(lhsStride), incx=convert_index<BlasIndex>(rhsIncr), incy=convert_index<BlasIndex>(resIncr); \   102   const EIGTYPE beta(1); \   103   const EIGTYPE *x_ptr; \   104   char trans=(LhsStorageOrder==ColMajor) ? 'N' : (ConjugateLhs) ? 'C' : 'T'; \   105   if (LhsStorageOrder==RowMajor) { \   106     m = convert_index<BlasIndex>(cols); \   107     n = convert_index<BlasIndex>(rows); \   110   if (ConjugateRhs) { \   111     Map<const GEMVVector, 0, InnerStride<> > map_x(rhs,cols,1,InnerStride<>(incx)); \   112     x_tmp=map_x.conjugate(); \   113     x_ptr=x_tmp.data(); \   116   BLASPREFIX##gemv_(&trans, &m, &n, &numext::real_ref(alpha), (const BLASTYPE*)lhs, &lda, (const BLASTYPE*)x_ptr, &incx, &numext::real_ref(beta), (BLASTYPE*)res, &incy); \   129 #endif // EIGEN_GENERAL_MATRIX_VECTOR_BLAS_H 
#define EIGEN_BLAS_GEMV_SPECIALIZE(Scalar)
std::complex< float > scomplex
std::complex< double > dcomplex
#define EIGEN_BLAS_GEMV_SPECIALIZATION(EIGTYPE, BLASTYPE, BLASPREFIX)