11#ifndef EIGEN_COMPLEX_NEON_H
12#define EIGEN_COMPLEX_NEON_H
18inline uint32x4_t p4ui_CONJ_XOR()
21#if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML
22 uint32x4_t
ret = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 };
25 static const uint32_t conj_XOR_DATA[] = { 0x00000000, 0x80000000, 0x00000000, 0x80000000 };
26 return vld1q_u32( conj_XOR_DATA );
32 static const uint32_t
conj_XOR_DATA[] = { 0x00000000, 0x80000000 };
51template<>
struct packet_traits<
std::
complex<float> > : default_packet_traits
77 typedef std::complex<float>
type;
89template<>
struct unpacket_traits<Packet2cf>
91 typedef std::complex<float>
type;
249 const std::complex<float>*
from,
Index stride)
255 const std::complex<float>*
from,
Index stride)
301 std::complex<float>
s;
307 std::complex<float>
s;
314 std::complex<float>
s;
321 std::complex<float>
s;
376 Packet4f tmp = vcombine_f32(vget_high_f32(kernel.packet[0].v), vget_high_f32(kernel.packet[1].v));
377 kernel.packet[0].v = vcombine_f32(vget_low_f32(kernel.packet[0].v), vget_low_f32(kernel.packet[1].v));
378 kernel.packet[1].v = tmp;
390#if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG
393#if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML
394 static uint64x2_t p2ul_CONJ_XOR = {0x0, 0x8000000000000000};
396 const uint64_t p2ul_conj_XOR_DATA[] = { 0x0, 0x8000000000000000 };
397 static uint64x2_t p2ul_CONJ_XOR = vld1q_u64( p2ul_conj_XOR_DATA );
407template<>
struct packet_traits<
std::
complex<double> > : default_packet_traits
409 typedef Packet1cd
type;
410 typedef Packet1cd
half;
431template<>
struct unpacket_traits<Packet1cd>
433 typedef std::complex<double>
type;
434 typedef Packet1cd
half;
465{
return Packet1cd(pnegate<Packet2d>(
a.v)); }
468{
return Packet1cd(vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(
a.v), p2ul_CONJ_XOR))); }
475 v1 = vdupq_lane_f64(vget_low_f64(
a.v), 0);
477 v2 = vdupq_lane_f64(vget_high_f64(
a.v), 0);
479 v1 = vmulq_f64(
v1,
b.v);
481 v2 = vmulq_f64(
v2,
b.v);
483 v2 = vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(
v2), p2ul_CONJ_XOR));
485 v2 = preverse<Packet2d>(
v2);
487 return Packet1cd(vaddq_f64(
v1,
v2));
497 Packet2d eq_swapped = vreinterpretq_f64_u32(vrev64q_u32(vreinterpretq_u32_f64(eq)));
503{
return Packet1cd(vreinterpretq_f64_u64(vandq_u64(vreinterpretq_u64_f64(
a.v),vreinterpretq_u64_f64(
b.v)))); }
506{
return Packet1cd(vreinterpretq_f64_u64(vorrq_u64(vreinterpretq_u64_f64(
a.v),vreinterpretq_u64_f64(
b.v)))); }
509{
return Packet1cd(vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(
a.v),vreinterpretq_u64_f64(
b.v)))); }
512{
return Packet1cd(vreinterpretq_f64_u64(vbicq_u64(vreinterpretq_u64_f64(
a.v),vreinterpretq_u64_f64(
b.v)))); }
517template<>
EIGEN_STRONG_INLINE void pstore <std::complex<double> >(std::complex<double> *to,
const Packet1cd& from)
520template<>
EIGEN_STRONG_INLINE void pstoreu<std::complex<double> >(std::complex<double> *to,
const Packet1cd& from)
523template<>
EIGEN_STRONG_INLINE void prefetch<std::complex<double> >(
const std::complex<double> *addr)
526template<>
EIGEN_DEVICE_FUNC inline Packet1cd pgather<std::complex<double>, Packet1cd>(
527 const std::complex<double>* from,
Index stride)
530 res = vsetq_lane_f64(std::real(from[0*stride]),
res, 0);
531 res = vsetq_lane_f64(std::imag(from[0*stride]),
res, 1);
532 return Packet1cd(
res);
535template<>
EIGEN_DEVICE_FUNC inline void pscatter<std::complex<double>, Packet1cd>(
536 std::complex<double>* to,
const Packet1cd& from,
Index stride)
537{ to[stride*0] = std::complex<double>(vgetq_lane_f64(from.v, 0), vgetq_lane_f64(from.v, 1)); }
542 pstore<std::complex<double> >(&
res,
a);
569 Packet2d tmp = vcombine_f64(vget_high_f64(kernel.packet[0].v), vget_high_f64(kernel.packet[1].v));
570 kernel.packet[0].v = vcombine_f64(vget_low_f64(kernel.packet[0].v), vget_low_f64(kernel.packet[1].v));
571 kernel.packet[1].v = tmp;
575 return psqrt_complex<Packet1cd>(
a);
ArrayXXi a
Definition Array_initializer_list_23_cxx11.cpp:1
#define EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(PACKET_CPLX, PACKET_REAL)
Definition ConjHelper.h:14
#define EIGEN_DEBUG_ALIGNED_STORE
Definition GenericPacketMath.h:35
#define EIGEN_DEBUG_ALIGNED_LOAD
Definition GenericPacketMath.h:27
#define EIGEN_DEBUG_UNALIGNED_STORE
Definition GenericPacketMath.h:39
#define EIGEN_DEBUG_UNALIGNED_LOAD
Definition GenericPacketMath.h:31
#define EIGEN_DEVICE_FUNC
Definition Macros.h:976
#define EIGEN_STRONG_INLINE
Definition Macros.h:917
#define EIGEN_ARM_PREFETCH(ADDR)
Definition PacketMath.h:162
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
Definition PartialRedux_count.cpp:3
M1<< 1, 2, 3, 4, 5, 6, 7, 8, 9;Map< RowVectorXf > v1(M1.data(), M1.size())
Map< RowVectorXf > v2(M2.data(), M2.size())
Scalar * b
Definition benchVecAdd.cpp:17
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
Definition gnuplot_common_settings.hh:12
@ Aligned16
Definition Constants.h:235
RealScalar s
Definition level1_cplx_impl.h:126
DenseIndex ret
Definition level1_cplx_impl.h:44
EIGEN_STRONG_INLINE std::complex< float > predux< Packet1cf >(const Packet1cf &a)
Definition Complex.h:299
uint32x2_t p2ui_CONJ_XOR()
Definition Complex.h:30
v2f64 Packet2d
Definition PacketMath.h:820
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
Definition Complex.h:167
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet2cf >(const Packet2cf &a)
Definition Complex.h:199
EIGEN_STRONG_INLINE std::complex< float > predux< Packet2cf >(const Packet2cf &a)
Definition Complex.h:191
EIGEN_STRONG_INLINE Packet2d padd< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:880
uint32x2_t Packet2ui
Definition PacketMath.h:76
EIGEN_STRONG_INLINE Packet2cf psqrt< Packet2cf >(const Packet2cf &a)
Definition Complex.h:244
EIGEN_STRONG_INLINE Packet4f pcmp_eq< Packet4f >(const Packet4f &a, const Packet4f &b)
Definition PacketMath.h:1400
EIGEN_STRONG_INLINE std::complex< double > predux_mul< Packet1cd >(const Packet1cd &a)
Definition Complex.h:605
EIGEN_STRONG_INLINE Packet2cf pandnot< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:172
EIGEN_STRONG_INLINE Packet1cf psqrt< Packet1cf >(const Packet1cf &a)
Definition Complex.h:381
EIGEN_STRONG_INLINE Packet1cf padd< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition Complex.h:117
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet1cf >(const Packet1cf &a)
Definition Complex.h:277
EIGEN_STRONG_INLINE Packet2d pand< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:939
EIGEN_STRONG_INLINE Packet2f pcmp_eq< Packet2f >(const Packet2f &a, const Packet2f &b)
Definition PacketMath.h:1398
EIGEN_STRONG_INLINE Packet1cd psqrt< Packet1cd >(const Packet1cd &a)
Definition Complex.h:340
EIGEN_STRONG_INLINE void ptranspose(PacketBlock< Packet2cf, 2 > &kernel)
Definition Complex.h:224
EIGEN_STRONG_INLINE Packet1cf por< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition Complex.h:208
EIGEN_STRONG_INLINE Packet2cf ploaddup< Packet2cf >(const std::complex< float > *from)
Definition Complex.h:125
EIGEN_STRONG_INLINE std::complex< float > predux_mul< Packet1cf >(const Packet1cf &a)
Definition Complex.h:312
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:244
EIGEN_STRONG_INLINE Packet1cf pand< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition Complex.h:203
EIGEN_STRONG_INLINE Packet2cf pmul< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:173
EIGEN_STRONG_INLINE Packet1cd pmul< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition Complex.h:498
EIGEN_STRONG_INLINE Packet2d pset1< Packet2d >(const double &from)
Definition PacketMath.h:872
EIGEN_STRONG_INLINE std::complex< float > pfirst< Packet2cf >(const Packet2cf &a)
Definition Complex.h:176
EIGEN_STRONG_INLINE Packet1cd ploadu< Packet1cd >(const std::complex< double > *from)
Definition Complex.h:456
EIGEN_STRONG_INLINE Packet2cf por< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:170
EIGEN_STRONG_INLINE Packet2cf pset1< Packet2cf >(const std::complex< float > &from)
Definition Complex.h:112
EIGEN_STRONG_INLINE Packet1cf pcast< float, Packet1cf >(const float &a)
Definition Complex.h:104
__vector unsigned int Packet4ui
Definition PacketMath.h:32
EIGEN_STRONG_INLINE Packet2cf preverse(const Packet2cf &a)
Definition Complex.h:184
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
Definition GenericPacketMath.h:237
EIGEN_STRONG_INLINE Packet1cd pcplxflip(const Packet1cd &x)
Definition Complex.h:620
EIGEN_STRONG_INLINE Packet2d pload< Packet2d >(const double *from)
Definition PacketMath.h:967
EIGEN_STRONG_INLINE Packet1cf pload< Packet1cf >(const std::complex< float > *from)
Definition Complex.h:223
EIGEN_STRONG_INLINE Packet2d pmul< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:916
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
Definition Complex.h:166
EIGEN_STRONG_INLINE Packet1cd pxor< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition Complex.h:519
EIGEN_STRONG_INLINE Packet2cf pdiv< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:211
EIGEN_STRONG_INLINE Packet1cf ploaddup< Packet1cf >(const std::complex< float > *from)
Definition Complex.h:233
EIGEN_STRONG_INLINE Packet1cf ploadu< Packet1cf >(const std::complex< float > *from)
Definition Complex.h:228
EIGEN_STRONG_INLINE Packet1cd padd< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition Complex.h:470
EIGEN_STRONG_INLINE Packet2cf ploadu< Packet2cf >(const std::complex< float > *from)
Definition Complex.h:124
EIGEN_STRONG_INLINE Packet1cf pset1< Packet1cf >(const std::complex< float > &from)
Definition Complex.h:109
EIGEN_STRONG_INLINE Packet1cf pcplxflip< Packet1cf >(const Packet1cf &a)
Definition Complex.h:294
EIGEN_STRONG_INLINE Packet1cf pmul< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition Complex.h:141
EIGEN_STRONG_INLINE Packet1cd ploaddup< Packet1cd >(const std::complex< double > *from)
Definition Complex.h:533
EIGEN_STRONG_INLINE Packet2cf pload< Packet2cf >(const std::complex< float > *from)
Definition Complex.h:123
EIGEN_STRONG_INLINE Packet1cf pandnot< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition Complex.h:218
EIGEN_STRONG_INLINE bfloat16 pfirst(const Packet8bf &a)
Definition PacketMath.h:1429
EIGEN_STRONG_INLINE std::complex< double > predux< Packet1cd >(const Packet1cd &a)
Definition Complex.h:598
float32x2_t Packet2f
Definition PacketMath.h:62
EIGEN_DEVICE_FUNC void pstore(Scalar *to, const Packet &from)
Definition GenericPacketMath.h:696
EIGEN_STRONG_INLINE Packet2d ploadu< Packet2d >(const double *from)
Definition PacketMath.h:1004
EIGEN_STRONG_INLINE Packet2cf pcast< Packet2f, Packet2cf >(const Packet2f &a)
Definition Complex.h:106
EIGEN_STRONG_INLINE Packet1cd pload< Packet1cd >(const std::complex< double > *from)
Definition Complex.h:449
EIGEN_STRONG_INLINE Packet2cf pcplxflip< Packet2cf >(const Packet2cf &x)
Definition Complex.h:219
EIGEN_STRONG_INLINE Packet1cd pand< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition Complex.h:505
EIGEN_STRONG_INLINE Packet2cf pand< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:169
EIGEN_STRONG_INLINE Packet2cf pcmp_eq(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:231
EIGEN_STRONG_INLINE Packet1cd pandnot< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition Complex.h:526
EIGEN_DEVICE_FUNC void pstoreu(Scalar *to, const Packet &from)
Definition GenericPacketMath.h:700
EIGEN_STRONG_INLINE Packet2cf pxor< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:171
EIGEN_STRONG_INLINE Packet2cf psub< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:165
EIGEN_STRONG_INLINE Packet1cf pxor< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition Complex.h:213
EIGEN_STRONG_INLINE Packet2cf padd< Packet2cf >(const Packet2cf &a, const Packet2cf &b)
Definition Complex.h:164
EIGEN_STRONG_INLINE Packet1cd por< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition Complex.h:512
__vector float Packet4f
Definition PacketMath.h:30
EIGEN_STRONG_INLINE Packet2d psub< Packet2d >(const Packet2d &a, const Packet2d &b)
Definition PacketMath.h:895
EIGEN_STRONG_INLINE Packet1cd pset1< Packet1cd >(const std::complex< double > &from)
Definition Complex.h:463
EIGEN_STRONG_INLINE std::complex< double > pfirst< Packet1cd >(const Packet1cd &a)
Definition Complex.h:584
EIGEN_STRONG_INLINE Packet1cd pdiv< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition Complex.h:614
EIGEN_STRONG_INLINE Packet1cf psub< Packet1cf >(const Packet1cf &a, const Packet1cf &b)
Definition Complex.h:122
EIGEN_STRONG_INLINE Packet1cd psub< Packet1cd >(const Packet1cd &a, const Packet1cd &b)
Definition Complex.h:477
::uint32_t uint32_t
Definition Meta.h:56
Namespace containing all symbols from the Eigen library.
Definition bench_norm.cpp:85
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
const Product< Lhs, Rhs > prod(const Lhs &lhs, const Rhs &rhs)
Definition evaluators.cpp:8
Definition BandTriangularSolver.h:13
EIGEN_STRONG_INLINE Packet1cd()
Definition Complex.h:342
Packet2d v
Definition Complex.h:410
EIGEN_STRONG_INLINE Packet1cf()
Definition Complex.h:40
Packet2f v
Definition Complex.h:42
EIGEN_STRONG_INLINE Packet1cf(const Packet2f &a)
Definition Complex.h:41
Packet4f v
Definition Complex.h:80
EIGEN_STRONG_INLINE Packet2cf()
Definition Complex.h:46
EIGEN_STRONG_INLINE Packet2cf(const Packet4f &a)
Definition Complex.h:47
@ HasDiv
Definition GenericPacketMath.h:65
Packet2cf type
Definition Complex.h:53
Packet1cf half
Definition Complex.h:54
@ HasSub
Definition GenericPacketMath.h:118
@ HasMax
Definition GenericPacketMath.h:124
@ HasNegate
Definition GenericPacketMath.h:120
@ HasMul
Definition GenericPacketMath.h:119
@ HasAdd
Definition GenericPacketMath.h:117
@ HasSetLinear
Definition GenericPacketMath.h:126
@ HasMin
Definition GenericPacketMath.h:123
@ HasAbs2
Definition GenericPacketMath.h:122
@ HasAbs
Definition GenericPacketMath.h:121
T type
Definition GenericPacketMath.h:108
T half
Definition GenericPacketMath.h:109
@ HasHalfPacket
Definition GenericPacketMath.h:114
@ size
Definition GenericPacketMath.h:112
@ AlignedOnScalar
Definition GenericPacketMath.h:113
@ Vectorizable
Definition GenericPacketMath.h:111
Definition ForwardDeclarations.h:17
Packet2f as_real
Definition Complex.h:79
Packet1cf half
Definition Complex.h:78
std::complex< float > type
Definition Complex.h:77
std::complex< float > type
Definition Complex.h:91
Packet4f as_real
Definition Complex.h:93
Packet1cf half
Definition Complex.h:92
Definition GenericPacketMath.h:133
T type
Definition GenericPacketMath.h:134
T half
Definition GenericPacketMath.h:135
@ masked_load_available
Definition GenericPacketMath.h:141
@ size
Definition GenericPacketMath.h:138
@ masked_store_available
Definition GenericPacketMath.h:142
@ vectorizable
Definition GenericPacketMath.h:140
@ alignment
Definition GenericPacketMath.h:139
Definition datatypes.h:12