11 #ifndef EIGEN_COMPLEX32_ALTIVEC_H 12 #define EIGEN_COMPLEX32_ALTIVEC_H 20 #if defined(_BIG_ENDIAN) 68 if((std::ptrdiff_t(&from) % 16) == 0)
83 template<> EIGEN_DEVICE_FUNC
inline Packet2cf pgather<std::complex<float>,
Packet2cf>(
const std::complex<float>* from,
Index stride)
86 af[0] = from[0*stride];
87 af[1] = from[1*stride];
90 template<> EIGEN_DEVICE_FUNC
inline void pscatter<std::complex<float>,
Packet2cf>(std::complex<float>* to,
const Packet2cf& from,
Index stride)
93 pstore<std::complex<float> >((std::complex<float> *) af, from);
112 v1 = vec_madd(v1,
b.v, p4f_ZERO);
114 v2 = vec_madd(v2,
b.v, p4f_ZERO);
115 v2 =
reinterpret_cast<Packet4f>(
pxor(v2, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR)));
132 pstore((
float *)&res, a.v);
147 b = vec_sld(a.v, a.v, 8);
156 b1 = vec_sld(vecs[0].
v, vecs[1].v, 8);
157 b2 = vec_sld(vecs[1].v, vecs[0].v, 8);
159 b1 = vec_sld(vecs[1].v, vecs[0].v, 8);
160 b2 = vec_sld(vecs[0].v, vecs[1].v, 8);
162 b2 = vec_sld(b2, b2, 8);
172 b = vec_sld(a.v, a.v, 8);
186 first.
v = vec_sld(first.
v, second.
v, 8);
188 first.
v = vec_sld(second.
v, first.
v, 8);
268 result.
v =
reinterpret_cast<Packet4f>(pblend<Packet2d>(ifPacket,
reinterpret_cast<Packet2d>(thenPacket.
v), reinterpret_cast<Packet2d>(elsePacket.
v)));
309 template<>
EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> * to,
const Packet1cd& from) {
pstore((
double*)to, from.v); }
310 template<>
EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> * to,
const Packet1cd& from) {
pstoreu((
double*)to, from.v); }
315 template<> EIGEN_DEVICE_FUNC
inline Packet1cd pgather<std::complex<double>, Packet1cd>(
const std::complex<double>* from,
Index stride)
318 af[0] = from[0*stride];
319 af[1] = from[1*stride];
322 template<> EIGEN_DEVICE_FUNC
inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to,
const Packet1cd& from,
Index stride)
325 pstore<std::complex<double> >(af, from);
326 to[0*stride] = af[0];
327 to[1*stride] = af[1];
333 template<>
EIGEN_STRONG_INLINE Packet1cd
pconj(
const Packet1cd& a) {
return Packet1cd(
pxor(a.
v, reinterpret_cast<Packet2d>(p2ul_CONJ_XOR2))); }
344 v1 = vec_madd(a_re,
b.v, p2d_ZERO);
346 v2 = vec_madd(a_im,
b.v, p2d_ZERO);
347 v2 =
reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(v2), reinterpret_cast<Packet4ui>(v2), 8));
348 v2 =
pxor(v2, reinterpret_cast<Packet2d>(p2ul_CONJ_XOR1));
365 pstore<std::complex<double> >(res, a);
387 template<>
struct conj_helper<Packet1cd, Packet1cd, false,true>
398 template<>
struct conj_helper<Packet1cd, Packet1cd, true,false>
409 template<>
struct conj_helper<Packet1cd, Packet1cd, true,true>
419 template<>
struct conj_helper<Packet2d, Packet1cd, false,false>
428 template<>
struct conj_helper<Packet1cd, Packet2d, false,false>
461 #endif // EIGEN_COMPLEX32_ALTIVEC_H static Packet16uc p16uc_REVERSE64
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet4f &x, const Packet2cf &y, const Packet2cf &c) const
EIGEN_STRONG_INLINE Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
EIGEN_STRONG_INLINE Packet4f pxor< Packet4f >(const Packet4f &a, const Packet4f &b)
#define EIGEN_STRONG_INLINE
EIGEN_DEVICE_FUNC Packet por(const Packet &a, const Packet &b)
static Packet16uc p16uc_PSET32_WODD
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf preduxp< Packet2cf >(const Packet2cf *vecs)
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet1cd preduxp< Packet1cd >(const Packet1cd *vecs)
EIGEN_STRONG_INLINE Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
static Packet16uc p16uc_TRANSPOSE64_LO
static Packet16uc p16uc_COMPLEX32_REV2
EIGEN_STRONG_INLINE Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
__vector unsigned int Packet4ui
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
static constexpr size_t size(Tuple< Args... > &)
Provides access to the number of elements in a tuple as a compile-time constant expression.
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
EIGEN_STRONG_INLINE Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf pload< Packet2cf >(const std::complex< float > *from)
EIGEN_STRONG_INLINE Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
EIGEN_STRONG_INLINE Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
static Packet16uc p16uc_PSET32_WEVEN
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
EIGEN_STRONG_INLINE Packet2cf pcplxflip(const Packet2cf &x)
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
#define EIGEN_PPC_PREFETCH(ADDR)
static Packet4f p4f_MZERO
EIGEN_STRONG_INLINE Packet2d padd< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet2cf &y, const Packet2cf &c) const
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
__vector unsigned long long Packet2ul
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet4f &x, const Packet2cf &y) const
EIGEN_STRONG_INLINE Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf()
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
EIGEN_STRONG_INLINE Packet4f por< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_DEVICE_FUNC unpacket_traits< Packet >::type pfirst(const Packet &a)
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
EIGEN_STRONG_INLINE Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &b)
static Packet16uc p16uc_COMPLEX32_REV
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &a, const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
EIGEN_STRONG_INLINE std::complex< float > predux< Packet2cf >(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
EIGEN_STRONG_INLINE Packet4f pmul< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2cf pmadd(const Packet2cf &x, const Packet4f &y, const Packet2cf &c) const
static EIGEN_STRONG_INLINE void run(Packet2cf &first, const Packet2cf &second)
EIGEN_STRONG_INLINE Packet2cf pmul(const Packet2cf &x, const Packet4f &y) const
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_DEVICE_FUNC Packet pandnot(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet4f pmadd(const Packet4f &a, const Packet4f &b, const Packet4f &c)
static Packet4ui p4ui_CONJ_XOR
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
EIGEN_DEVICE_FUNC Packet pxor(const Packet &a, const Packet &b)
std::complex< float > type
EIGEN_STRONG_INLINE Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
static Packet2ul p2ul_CONJ_XOR1
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
void run(Expr &expr, Dev &dev)
static Packet16uc p16uc_PSET64_HI
EIGEN_DEVICE_FUNC const Scalar & b
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
static Packet16uc p16uc_TRANSPOSE64_HI
static Packet16uc p16uc_PSET64_LO
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet4i pblend(const Selector< 4 > &ifPacket, const Packet4i &thenPacket, const Packet4i &elsePacket)
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
EIGEN_STRONG_INLINE Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_DEVICE_FUNC Packet pand(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2cf pcplxflip< Packet2cf >(const Packet2cf &x)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
static Packet2ul p2ul_CONJ_XOR2
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)