11 #ifndef EIGEN_COMPLEX32_ALTIVEC_H 12 #define EIGEN_COMPLEX32_ALTIVEC_H 20 #if defined(_BIG_ENDIAN) 44 v1 = vec_madd(v1, b.
v, p4f_ZERO);
46 v2 = vec_madd(v2, b.
v, p4f_ZERO);
47 v2 =
reinterpret_cast<Packet4f>(
pxor(v2, reinterpret_cast<Packet4f>(p4ui_CONJ_XOR)));
115 if((std::ptrdiff_t(&from) % 16) == 0)
134 __asm__ (
"lxsdx %x0,%y1" :
"=wa" (res0) :
"Z" (*from0));
135 __asm__ (
"lxsdx %x0,%y1" :
"=wa" (res1) :
"Z" (*from1));
137 __asm__ (
"xxpermdi %x0, %x1, %x2, 0" :
"=wa" (res0) :
"wa" (res0),
"wa" (res1));
139 __asm__ (
"xxpermdi %x0, %x2, %x1, 0" :
"=wa" (res0) :
"wa" (res0),
"wa" (res1));
142 *
reinterpret_cast<std::complex<float> *
>(&res0) = *from0;
143 *
reinterpret_cast<std::complex<float> *
>(&res1) = *from1;
152 af[0] = from[0*stride];
153 af[1] = from[1*stride];
159 pstore<std::complex<float> >((std::complex<float> *) af, from);
160 to[0*stride] = af[0];
161 to[1*stride] = af[1];
179 pstore((
float *)&res, a.v);
194 b = vec_sld(a.v, a.v, 8);
203 b = vec_sld(a.v, a.v, 8);
239 result.
v =
reinterpret_cast<Packet4f>(pblend<Packet2d>(ifPacket,
reinterpret_cast<Packet2d>(thenPacket.
v), reinterpret_cast<Packet2d>(elsePacket.
v)));
246 return psqrt_complex<Packet2cf>(
a);
265 v1 = vec_madd(a_re, b.
v, p2d_ZERO);
267 v2 = vec_madd(a_im, b.
v, p2d_ZERO);
268 v2 =
reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(v2), reinterpret_cast<Packet4ui>(v2), 8));
269 v2 =
pxor(v2, reinterpret_cast<Packet2d>(p2ul_CONJ_XOR1));
275 v =
pmul(Packet1cd(*
this), b).
v;
279 return Packet1cd(*
this) *=
b;
287 return Packet1cd(*
this) +=
b;
294 return Packet1cd(*
this) -=
b;
297 return Packet1cd(-
v);
327 template<>
struct unpacket_traits<Packet1cd> {
typedef std::complex<double>
type;
enum {
size=1, alignment=
Aligned16, vectorizable=
true, masked_load_available=
false, masked_store_available=
false};
typedef Packet1cd
half;
typedef Packet2d as_real; };
331 template<>
EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> * to,
const Packet1cd& from) {
pstore((
double*)to, from.v); }
332 template<>
EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> * to,
const Packet1cd& from) {
pstoreu((
double*)to, from.v); }
337 template<>
EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(
const std::complex<double>* from,
Index)
341 template<>
EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to,
const Packet1cd& from,
Index)
343 pstore<std::complex<double> >(to, from);
349 template<>
EIGEN_STRONG_INLINE Packet1cd
pconj(
const Packet1cd& a) {
return Packet1cd(
pxor(a.
v, reinterpret_cast<Packet2d>(p2ul_CONJ_XOR2))); }
363 pstore<std::complex<double> >(
res,
a);
402 Packet2d eq_swapped =
reinterpret_cast<Packet2d>(vec_sld(reinterpret_cast<Packet4ui>(eq), reinterpret_cast<Packet4ui>(eq), 8));
404 return Packet1cd(vec_and(eq, eq_swapped));
409 return psqrt_complex<Packet1cd>(
a);
417 #endif // EIGEN_COMPLEX32_ALTIVEC_H static Packet16uc p16uc_REVERSE64
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
static Packet16uc p16uc_PSET32_WODD
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet8h pandnot(const Packet8h &a, const Packet8h &b)
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
Namespace containing all symbols from the Eigen library.
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)
EIGEN_STRONG_INLINE Packet8h pxor(const Packet8h &a, const Packet8h &b)
EIGEN_STRONG_INLINE Packet2cf & operator*=(const Packet2cf &b)
static Packet16uc p16uc_PSET32_WEVEN
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf & operator+=(const Packet2cf &b)
#define EIGEN_PPC_PREFETCH(ADDR)
static Packet4f p4f_MZERO
EIGEN_STRONG_INLINE Packet2cf operator-(void) const
EIGEN_STRONG_INLINE Packet2d padd< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_DEVICE_FUNC Packet padd(const Packet &a, const Packet &b)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
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 Packet2cf pload2(const std::complex< float > *from0, const std::complex< float > *from1)
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_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 Packet8h pand(const Packet8h &a, const Packet8h &b)
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_CONSTEXPR Index size(const T &x)
#define EIGEN_DEVICE_FUNC
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 operator+(const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2cf operator-(const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_DEVICE_FUNC Packet psub(const Packet &a, const Packet &b)
static Packet4ui p4ui_CONJ_XOR
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
EIGEN_STRONG_INLINE Packet1cd pcplxflip(const Packet1cd &x)
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 Packet8h por(const Packet8h &a, const Packet8h &b)
EIGEN_STRONG_INLINE Packet2cf pmul(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)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
static Packet16uc p16uc_PSET64_HI
EIGEN_STRONG_INLINE Packet2cf operator*(const Packet2cf &b) const
EIGEN_STRONG_INLINE Packet2cf & operator-=(const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf psqrt< Packet2cf >(const Packet2cf &a)
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 pcplxflip< Packet2cf >(const Packet2cf &x)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
static Packet2ul p2ul_CONJ_XOR2
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet1cd psqrt< Packet1cd >(const Packet1cd &a)