11#ifndef EIGEN_ARCH_CONJ_HELPER_H
12#define EIGEN_ARCH_CONJ_HELPER_H
14#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL) \
16 struct conj_helper<PACKET_REAL, PACKET_CPLX, false, false> { \
17 EIGEN_STRONG_INLINE PACKET_CPLX pmadd(const PACKET_REAL& x, \
18 const PACKET_CPLX& y, \
19 const PACKET_CPLX& c) const { \
20 return padd(c, this->pmul(x, y)); \
22 EIGEN_STRONG_INLINE PACKET_CPLX pmul(const PACKET_REAL& x, \
23 const PACKET_CPLX& y) const { \
24 return PACKET_CPLX(Eigen::internal::pmul<PACKET_REAL>(x, y.v)); \
29 struct conj_helper<PACKET_CPLX, PACKET_REAL, false, false> { \
30 EIGEN_STRONG_INLINE PACKET_CPLX pmadd(const PACKET_CPLX& x, \
31 const PACKET_REAL& y, \
32 const PACKET_CPLX& c) const { \
33 return padd(c, this->pmul(x, y)); \
35 EIGEN_STRONG_INLINE PACKET_CPLX pmul(const PACKET_CPLX& x, \
36 const PACKET_REAL& y) const { \
37 return PACKET_CPLX(Eigen::internal::pmul<PACKET_REAL>(x.v, y)); \
48 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T operator()(
const T& x)
const {
return numext::conj(x); }
50 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE T pconj(
const T& x)
const {
return internal::pconj(x); }
55 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const T& operator()(
const T& x)
const {
return x; }
57 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
const T& pconj(
const T& x)
const {
return x; }
62template<
typename LhsType,
typename RhsType,
bool ConjLhs,
bool ConjRhs>
66 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType
67 pmadd(
const LhsType& x,
const RhsType& y,
const ResultType& c)
const
68 {
return this->pmul(x, y) + c; }
70 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType
75template<
typename LhsScalar,
typename RhsScalar>
79 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType
80 pmadd(
const LhsScalar& x,
const RhsScalar& y,
const ResultType& c)
const
81 {
return this->pmul(x, y) + c; }
84 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE ResultType
85 pmul(
const LhsScalar& x,
const RhsScalar& y)
const
86 {
return numext::conj(x * y); }
90template<
typename Packet,
bool ConjLhs,
bool ConjRhs>
98 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Packet pmul(
const Packet& x,
const Packet& y)
const
102template<
typename Packet>
108 {
return Eigen::internal::pmadd(pconj(x), pconj(y), c); }
110 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
Packet pmul(
const Packet& x,
const Packet& y)
const
111 {
return pconj(Eigen::internal::pmul(x, y)); }
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
Determines whether the given binary operation of two numeric types is allowed and what the scalar ret...
Definition XprHelper.h:806
Definition ConjHelper.h:63
Definition ConjHelper.h:44
Definition PacketMath.h:47