11 #ifndef EIGEN_GENERIC_PACKET_MATH_H 12 #define EIGEN_GENERIC_PACKET_MATH_H 26 #ifndef EIGEN_DEBUG_ALIGNED_LOAD 27 #define EIGEN_DEBUG_ALIGNED_LOAD 30 #ifndef EIGEN_DEBUG_UNALIGNED_LOAD 31 #define EIGEN_DEBUG_UNALIGNED_LOAD 34 #ifndef EIGEN_DEBUG_ALIGNED_STORE 35 #define EIGEN_DEBUG_ALIGNED_STORE 38 #ifndef EIGEN_DEBUG_UNALIGNED_STORE 39 #define EIGEN_DEBUG_UNALIGNED_STORE 94 template<
typename Packet>
inline Packet
96 const Packet& b) {
return a+b; }
99 template<
typename Packet>
inline Packet
101 const Packet& b) {
return a-b; }
104 template<
typename Packet>
inline Packet
108 template<
typename Packet>
inline Packet
109 pconj(
const Packet& a) {
return numext::conj(a); }
112 template<
typename Packet>
inline Packet
114 const Packet& b) {
return a*b; }
117 template<
typename Packet>
inline Packet
119 const Packet& b) {
return a/b; }
122 template<
typename Packet>
inline Packet
124 const Packet& b) {
using std::min;
return (
min)(a, b); }
127 template<
typename Packet>
inline Packet
129 const Packet& b) {
using std::max;
return (max)(a, b); }
132 template<
typename Packet>
inline Packet
136 template<
typename Packet>
inline Packet
137 pand(
const Packet& a,
const Packet& b) {
return a & b; }
140 template<
typename Packet>
inline Packet
141 por(
const Packet& a,
const Packet& b) {
return a | b; }
144 template<
typename Packet>
inline Packet
145 pxor(
const Packet& a,
const Packet& b) {
return a ^ b; }
148 template<
typename Packet>
inline Packet
149 pandnot(
const Packet& a,
const Packet& b) {
return a & (!b); }
152 template<
typename Packet>
inline Packet
156 template<
typename Packet>
inline Packet
164 template<
typename Packet>
inline Packet
168 template<
typename Packet>
inline Packet
173 plset(
const Scalar& a) {
return a; }
176 template<
typename Scalar,
typename Packet>
inline void pstore(Scalar* to,
const Packet& from)
180 template<
typename Scalar,
typename Packet>
inline void pstoreu(Scalar* to,
const Packet& from)
184 template<
typename Scalar>
inline void prefetch(
const Scalar* addr)
186 #if !defined(_MSC_VER) 187 __builtin_prefetch(addr);
196 template<
typename Packet>
inline Packet
197 preduxp(
const Packet* vecs) {
return vecs[0]; }
216 template<
typename Packet>
inline Packet
preverse(
const Packet& a)
221 template<
typename Packet>
inline Packet
pcplxflip(
const Packet& a)
271 template<
typename Packet>
274 pstore(to, pset1<Packet>(a));
278 template<
typename Packet>
inline Packet
286 template<
typename Packet,
int LoadMode>
290 return pload<Packet>(from);
292 return ploadu<Packet>(from);
297 template<
typename Scalar,
typename Packet,
int LoadMode>
298 inline void pstoret(Scalar* to,
const Packet& from)
307 template<
int Offset,
typename PacketType>
311 static inline void run(PacketType&,
const PacketType&) {}
329 template<
int Offset,
typename PacketType>
330 inline void palign(PacketType& first,
const PacketType& second)
339 template<>
inline std::complex<float>
pmul(
const std::complex<float>& a,
const std::complex<float>& b)
342 template<>
inline std::complex<double>
pmul(
const std::complex<double>& a,
const std::complex<double>& b)
349 #endif // EIGEN_GENERIC_PACKET_MATH_H
unpacket_traits< Packet >::type predux_min(const Packet &a)
void palign(PacketType &first, const PacketType &second)
unpacket_traits< Packet >::type predux_mul(const Packet &a)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pasin(const Packet &a)
Packet pload(const typename unpacket_traits< Packet >::type *from)
Packet ploaddup(const typename unpacket_traits< Packet >::type *from)
#define EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psqrt(const Packet &a)
Packet preduxp(const Packet *vecs)
const ImagReturnType imag() const
Packet pand(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2cf pcplxflip(const Packet2cf &x)
void pstore(Scalar *to, const Packet &from)
Packet pmax(const Packet &a, const Packet &b)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pexp(const Packet &a)
EIGEN_STRONG_INLINE const CwiseUnaryOp< internal::scalar_abs_op< Scalar >, const Derived > abs() const
RealReturnType real() const
void pstoret(Scalar *to, const Packet &from)
void pstoreu(Scalar *to, const Packet &from)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet ptan(const Packet &a)
void prefetch(const Scalar *addr)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pacos(const Packet &a)
const CwiseUnaryOp< internal::scalar_tan_op< Scalar >, Derived > tan() const
Packet psub(const Packet &a, const Packet &b)
void pstore1(typename unpacket_traits< Packet >::type *to, const typename unpacket_traits< Packet >::type &a)
Packet pmin(const Packet &a, const Packet &b)
unpacket_traits< Packet >::type pfirst(const Packet &a)
const CwiseUnaryOp< internal::scalar_log_op< Scalar >, const Derived > log() const
unpacket_traits< Packet >::type predux(const Packet &a)
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
const CwiseUnaryOp< internal::scalar_sin_op< Scalar >, const Derived > sin() const
Packet por(const Packet &a, const Packet &b)
Packet pxor(const Packet &a, const Packet &b)
Packet pdiv(const Packet &a, const Packet &b)
unpacket_traits< Packet >::type predux_max(const Packet &a)
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
Packet ploadu(const typename unpacket_traits< Packet >::type *from)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plog(const Packet &a)
Packet pset1(const typename unpacket_traits< Packet >::type &a)
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
Packet pmul(const Packet &a, const Packet &b)
Packet ploadt(const typename unpacket_traits< Packet >::type *from)
const CwiseUnaryOp< internal::scalar_cos_op< Scalar >, const Derived > cos() const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pcos(const Packet &a)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psin(const Packet &a)
const CwiseUnaryOp< internal::scalar_sqrt_op< Scalar >, const Derived > sqrt() const
const CwiseUnaryOp< internal::scalar_exp_op< Scalar >, const Derived > exp() const
const CwiseUnaryOp< internal::scalar_asin_op< Scalar >, const Derived > asin() const
static void run(PacketType &, const PacketType &)
const CwiseUnaryOp< internal::scalar_acos_op< Scalar >, const Derived > acos() const
Packet pandnot(const Packet &a, const Packet &b)
Packet padd(const Packet &a, const Packet &b)
packet_traits< Scalar >::type plset(const Scalar &a)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f &a)