mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-30 15:54:13 +08:00
Cleanup obsolete assign_scalar_eig2mkl helper.
This commit is contained in:
parent
fec4c334ba
commit
097d1e8823
@ -87,12 +87,8 @@ struct general_matrix_matrix_rankupdate<Index,EIGTYPE,AStorageOrder,ConjugateA,C
|
|||||||
\
|
\
|
||||||
BlasIndex lda=convert_index<BlasIndex>(lhsStride), ldc=convert_index<BlasIndex>(resStride), n=convert_index<BlasIndex>(size), k=convert_index<BlasIndex>(depth); \
|
BlasIndex lda=convert_index<BlasIndex>(lhsStride), ldc=convert_index<BlasIndex>(resStride), n=convert_index<BlasIndex>(size), k=convert_index<BlasIndex>(depth); \
|
||||||
char uplo=(IsLower) ? 'L' : 'U', trans=(AStorageOrder==RowMajor) ? 'T':'N'; \
|
char uplo=(IsLower) ? 'L' : 'U', trans=(AStorageOrder==RowMajor) ? 'T':'N'; \
|
||||||
BLASTYPE alpha_, beta_; \
|
EIGTYPE beta; \
|
||||||
\
|
BLASFUNC(&uplo, &trans, &n, &k, &numext::real_ref(alpha), lhs, &lda, &numext::real_ref(beta), res, &ldc); \
|
||||||
/* Set alpha_ & beta_ */ \
|
|
||||||
assign_scalar_eig2mkl<BLASTYPE, EIGTYPE>(alpha_, alpha); \
|
|
||||||
assign_scalar_eig2mkl<BLASTYPE, EIGTYPE>(beta_, EIGTYPE(1)); \
|
|
||||||
BLASFUNC(&uplo, &trans, &n, &k, &alpha_, lhs, &lda, &beta_, res, &ldc); \
|
|
||||||
} \
|
} \
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -115,9 +111,6 @@ struct general_matrix_matrix_rankupdate<Index,EIGTYPE,AStorageOrder,ConjugateA,C
|
|||||||
RTYPE alpha_, beta_; \
|
RTYPE alpha_, beta_; \
|
||||||
const EIGTYPE* a_ptr; \
|
const EIGTYPE* a_ptr; \
|
||||||
\
|
\
|
||||||
/* Set alpha_ & beta_ */ \
|
|
||||||
/* assign_scalar_eig2mkl<BLASTYPE, EIGTYPE>(alpha_, alpha); */\
|
|
||||||
/* assign_scalar_eig2mkl<BLASTYPE, EIGTYPE>(beta_, EIGTYPE(1));*/ \
|
|
||||||
alpha_ = alpha.real(); \
|
alpha_ = alpha.real(); \
|
||||||
beta_ = 1.0; \
|
beta_ = 1.0; \
|
||||||
/* Copy with conjugation in some cases*/ \
|
/* Copy with conjugation in some cases*/ \
|
||||||
|
@ -119,46 +119,6 @@ typedef int BlasIndex;
|
|||||||
typedef MKL_INT BlasIndex;
|
typedef MKL_INT BlasIndex;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace internal {
|
|
||||||
|
|
||||||
template<typename MKLType, typename EigenType>
|
|
||||||
static inline void assign_scalar_eig2mkl(MKLType& mklScalar, const EigenType& eigenScalar) {
|
|
||||||
mklScalar=eigenScalar;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<typename MKLType, typename EigenType>
|
|
||||||
static inline void assign_conj_scalar_eig2mkl(MKLType& mklScalar, const EigenType& eigenScalar) {
|
|
||||||
mklScalar=eigenScalar;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef EIGEN_USE_MKL
|
|
||||||
template <>
|
|
||||||
inline void assign_scalar_eig2mkl<MKL_Complex16,dcomplex>(MKL_Complex16& mklScalar, const dcomplex& eigenScalar) {
|
|
||||||
mklScalar.real=eigenScalar.real();
|
|
||||||
mklScalar.imag=eigenScalar.imag();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
inline void assign_scalar_eig2mkl<MKL_Complex8,scomplex>(MKL_Complex8& mklScalar, const scomplex& eigenScalar) {
|
|
||||||
mklScalar.real=eigenScalar.real();
|
|
||||||
mklScalar.imag=eigenScalar.imag();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
inline void assign_conj_scalar_eig2mkl<MKL_Complex16,dcomplex>(MKL_Complex16& mklScalar, const dcomplex& eigenScalar) {
|
|
||||||
mklScalar.real=eigenScalar.real();
|
|
||||||
mklScalar.imag=-eigenScalar.imag();
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
inline void assign_conj_scalar_eig2mkl<MKL_Complex8,scomplex>(MKL_Complex8& mklScalar, const scomplex& eigenScalar) {
|
|
||||||
mklScalar.real=eigenScalar.real();
|
|
||||||
mklScalar.imag=-eigenScalar.imag();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
} // end namespace internal
|
|
||||||
|
|
||||||
} // end namespace Eigen
|
} // end namespace Eigen
|
||||||
|
|
||||||
#if defined(EIGEN_USE_BLAS) && !defined(EIGEN_USE_MKL)
|
#if defined(EIGEN_USE_BLAS) && !defined(EIGEN_USE_MKL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user