Go to the documentation of this file.
11 #ifndef EIGEN_COMPLEX32_ALTIVEC_H
12 #define EIGEN_COMPLEX32_ALTIVEC_H
18 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ >= 12)
36 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
46 template<>
struct packet_traits<
std::
complex<float> > : default_packet_traits
71 template<>
struct packet_traits<
std::
complex<double> > : default_packet_traits
115 pstore<std::complex<double> >(to, from);
130 v1 = vec_madd(a_re,
b.v, p2d_ZERO);
132 v2 = vec_madd(a_im,
b.v, p2d_ZERO);
136 return Packet1cd(
v1 +
v2);
154 pstore<std::complex<double> >(&
res,
a);
187 kernel.packet[0].v = tmp;
199 pstore<std::complex<float> >(
res,
a);
205 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
209 res.cd[0] = Packet1cd(vec_ld2f((
const float *)&from));
217 if((std::ptrdiff_t(&from) % 16) == 0)
226 template<>
EIGEN_DEVICE_FUNC inline Packet2cf pgather<std::complex<float>, Packet2cf>(
const std::complex<float>* from,
Index stride)
229 af[0] = from[0*stride];
230 af[1] = from[1*stride];
233 template<>
EIGEN_DEVICE_FUNC inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to,
const Packet2cf& from,
Index stride)
236 pstore<std::complex<float> >((std::complex<float> *) af, from);
237 to[0*stride] = af[0];
238 to[1*stride] = af[1];
255 #if !defined(__ARCH__) || (defined(__ARCH__) && __ARCH__ < 12)
260 Packet2d tmp1 = { eq.v4f[0][1], eq.v4f[0][0] };
261 Packet2d tmp2 = { eq.v4f[1][1], eq.v4f[1][0] };
278 res.v.v4f[0] =
pmul(Packet1cd(
reinterpret_cast<Packet2d>(
a.v.v4f[0])), Packet1cd(
reinterpret_cast<Packet2d>(
b.v.v4f[0]))).v;
279 res.v.v4f[1] =
pmul(Packet1cd(
reinterpret_cast<Packet2d>(
a.v.v4f[1])), Packet1cd(
reinterpret_cast<Packet2d>(
b.v.v4f[1]))).v;
293 std::complex<float>
res;
295 vec_st2f(
b.v, (
float*)&
res);
301 std::complex<float>
res;
303 vec_st2f(
b.v, (
float*)&
res);
328 Packet1cd tmp = kernel.packet[0].cd[1];
329 kernel.packet[0].cd[1] = kernel.packet[1].cd[0];
330 kernel.packet[1].cd[0] = tmp;
333 template<>
EIGEN_STRONG_INLINE Packet2cf
pblend(
const Selector<2>& ifPacket,
const Packet2cf& thenPacket,
const Packet2cf& elsePacket) {
335 const Selector<4> ifPacket4 = { ifPacket.select[0], ifPacket.select[0], ifPacket.select[1], ifPacket.select[1] };
336 result.v = pblend<Packet4f>(ifPacket4, thenPacket.v, elsePacket.v);
342 Packet4f tmp = { eq[1], eq[0], eq[3], eq[2] };
357 prod_im = a_im *
b.v;
363 prod = pmadd<Packet4f>(a_re,
b.v, prod_im);
365 return Packet2cf(
prod);
372 return Packet2cf(rev_a);
378 b = vec_sld(
a.v,
a.v, 8);
387 b = vec_sld(
a.v,
a.v, 8);
412 kernel.packet[0].v = tmp;
415 template<>
EIGEN_STRONG_INLINE Packet2cf
pblend(
const Selector<2>& ifPacket,
const Packet2cf& thenPacket,
const Packet2cf& elsePacket) {
417 result.v =
reinterpret_cast<Packet4f>(pblend<Packet2d>(ifPacket,
reinterpret_cast<Packet2d>(thenPacket.v),
reinterpret_cast<Packet2d>(elsePacket.v)));
426 #endif // EIGEN_COMPLEX32_ALTIVEC_H
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
#define EIGEN_DEVICE_FUNC
Namespace containing all symbols from the Eigen library.
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
static Packet2d p2d_ZERO_
EIGEN_STRONG_INLINE Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
std::complex< double > type
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
EIGEN_STRONG_INLINE Packet4f psub< Packet4f >(const Packet4f &a, const Packet4f &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
EIGEN_STRONG_INLINE Packet2cf pcplxflip< Packet2cf >(const Packet2cf &x)
EIGEN_STRONG_INLINE std::complex< float > predux< Packet2cf >(const Packet2cf &a)
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_STRONG_INLINE Packet4f ploadu< Packet4f >(const float *from)
static Packet2ul p2ul_CONJ_XOR1
EIGEN_STRONG_INLINE Packet4f pload< Packet4f >(const float *from)
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
std::complex< float > type
static Packet16uc p16uc_PSET32_WEVEN
EIGEN_STRONG_INLINE Packet4f padd< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet1cd(const Packet2d &a)
#define EIGEN_DEBUG_UNALIGNED_STORE
static Packet16uc p16uc_REVERSE64
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
EIGEN_STRONG_INLINE Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet4f pandnot< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet4f pcmp_eq< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet1cd()
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
#define EIGEN_ZVECTOR_PREFETCH(ADDR)
__vector unsigned int Packet4ui
EIGEN_STRONG_INLINE Packet4f pmul< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet2cf pload< Packet2cf >(const std::complex< float > *from)
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
static Packet16uc p16uc_TRANSPOSE64_HI
EIGEN_STRONG_INLINE Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
#define EIGEN_DEBUG_ALIGNED_LOAD
#define EIGEN_STRONG_INLINE
EIGEN_STRONG_INLINE Packet2cf pmul< 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 Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
EIGEN_STRONG_INLINE Packet2cf()
static Packet4ui p4ui_CONJ_XOR
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
static Packet16uc p16uc_COMPLEX32_REV2
static Packet16uc p16uc_PSET32_WODD
static Packet16uc p16uc_PSET64_HI
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
#define EIGEN_DEBUG_UNALIGNED_LOAD
EIGEN_STRONG_INLINE Packet4f por< Packet4f >(const Packet4f &a, const Packet4f &b)
static Packet2ul p2ul_CONJ_XOR2
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet4f pand< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet1cd pcplxflip(const Packet1cd &x)
EIGEN_STRONG_INLINE Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
EIGEN_STRONG_INLINE Packet4f pxor< Packet4f >(const Packet4f &a, const Packet4f &b)
EIGEN_STRONG_INLINE Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
EIGEN_STRONG_INLINE Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
static Packet16uc p16uc_PSET64_LO
static Packet16uc p16uc_TRANSPOSE64_LO
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
#define EIGEN_DEBUG_ALIGNED_STORE
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
EIGEN_STRONG_INLINE Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
static Packet16uc p16uc_COMPLEX32_REV
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:11:16