12#ifndef EIGEN_COMPLEX_NEON_H
13#define EIGEN_COMPLEX_NEON_H
16#include "../../InternalHeaderCheck.h"
22EIGEN_GCC_FAST_MATH_COMPLEX_VECTORIZE_WORKAROUND_PUSH
24inline uint32x4_t p4ui_CONJ_XOR() {
26#if EIGEN_COMP_CLANG || EIGEN_COMP_CASTXML
27 uint32x4_t ret = {0x00000000, 0x80000000, 0x00000000, 0x80000000};
30 static const uint32_t conj_XOR_DATA[] = {0x00000000, 0x80000000, 0x00000000, 0x80000000};
31 return vld1q_u32(conj_XOR_DATA);
35inline uint32x2_t p2ui_CONJ_XOR() {
36 static const uint32_t conj_XOR_DATA[] = {0x00000000, 0x80000000};
37 return vld1_u32(conj_XOR_DATA);
43 EIGEN_STRONG_INLINE Packet1cf() {}
44 EIGEN_STRONG_INLINE
explicit Packet1cf(
const Packet2f& a) : v(a) {}
48 EIGEN_STRONG_INLINE Packet2cf() {}
49 EIGEN_STRONG_INLINE
explicit Packet2cf(
const Packet4f& a) : v(a) {}
54struct packet_traits<std::complex<float>> : default_packet_traits {
55 typedef Packet2cf type;
56 typedef Packet1cf half;
79struct unpacket_traits<Packet1cf> : neon_unpacket_default<Packet1cf, std::complex<float>> {
80 using as_real = Packet2f;
83struct unpacket_traits<Packet2cf> : neon_unpacket_default<Packet2cf, std::complex<float>> {
84 using half = Packet1cf;
85 using as_real = Packet4f;
89EIGEN_STRONG_INLINE Packet1cf pcast<float, Packet1cf>(
const float& a) {
90 return Packet1cf(vset_lane_f32(a, vdup_n_f32(0.f), 0));
93EIGEN_STRONG_INLINE Packet2cf pcast<Packet2f, Packet2cf>(
const Packet2f& a) {
94 return Packet2cf(vreinterpretq_f32_u64(vmovl_u32(vreinterpret_u32_f32(a))));
98EIGEN_STRONG_INLINE Packet1cf pzero(
const Packet1cf& ) {
99 return Packet1cf(vdup_n_f32(0.0f));
103EIGEN_STRONG_INLINE Packet2cf pzero(
const Packet2cf& ) {
104 return Packet2cf(vdupq_n_f32(0.0f));
108EIGEN_STRONG_INLINE Packet1cf pset1<Packet1cf>(
const std::complex<float>& from) {
109 return Packet1cf(vld1_f32(
reinterpret_cast<const float*
>(&from)));
112EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(
const std::complex<float>& from) {
113 const float32x2_t r64 = vld1_f32(
reinterpret_cast<const float*
>(&from));
114 return Packet2cf(vcombine_f32(r64, r64));
118EIGEN_STRONG_INLINE Packet1cf padd<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
119 return Packet1cf(padd<Packet2f>(a.v, b.v));
122EIGEN_STRONG_INLINE Packet2cf padd<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
123 return Packet2cf(padd<Packet4f>(a.v, b.v));
127EIGEN_STRONG_INLINE Packet1cf psub<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
128 return Packet1cf(psub<Packet2f>(a.v, b.v));
131EIGEN_STRONG_INLINE Packet2cf psub<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
132 return Packet2cf(psub<Packet4f>(a.v, b.v));
136EIGEN_STRONG_INLINE Packet1cf pnegate(
const Packet1cf& a) {
137 return Packet1cf(pnegate<Packet2f>(a.v));
140EIGEN_STRONG_INLINE Packet2cf pnegate(
const Packet2cf& a) {
141 return Packet2cf(pnegate<Packet4f>(a.v));
145EIGEN_STRONG_INLINE Packet1cf pconj(
const Packet1cf& a) {
146 const Packet2ui b = Packet2ui(vreinterpret_u32_f32(a.v));
147 return Packet1cf(vreinterpret_f32_u32(veor_u32(b, p2ui_CONJ_XOR())));
150EIGEN_STRONG_INLINE Packet2cf pconj(
const Packet2cf& a) {
151 const Packet4ui b = Packet4ui(vreinterpretq_u32_f32(a.v));
152 return Packet2cf(vreinterpretq_f32_u32(veorq_u32(b, p4ui_CONJ_XOR())));
155#ifdef __ARM_FEATURE_COMPLEX
157EIGEN_STRONG_INLINE Packet1cf pmadd<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b,
const Packet1cf& c) {
159 result.v = vcmla_f32(c.v, a.v, b.v);
160 result.v = vcmla_rot90_f32(result.v, a.v, b.v);
165EIGEN_STRONG_INLINE Packet1cf pmul<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
166 return pmadd(a, b, pzero(a));
170EIGEN_STRONG_INLINE Packet1cf pmul<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
174 v1 = vdup_lane_f32(a.v, 0);
176 v2 = vdup_lane_f32(a.v, 1);
178 v1 = vmul_f32(v1, b.v);
180 v2 = vmul_f32(v2, b.v);
182 v2 = vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(v2), p2ui_CONJ_XOR()));
186 return Packet1cf(vadd_f32(v1, v2));
190#ifdef __ARM_FEATURE_COMPLEX
192EIGEN_STRONG_INLINE Packet2cf pmadd<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b,
const Packet2cf& c) {
194 result.v = vcmlaq_f32(c.v, a.v, b.v);
195 result.v = vcmlaq_rot90_f32(result.v, a.v, b.v);
200EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
201 return pmadd(a, b, pzero(a));
205EIGEN_STRONG_INLINE Packet2cf pmul<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
208 Packet4f a_re = vtrn1q_f32(a.v, a.v);
209 Packet4f a_im = vtrn2q_f32(a.v, a.v);
212 Packet4f a_re = vcombine_f32(vdup_lane_f32(vget_low_f32(a.v), 0), vdup_lane_f32(vget_high_f32(a.v), 0));
213 Packet4f a_im = vcombine_f32(vdup_lane_f32(vget_low_f32(a.v), 1), vdup_lane_f32(vget_high_f32(a.v), 1));
216 Packet4f v1 = vmulq_f32(a_re, b.v);
218 Packet4f v2 = vmulq_f32(a_im, b.v);
220 v2 = vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(v2), p4ui_CONJ_XOR()));
222 v2 = vrev64q_f32(v2);
224 return Packet2cf(vaddq_f32(v1, v2));
229EIGEN_STRONG_INLINE Packet1cf pcmp_eq(
const Packet1cf& a,
const Packet1cf& b) {
232 Packet2f eq = pcmp_eq<Packet2f>(a.v, b.v);
235 Packet2f eq_swapped = vrev64_f32(eq);
237 return Packet1cf(pand<Packet2f>(eq, eq_swapped));
240EIGEN_STRONG_INLINE Packet2cf pcmp_eq(
const Packet2cf& a,
const Packet2cf& b) {
243 Packet4f eq = pcmp_eq<Packet4f>(a.v, b.v);
246 Packet4f eq_swapped = vrev64q_f32(eq);
248 return Packet2cf(pand<Packet4f>(eq, eq_swapped));
252EIGEN_STRONG_INLINE Packet1cf pand<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
253 return Packet1cf(vreinterpret_f32_u32(vand_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v))));
256EIGEN_STRONG_INLINE Packet2cf pand<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
257 return Packet2cf(vreinterpretq_f32_u32(vandq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v))));
261EIGEN_STRONG_INLINE Packet1cf por<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
262 return Packet1cf(vreinterpret_f32_u32(vorr_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v))));
265EIGEN_STRONG_INLINE Packet2cf por<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
266 return Packet2cf(vreinterpretq_f32_u32(vorrq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v))));
270EIGEN_STRONG_INLINE Packet1cf pxor<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
271 return Packet1cf(vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v))));
274EIGEN_STRONG_INLINE Packet2cf pxor<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
275 return Packet2cf(vreinterpretq_f32_u32(veorq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v))));
279EIGEN_STRONG_INLINE Packet1cf pandnot<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
280 return Packet1cf(vreinterpret_f32_u32(vbic_u32(vreinterpret_u32_f32(a.v), vreinterpret_u32_f32(b.v))));
283EIGEN_STRONG_INLINE Packet2cf pandnot<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
284 return Packet2cf(vreinterpretq_f32_u32(vbicq_u32(vreinterpretq_u32_f32(a.v), vreinterpretq_u32_f32(b.v))));
288EIGEN_STRONG_INLINE Packet1cf pload<Packet1cf>(
const std::complex<float>* from) {
289 EIGEN_DEBUG_ALIGNED_LOAD
return Packet1cf(
290 pload<Packet2f>(assume_aligned<unpacket_traits<Packet1cf>::alignment>(
reinterpret_cast<const float*
>(from))));
293EIGEN_STRONG_INLINE Packet2cf pload<Packet2cf>(
const std::complex<float>* from) {
294 EIGEN_DEBUG_ALIGNED_LOAD
return Packet2cf(
295 pload<Packet4f>(assume_aligned<unpacket_traits<Packet2cf>::alignment>(
reinterpret_cast<const float*
>(from))));
299EIGEN_STRONG_INLINE Packet1cf ploadu<Packet1cf>(
const std::complex<float>* from) {
300 EIGEN_DEBUG_UNALIGNED_LOAD
return Packet1cf(ploadu<Packet2f>((
const float*)from));
303EIGEN_STRONG_INLINE Packet2cf ploadu<Packet2cf>(
const std::complex<float>* from) {
304 EIGEN_DEBUG_UNALIGNED_LOAD
return Packet2cf(ploadu<Packet4f>(
reinterpret_cast<const float*
>(from)));
308EIGEN_STRONG_INLINE Packet1cf ploaddup<Packet1cf>(
const std::complex<float>* from) {
309 return pset1<Packet1cf>(*from);
312EIGEN_STRONG_INLINE Packet2cf ploaddup<Packet2cf>(
const std::complex<float>* from) {
313 return pset1<Packet2cf>(*from);
317EIGEN_STRONG_INLINE
void pstore<std::complex<float>>(std::complex<float>* to,
const Packet1cf& from) {
318 EIGEN_DEBUG_ALIGNED_STORE pstore(assume_aligned<unpacket_traits<Packet1cf>::alignment>(
reinterpret_cast<float*
>(to)),
322EIGEN_STRONG_INLINE
void pstore<std::complex<float>>(std::complex<float>* to,
const Packet2cf& from) {
323 EIGEN_DEBUG_ALIGNED_STORE pstore(assume_aligned<unpacket_traits<Packet2cf>::alignment>(
reinterpret_cast<float*
>(to)),
328EIGEN_STRONG_INLINE
void pstoreu<std::complex<float>>(std::complex<float>* to,
const Packet1cf& from) {
329 EIGEN_DEBUG_UNALIGNED_STORE pstoreu((
float*)to, from.v);
332EIGEN_STRONG_INLINE
void pstoreu<std::complex<float>>(std::complex<float>* to,
const Packet2cf& from) {
333 EIGEN_DEBUG_UNALIGNED_STORE pstoreu(
reinterpret_cast<float*
>(to), from.v);
337EIGEN_DEVICE_FUNC
inline Packet1cf pgather<std::complex<float>, Packet1cf>(
const std::complex<float>* from, Index) {
338 return ploadu<Packet1cf>(from);
341EIGEN_DEVICE_FUNC
inline Packet2cf pgather<std::complex<float>, Packet2cf>(
const std::complex<float>* from,
343 return Packet2cf(vcombine_f32(vld1_f32(
reinterpret_cast<const float*
>(from)),
344 vld1_f32(
reinterpret_cast<const float*
>(from + stride))));
348EIGEN_DEVICE_FUNC
inline void pscatter<std::complex<float>, Packet1cf>(std::complex<float>* to,
const Packet1cf& from,
353EIGEN_DEVICE_FUNC
inline void pscatter<std::complex<float>, Packet2cf>(std::complex<float>* to,
const Packet2cf& from,
355 vst1_f32(
reinterpret_cast<float*
>(to), vget_low_f32(from.v));
356 vst1_f32(
reinterpret_cast<float*
>(to + stride), vget_high_f32(from.v));
360EIGEN_STRONG_INLINE
void prefetch<std::complex<float>>(
const std::complex<float>* addr) {
361 EIGEN_ARM_PREFETCH(
reinterpret_cast<const float*
>(addr));
365EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet1cf>(
const Packet1cf& a) {
366 EIGEN_ALIGN16 std::complex<float> x;
367 vst1_f32(
reinterpret_cast<float*
>(&x), a.v);
371EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(
const Packet2cf& a) {
372 EIGEN_ALIGN16 std::complex<float> x[2];
373 vst1q_f32(
reinterpret_cast<float*
>(x), a.v);
378EIGEN_STRONG_INLINE Packet2cf preverse(
const Packet2cf& a) {
379 return Packet2cf(vextq_f32(a.v, a.v, 2));
383EIGEN_STRONG_INLINE Packet1cf pcplxflip<Packet1cf>(
const Packet1cf& a) {
384 return Packet1cf(vrev64_f32(a.v));
387EIGEN_STRONG_INLINE Packet2cf pcplxflip<Packet2cf>(
const Packet2cf& a) {
388 return Packet2cf(vrev64q_f32(a.v));
392EIGEN_STRONG_INLINE std::complex<float> predux<Packet2cf>(
const Packet2cf& a) {
393 std::complex<float> s;
394 vst1_f32(
reinterpret_cast<float*
>(&s), vadd_f32(vget_low_f32(a.v), vget_high_f32(a.v)));
399EIGEN_STRONG_INLINE std::complex<float> predux_mul<Packet2cf>(
const Packet2cf& a) {
400 float32x2_t a1, a2, v1, v2, prod;
401 std::complex<float> s;
403 a1 = vget_low_f32(a.v);
404 a2 = vget_high_f32(a.v);
406 v1 = vdup_lane_f32(a1, 0);
408 v2 = vdup_lane_f32(a1, 1);
410 v1 = vmul_f32(v1, a2);
412 v2 = vmul_f32(v2, a2);
414 v2 = vreinterpret_f32_u32(veor_u32(vreinterpret_u32_f32(v2), p2ui_CONJ_XOR()));
418 prod = vadd_f32(v1, v2);
420 vst1_f32(
reinterpret_cast<float*
>(&s), prod);
425EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cf, Packet2f)
426EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet2cf, Packet4f)
429EIGEN_STRONG_INLINE Packet1cf pdiv<Packet1cf>(
const Packet1cf& a,
const Packet1cf& b) {
430 return pdiv_complex(a, b);
433EIGEN_STRONG_INLINE Packet2cf pdiv<Packet2cf>(
const Packet2cf& a,
const Packet2cf& b) {
434 return pdiv_complex(a, b);
437EIGEN_DEVICE_FUNC
inline void ptranspose(PacketBlock<Packet1cf, 1>& ) {}
438EIGEN_DEVICE_FUNC
inline void ptranspose(PacketBlock<Packet2cf, 2>& kernel) {
439 Packet4f tmp = vcombine_f32(vget_high_f32(kernel.packet[0].v), vget_high_f32(kernel.packet[1].v));
440 kernel.packet[0].v = vcombine_f32(vget_low_f32(kernel.packet[0].v), vget_low_f32(kernel.packet[1].v));
441 kernel.packet[1].v = tmp;
444EIGEN_INSTANTIATE_COMPLEX_MATH_FUNCS(Packet1cf)
445EIGEN_INSTANTIATE_COMPLEX_MATH_FUNCS(Packet2cf)
450inline uint64x2_t p2ul_CONJ_XOR() {
451 static const uint64_t p2ul_conj_XOR_DATA[] = {0x0, 0x8000000000000000};
452 return vld1q_u64(p2ul_conj_XOR_DATA);
456 EIGEN_STRONG_INLINE Packet1cd() {}
457 EIGEN_STRONG_INLINE
explicit Packet1cd(
const Packet2d& a) : v(a) {}
462struct packet_traits<std::complex<double>> : default_packet_traits {
463 typedef Packet1cd type;
464 typedef Packet1cd half;
487struct unpacket_traits<Packet1cd> : neon_unpacket_default<Packet1cd, std::complex<double>> {
488 using as_real = Packet2d;
492EIGEN_STRONG_INLINE Packet1cd pload<Packet1cd>(
const std::complex<double>* from) {
493 EIGEN_DEBUG_ALIGNED_LOAD
return Packet1cd(
494 pload<Packet2d>(assume_aligned<unpacket_traits<Packet1cd>::alignment>(
reinterpret_cast<const double*
>(from))));
498EIGEN_STRONG_INLINE Packet1cd ploadu<Packet1cd>(
const std::complex<double>* from) {
499 EIGEN_DEBUG_UNALIGNED_LOAD
return Packet1cd(ploadu<Packet2d>(
reinterpret_cast<const double*
>(from)));
503EIGEN_STRONG_INLINE Packet1cd pzero<Packet1cd>(
const Packet1cd& ) {
504 return Packet1cd(vdupq_n_f64(0.0));
508EIGEN_STRONG_INLINE Packet1cd pset1<Packet1cd>(
const std::complex<double>& from) {
510 return ploadu<Packet1cd>(&from);
514EIGEN_STRONG_INLINE Packet1cd padd<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
515 return Packet1cd(padd<Packet2d>(a.v, b.v));
519EIGEN_STRONG_INLINE Packet1cd psub<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
520 return Packet1cd(psub<Packet2d>(a.v, b.v));
524EIGEN_STRONG_INLINE Packet1cd pnegate(
const Packet1cd& a) {
525 return Packet1cd(pnegate<Packet2d>(a.v));
529EIGEN_STRONG_INLINE Packet1cd pconj(
const Packet1cd& a) {
530 return Packet1cd(vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(a.v), p2ul_CONJ_XOR())));
533#ifdef __ARM_FEATURE_COMPLEX
535EIGEN_STRONG_INLINE Packet1cd pmadd<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b,
const Packet1cd& c) {
537 result.v = vcmlaq_f64(c.v, a.v, b.v);
538 result.v = vcmlaq_rot90_f64(result.v, a.v, b.v);
543EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
544 return pmadd(a, b, pzero(a));
548EIGEN_STRONG_INLINE Packet1cd pmul<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
552 v1 = vdupq_lane_f64(vget_low_f64(a.v), 0);
554 v2 = vdupq_lane_f64(vget_high_f64(a.v), 0);
556 v1 = vmulq_f64(v1, b.v);
558 v2 = vmulq_f64(v2, b.v);
560 v2 = vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(v2), p2ul_CONJ_XOR()));
562 v2 = preverse<Packet2d>(v2);
564 return Packet1cd(vaddq_f64(v1, v2));
569EIGEN_STRONG_INLINE Packet1cd pcmp_eq(
const Packet1cd& a,
const Packet1cd& b) {
572 Packet2d eq = pcmp_eq<Packet2d>(a.v, b.v);
575 Packet2d eq_swapped = vreinterpretq_f64_u32(vrev64q_u32(vreinterpretq_u32_f64(eq)));
577 return Packet1cd(pand<Packet2d>(eq, eq_swapped));
581EIGEN_STRONG_INLINE Packet1cd pand<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
582 return Packet1cd(vreinterpretq_f64_u64(vandq_u64(vreinterpretq_u64_f64(a.v), vreinterpretq_u64_f64(b.v))));
586EIGEN_STRONG_INLINE Packet1cd por<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
587 return Packet1cd(vreinterpretq_f64_u64(vorrq_u64(vreinterpretq_u64_f64(a.v), vreinterpretq_u64_f64(b.v))));
591EIGEN_STRONG_INLINE Packet1cd pxor<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
592 return Packet1cd(vreinterpretq_f64_u64(veorq_u64(vreinterpretq_u64_f64(a.v), vreinterpretq_u64_f64(b.v))));
596EIGEN_STRONG_INLINE Packet1cd pandnot<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
597 return Packet1cd(vreinterpretq_f64_u64(vbicq_u64(vreinterpretq_u64_f64(a.v), vreinterpretq_u64_f64(b.v))));
601EIGEN_STRONG_INLINE
void pstore<std::complex<double>>(std::complex<double>* to,
const Packet1cd& from) {
602 EIGEN_DEBUG_ALIGNED_STORE pstore(assume_aligned<unpacket_traits<Packet1cd>::alignment>(
reinterpret_cast<double*
>(to)),
607EIGEN_STRONG_INLINE
void pstoreu<std::complex<double>>(std::complex<double>* to,
const Packet1cd& from) {
608 EIGEN_DEBUG_UNALIGNED_STORE pstoreu(
reinterpret_cast<double*
>(to), from.v);
612EIGEN_STRONG_INLINE
void prefetch<std::complex<double>>(
const std::complex<double>* addr) {
613 EIGEN_ARM_PREFETCH(
reinterpret_cast<const double*
>(addr));
617EIGEN_DEVICE_FUNC
inline Packet1cd pgather<std::complex<double>, Packet1cd>(
const std::complex<double>* from, Index) {
618 return ploadu<Packet1cd>(from);
622EIGEN_DEVICE_FUNC
inline void pscatter<std::complex<double>, Packet1cd>(std::complex<double>* to,
const Packet1cd& from,
628EIGEN_STRONG_INLINE std::complex<double> pfirst<Packet1cd>(
const Packet1cd& a) {
629 EIGEN_ALIGN16 std::complex<double> res;
630 pstore<std::complex<double>>(&res, a);
634EIGEN_MAKE_CONJ_HELPER_CPLX_REAL(Packet1cd, Packet2d)
637EIGEN_STRONG_INLINE Packet1cd pdiv<Packet1cd>(
const Packet1cd& a,
const Packet1cd& b) {
638 return pdiv_complex(a, b);
641EIGEN_STRONG_INLINE Packet1cd pcplxflip (
const Packet1cd& x) {
642 return Packet1cd(preverse(Packet2d(x.v)));
645EIGEN_STRONG_INLINE
void ptranspose(PacketBlock<Packet1cd, 2>& kernel) {
646 Packet2d tmp = vcombine_f64(vget_high_f64(kernel.packet[0].v), vget_high_f64(kernel.packet[1].v));
647 kernel.packet[0].v = vcombine_f64(vget_low_f64(kernel.packet[0].v), vget_low_f64(kernel.packet[1].v));
648 kernel.packet[1].v = tmp;
651EIGEN_INSTANTIATE_COMPLEX_MATH_FUNCS(Packet1cd)
655EIGEN_GCC_FAST_MATH_COMPLEX_VECTORIZE_WORKAROUND_POP