11 #ifndef EIGEN_TYPE_CASTING_NEON_H
12 #define EIGEN_TYPE_CASTING_NEON_H
14 #include "../../InternalHeaderCheck.h"
31 return Packet4c(vget_lane_s32(vreinterpret_s32_s8(
a), 0));
35 return preinterpret<Packet4c>(preinterpret<Packet8c>(
a));
44 return Packet4uc(vget_lane_u32(vreinterpret_u32_u8(
a), 0));
48 return preinterpret<Packet4uc>(preinterpret<Packet8uc>(
a));
88 return Packet4f(vreinterpretq_f32_s32(
a));
92 return Packet4f(vreinterpretq_f32_u32(
a));
125 return Packet4s(vreinterpret_s16_u16(
a));
129 return Packet8s(vreinterpretq_s16_u16(
a));
142 return Packet2i(vreinterpret_s32_f32(
a));
146 return Packet2i(vreinterpret_s32_u32(
a));
150 return Packet4i(vreinterpretq_s32_f32(
a));
154 return Packet4i(vreinterpretq_s32_u32(
a));
176 return Packet2l(vreinterpretq_s64_u64(
a));
189 struct type_casting_traits<float, numext::
int64_t> {
190 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
193 struct type_casting_traits<float, numext::
uint64_t> {
194 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
201 return vcvtq_s64_f64(vcvt_f64_f32(vget_low_f32(
a)));
205 return vcvtq_s64_f64(vcvt_f64_f32(
a));
210 return vcvtq_u64_f64(vcvt_f64_f32(vget_low_f32(
a)));
214 return vcvtq_u64_f64(vcvt_f64_f32(
a));
220 return vmovl_s32(vget_low_s32(vcvtq_s32_f32(
a)));
224 return vmovl_s32(vcvt_s32_f32(
a));
229 return vmovl_u32(vget_low_u32(vcvtq_u32_f32(
a)));
234 return vmovl_u32(vcvt_u32_f32(
a));
239 struct type_casting_traits<float, numext::
int32_t> {
240 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
244 return vcvtq_s32_f32(
a);
248 return vcvt_s32_f32(
a);
252 struct type_casting_traits<float, numext::
uint32_t> {
253 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
257 return vcvtq_u32_f32(
a);
261 return vcvt_u32_f32(
a);
265 struct type_casting_traits<float, numext::
int16_t> {
266 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
270 return vcombine_s16(vmovn_s32(vcvtq_s32_f32(
a)), vmovn_s32(vcvtq_s32_f32(
b)));
274 return vmovn_s32(vcvtq_s32_f32(
a));
278 return vmovn_s32(vcombine_s32(vcvt_s32_f32(
a), vcvt_s32_f32(
b)));
282 struct type_casting_traits<float, numext::
uint16_t> {
283 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
287 return vcombine_u16(vmovn_u32(vcvtq_u32_f32(
a)), vmovn_u32(vcvtq_u32_f32(
b)));
291 return vmovn_u32(vcvtq_u32_f32(
a));
295 return vmovn_u32(vcombine_u32(vcvt_u32_f32(
a), vcvt_u32_f32(
b)));
299 struct type_casting_traits<float, numext::
int8_t> {
300 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
307 return vcombine_s8(vmovn_s16(ab_s16), vmovn_s16(cd_s16));
312 return vmovn_s16(ab_s16);
319 return vmovn_s16(vcombine_s16(ab_s16, cd_s16));
323 const int32x4_t a_s32x4 = vcvtq_s32_f32(
a);
324 const int16x4_t a_s16x4 = vmovn_s32(a_s32x4);
325 const int16x8_t aa_s16x8 = vcombine_s16(a_s16x4, a_s16x4);
326 const int8x8_t aa_s8x8 = vmovn_s16(aa_s16x8);
327 return vget_lane_s32(vreinterpret_s32_s8(aa_s8x8), 0);
331 struct type_casting_traits<float, numext::
uint8_t> {
332 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
357 struct type_casting_traits<numext::
int8_t, float> {
358 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
363 return vcvtq_f32_s32(vmovl_s16(vget_low_s16(vmovl_s8(vget_low_s8(
a)))));
367 return vcvtq_f32_s32(vmovl_s16(vget_low_s16(vmovl_s8(vreinterpret_s8_s32(vdup_n_s32(
a))))));
372 return vcvt_f32_s32(vget_low_s32(vmovl_s16(vget_low_s16(vmovl_s8(
a)))));
377 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 8 };
382 return vmovl_s32(vget_low_s32(vmovl_s16(vget_low_s16(vmovl_s8(vget_low_s8(
a))))));
387 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 8 };
396 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
401 return vmovl_s16(vget_low_s16(vmovl_s8(vget_low_s8(
a))));
405 return vmovl_s16(vget_low_s16(vmovl_s8(
a)));
414 return vget_low_s32(vmovl_s16(vget_low_s16(vmovl_s8(
a))));
420 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
437 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
442 return vmovl_s8(vget_low_s8(
a));
451 return vget_low_s16(vmovl_s8(
a));
460 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
484 struct type_casting_traits<numext::
uint8_t, float> {
485 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
490 return vcvtq_f32_u32(vmovl_u16(vget_low_u16(vmovl_u8(vget_low_u8(
a)))));
494 return vcvtq_f32_u32(vmovl_u16(vget_low_u16(vmovl_u8(vreinterpret_u8_u32(vdup_n_u32(
a))))));
499 return vcvt_f32_u32(vget_low_u32(vmovl_u16(vget_low_u16(vmovl_u8(
a)))));
504 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 8 };
509 return vmovl_u32(vget_low_u32(vmovl_u16(vget_low_u16(vmovl_u8(vget_low_u8(
a))))));
514 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 8 };
523 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
528 return vmovl_u16(vget_low_u16(vmovl_u8(vget_low_u8(
a))));
532 return vmovl_u16(vget_low_u16(vmovl_u8(
a)));
537 return vget_low_u32(vmovl_u16(vget_low_u16(vmovl_u8(
a))));
546 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
563 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
568 return vmovl_u8(vget_low_u8(
a));
576 return vget_low_u16(vmovl_u8(vreinterpret_u8_u32(vdup_n_u32(
a))));
582 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
602 struct type_casting_traits<numext::
int16_t, float> {
603 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
608 return vcvtq_f32_s32(vmovl_s16(vget_low_s16(
a)));
612 return vcvtq_f32_s32(vmovl_s16(
a));
617 return vcvt_f32_s32(vget_low_s32(vmovl_s16(
a)));
622 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
627 return vmovl_s32(vget_low_s32(vmovl_s16(vget_low_s16(
a))));
632 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
641 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
646 return vmovl_s16(vget_low_s16(
a));
655 return vget_low_s32(vmovl_s16(
a));
660 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
678 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
682 return vcombine_s8(vmovn_s16(
a), vmovn_s16(
b));
690 return vmovn_s16(vcombine_s16(
a,
b));
695 return vget_lane_s32(vreinterpret_s32_s8(aa_s8x8), 0);
700 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
723 struct type_casting_traits<numext::
uint16_t, float> {
724 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
729 return vcvtq_f32_u32(vmovl_u16(vget_low_u16(
a)));
733 return vcvtq_f32_u32(vmovl_u16(
a));
738 return vcvt_f32_u32(vget_low_u32(vmovl_u16(
a)));
743 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
748 return vmovl_u32(vget_low_u32(vmovl_u16(vget_low_u16(
a))));
753 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
762 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
767 return vmovl_u16(vget_low_u16(
a));
776 return vget_low_u32(vmovl_u16(
a));
781 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
799 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
803 return vcombine_u8(vmovn_u16(
a), vmovn_u16(
b));
811 return vmovn_u16(vcombine_u16(
a,
b));
816 return vget_lane_u32(vreinterpret_u32_u8(aa_u8x8), 0);
821 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
844 struct type_casting_traits<numext::
int32_t, float> {
845 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
849 return vcvtq_f32_s32(
a);
853 return vcvt_f32_s32(
a);
858 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
863 return vmovl_s32(vget_low_s32(
a));
872 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
886 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
890 return vcombine_s16(vmovn_s32(
a), vmovn_s32(
b));
898 return vmovn_s32(vcombine_s32(
a,
b));
903 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
907 return vcombine_u16(vmovn_u32(vreinterpretq_u32_s32(
a)), vmovn_u32(vreinterpretq_u32_s32(
b)));
911 return vmovn_u32(vreinterpretq_u32_s32(
a));
915 return vmovn_u32(vreinterpretq_u32_s32(vcombine_s32(
a,
b)));
920 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
927 return vcombine_s8(vmovn_s16(ab_s16), vmovn_s16(cd_s16));
932 return vmovn_s16(ab_s16);
937 const int16x4_t ab_s16 = vmovn_s32(vcombine_s32(
a,
b));
938 const int16x4_t cd_s16 = vmovn_s32(vcombine_s32(
c, d));
939 return vmovn_s16(vcombine_s16(ab_s16, cd_s16));
943 const int16x4_t a_s16x4 = vmovn_s32(
a);
944 const int16x8_t aa_s16x8 = vcombine_s16(a_s16x4, a_s16x4);
945 const int8x8_t aa_s8x8 = vmovn_s16(aa_s16x8);
946 return vget_lane_s32(vreinterpret_s32_s8(aa_s8x8), 0);
951 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
976 struct type_casting_traits<numext::
uint32_t, float> {
977 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
981 return vcvtq_f32_u32(
a);
985 return vcvt_f32_u32(
a);
990 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
995 return vmovl_u32(vget_low_u32(
a));
1004 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
1018 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1022 return vcombine_u16(vmovn_u32(
a), vmovn_u32(
b));
1026 return vmovn_u32(vcombine_u32(
a,
b));
1030 return vmovn_u32(
a);
1035 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1052 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
1057 const uint16x8_t ab_u16 = vcombine_u16(vmovn_u32(
a), vmovn_u32(
b));
1058 const uint16x8_t cd_u16 = vcombine_u16(vmovn_u32(
c), vmovn_u32(d));
1059 return vcombine_u8(vmovn_u16(ab_u16), vmovn_u16(cd_u16));
1063 const uint16x8_t ab_u16 = vcombine_u16(vmovn_u32(
a), vmovn_u32(
b));
1064 return vmovn_u16(ab_u16);
1069 const uint16x4_t ab_u16 = vmovn_u32(vcombine_u32(
a,
b));
1070 const uint16x4_t cd_u16 = vmovn_u32(vcombine_u32(
c, d));
1071 return vmovn_u16(vcombine_u16(ab_u16, cd_u16));
1075 const uint16x4_t a_u16x4 = vmovn_u32(
a);
1076 const uint16x8_t aa_u16x8 = vcombine_u16(a_u16x4, a_u16x4);
1077 const uint8x8_t aa_u8x8 = vmovn_u16(aa_u16x8);
1078 return vget_lane_u32(vreinterpret_u32_u8(aa_u8x8), 0);
1083 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
1108 struct type_casting_traits<numext::
int64_t, float> {
1109 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1113 return vcvtq_f32_s32(vcombine_s32(vmovn_s64(
a), vmovn_s64(
b)));
1117 return vcvt_f32_s32(vmovn_s64(
a));
1123 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1127 return vcombine_s32(vmovn_s64(
a), vmovn_s64(
b));
1131 return vmovn_s64(
a);
1136 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1140 return vcombine_u32(vmovn_u64(vreinterpretq_u64_s64(
a)), vmovn_u64(vreinterpretq_u64_s64(
b)));
1144 return vmovn_u64(vreinterpretq_u64_s64(
a));
1149 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
1156 return vcombine_s16(vmovn_s32(ab_s32), vmovn_s32(cd_s32));
1161 return vmovn_s32(ab_s32);
1166 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
1180 enum { VectorizedCast = 1, SrcCoeffRatio = 8, TgtCoeffRatio = 1 };
1188 return vcombine_s8(vmovn_s16(abcd_s16), vmovn_s16(efgh_s16));
1194 return vmovn_s16(abcd_s16);
1199 const int16x8_t abab_s16 = vcombine_s16(ab_s16, ab_s16);
1200 const int8x8_t abab_s8 = vmovn_s16(abab_s16);
1201 return vget_lane_s32(vreinterpret_s32_s8(abab_s8), 0);
1206 enum { VectorizedCast = 1, SrcCoeffRatio = 8, TgtCoeffRatio = 1 };
1214 return vcombine_u8(vmovn_u16(abcd_u16), vmovn_u16(efgh_u16));
1230 struct type_casting_traits<numext::
uint64_t, float> {
1231 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1235 return vcvtq_f32_u32(vcombine_u32(vmovn_u64(
a), vmovn_u64(
b)));
1239 return vcvt_f32_u32(vmovn_u64(
a));
1245 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1249 return vcombine_u32(vmovn_u64(
a), vmovn_u64(
b));
1253 return vmovn_u64(
a);
1258 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1271 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
1276 const uint16x4_t ab_u16 = vmovn_u32(vcombine_u32(vmovn_u64(
a), vmovn_u64(
b)));
1277 const uint16x4_t cd_u16 = vmovn_u32(vcombine_u32(vmovn_u64(
c), vmovn_u64(d)));
1278 return vcombine_u16(ab_u16, cd_u16);
1282 return vmovn_u32(vcombine_u32(vmovn_u64(
a), vmovn_u64(
b)));
1287 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
1301 enum { VectorizedCast = 1, SrcCoeffRatio = 8, TgtCoeffRatio = 1 };
1309 return vcombine_u8(vmovn_u16(abcd_u16), vmovn_u16(efgh_u16));
1315 return vmovn_u16(abcd_u16);
1320 const uint16x8_t abab_u16 = vcombine_u16(ab_u16, ab_u16);
1321 const uint8x8_t abab_u8 = vmovn_u16(abab_u16);
1322 return vget_lane_u32(vreinterpret_u32_u8(abab_u8), 0);
1327 enum { VectorizedCast = 1, SrcCoeffRatio = 8, TgtCoeffRatio = 1 };
1345 #if EIGEN_ARCH_ARM64
1352 EIGEN_STRONG_INLINE
Packet2d preinterpret<Packet2d, Packet2l>(
const Packet2l&
a) {
1353 return Packet2d(vreinterpretq_f64_s64(
a));
1357 return Packet2d(vreinterpretq_f64_u64(
a));
1360 EIGEN_STRONG_INLINE
Packet2l preinterpret<Packet2l, Packet2d>(
const Packet2d&
a) {
1361 return Packet2l(vreinterpretq_s64_f64(
a));
1369 return Packet2d(vreinterpretq_f64_s32(
a));
1373 return Packet4i(vreinterpretq_s32_f64(
a));
1378 struct type_casting_traits<double, float> {
1379 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1383 return vcombine_f32(vcvt_f32_f64(
a), vcvt_f32_f64(
b));
1387 return vcvt_f32_f64(
a);
1391 struct type_casting_traits<double, numext::
int64_t> {
1392 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
1396 return vcvtq_s64_f64(
a);
1400 struct type_casting_traits<double, numext::
uint64_t> {
1401 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
1405 return vcvtq_u64_f64(
a);
1409 struct type_casting_traits<double, numext::
int32_t> {
1410 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1414 return vcombine_s32(vmovn_s64(vcvtq_s64_f64(
a)), vmovn_s64(vcvtq_s64_f64(
b)));
1418 return vmovn_s64(vcvtq_s64_f64(
a));
1422 struct type_casting_traits<double, numext::
uint32_t> {
1423 enum { VectorizedCast = 1, SrcCoeffRatio = 2, TgtCoeffRatio = 1 };
1427 return vcombine_u32(vmovn_u64(vcvtq_u64_f64(
a)), vmovn_u64(vcvtq_u64_f64(
b)));
1431 return vmovn_u64(vcvtq_u64_f64(
a));
1435 struct type_casting_traits<double, numext::
int16_t> {
1436 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
1443 return vcombine_s16(vmovn_s32(ab_s32), vmovn_s32(cd_s32));
1448 return vmovn_s32(ab_s32);
1452 struct type_casting_traits<double, numext::
uint16_t> {
1453 enum { VectorizedCast = 1, SrcCoeffRatio = 4, TgtCoeffRatio = 1 };
1458 return preinterpret<Packet8us>(pcast<Packet2d, Packet8s>(
a,
b,
c, d));
1462 return preinterpret<Packet4us>(pcast<Packet2d, Packet4s>(
a,
b));
1466 struct type_casting_traits<double, numext::
int8_t> {
1467 enum { VectorizedCast = 1, SrcCoeffRatio = 8, TgtCoeffRatio = 1 };
1473 const int16x8_t abcd_s16 = pcast<Packet2d, Packet8s>(
a,
b,
c, d);
1474 const int16x8_t efgh_s16 = pcast<Packet2d, Packet8s>(
e, f, g, h);
1475 return vcombine_s8(vmovn_s16(abcd_s16), vmovn_s16(efgh_s16));
1480 const int16x8_t abcd_s16 = pcast<Packet2d, Packet8s>(
a,
b,
c, d);
1481 return vmovn_s16(abcd_s16);
1490 struct type_casting_traits<double, numext::
uint8_t> {
1491 enum { VectorizedCast = 1, SrcCoeffRatio = 8, TgtCoeffRatio = 1 };
1497 const uint16x8_t abcd_u16 = pcast<Packet2d, Packet8us>(
a,
b,
c, d);
1498 const uint16x8_t efgh_u16 = pcast<Packet2d, Packet8us>(
e, f, g, h);
1499 return vcombine_u8(vmovn_u16(abcd_u16), vmovn_u16(efgh_u16));
1504 return preinterpret<Packet8uc>(pcast<Packet2d, Packet8c>(
a,
b,
c, d));
1508 return static_cast<Packet4uc>(pcast<Packet2d, Packet4c>(
a,
b));
1512 struct type_casting_traits<float, double> {
1513 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
1518 return vcvt_f64_f32(vget_low_f32(
a));
1522 return vcvt_f64_f32(
a);
1526 struct type_casting_traits<numext::
int8_t, double> {
1527 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 8 };
1534 return vcvt_f64_f32(tmp);
1538 struct type_casting_traits<numext::
uint8_t, double> {
1539 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 8 };
1545 return vcvt_f64_f32(tmp);
1549 struct type_casting_traits<numext::
int16_t, double> {
1550 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
1556 return vcvt_f64_f32(tmp);
1560 struct type_casting_traits<numext::
uint16_t, double> {
1561 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 4 };
1567 return vcvt_f64_f32(tmp);
1571 struct type_casting_traits<numext::
int32_t, double> {
1572 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
1577 return vcvtq_f64_s64(vmovl_s32(vget_low_s32(
a)));
1581 return vcvtq_f64_s64(vmovl_s32(
a));
1585 struct type_casting_traits<numext::
uint32_t, double> {
1586 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 2 };
1591 return vcvtq_f64_u64(vmovl_u32(vget_low_u32(
a)));
1595 return vcvtq_f64_u64(vmovl_u32(
a));
1599 struct type_casting_traits<numext::
int64_t, double> {
1600 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
1604 return vcvtq_f64_s64(
a);
1608 struct type_casting_traits<numext::
uint64_t, double> {
1609 enum { VectorizedCast = 1, SrcCoeffRatio = 1, TgtCoeffRatio = 1 };
1613 return vcvtq_f64_u64(
a);
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Packet16uc pcast< Packet8us, Packet16uc >(const Packet8us &a, const Packet8us &b)
Packet4ui pcast< Packet16uc, Packet4ui >(const Packet16uc &a)
Packet4us pcast< Packet8c, Packet4us >(const Packet8c &a)
Packet2ui pcast< Packet8c, Packet2ui >(const Packet8c &a)
Packet4f pcast< Packet4uc, Packet4f >(const Packet4uc &a)
Packet2ui pcast< Packet8uc, Packet2ui >(const Packet8uc &a)
Packet8uc pcast< Packet4f, Packet8uc >(const Packet4f &a, const Packet4f &b)
Packet4ui preinterpret< Packet4ui, Packet4f >(const Packet4f &a)
Packet16c pcast< Packet4ui, Packet16c >(const Packet4ui &a, const Packet4ui &b, const Packet4ui &c, const Packet4ui &d)
Packet16c pcast< Packet2l, Packet16c >(const Packet2l &a, const Packet2l &b, const Packet2l &c, const Packet2l &d, const Packet2l &e, const Packet2l &f, const Packet2l &g, const Packet2l &h)
Packet8c pcast< Packet4f, Packet8c >(const Packet4f &a, const Packet4f &b)
Packet2f preinterpret< Packet2f, Packet2i >(const Packet2i &a)
Packet4i pcast< Packet2l, Packet4i >(const Packet2l &a, const Packet2l &b)
Packet4us pcast< Packet4c, Packet4us >(const Packet4c &a)
Packet2l pcast< Packet4f, Packet2l >(const Packet4f &a)
Packet4us pcast< Packet2ul, Packet4us >(const Packet2ul &a, const Packet2ul &b)
Packet2ul preinterpret< Packet2ul, Packet2l >(const Packet2l &a)
Packet2d pcast< Packet4f, Packet2d >(const Packet4f &a)
Packet8uc pcast< Packet2i, Packet8uc >(const Packet2i &a, const Packet2i &b, const Packet2i &c, const Packet2i &d)
Packet4ui pcast< Packet4uc, Packet4ui >(const Packet4uc &a)
Packet4uc pcast< Packet2ul, Packet4uc >(const Packet2ul &a, const Packet2ul &b)
Packet2f pcast< Packet4s, Packet2f >(const Packet4s &a)
Packet4f preinterpret< Packet4f, Packet4ui >(const Packet4ui &a)
Packet4i pcast< Packet16uc, Packet4i >(const Packet16uc &a)
Packet8uc pcast< Packet2ui, Packet8uc >(const Packet2ui &a, const Packet2ui &b, const Packet2ui &c, const Packet2ui &d)
Packet4f pcast< Packet2d, Packet4f >(const Packet2d &a, const Packet2d &b)
Packet2f pcast< Packet2i, Packet2f >(const Packet2i &a)
__vector unsigned char Packet16uc
Packet8us pcast< Packet2ul, Packet8us >(const Packet2ul &a, const Packet2ul &b, const Packet2ul &c, const Packet2ul &d)
Packet8c pcast< Packet2f, Packet8c >(const Packet2f &a, const Packet2f &b, const Packet2f &c, const Packet2f &d)
Packet8c pcast< Packet2i, Packet8c >(const Packet2i &a, const Packet2i &b, const Packet2i &c, const Packet2i &d)
Packet4s pcast< Packet4c, Packet4s >(const Packet4c &a)
Packet4uc pcast< Packet4f, Packet4uc >(const Packet4f &a)
Packet2f pcast< Packet2l, Packet2f >(const Packet2l &a)
Packet2f pcast< Packet4us, Packet2f >(const Packet4us &a)
Packet8c pcast< Packet4ui, Packet8c >(const Packet4ui &a, const Packet4ui &b)
Packet2l pcast< Packet2f, Packet2l >(const Packet2f &a)
Packet16c pcast< Packet2ul, Packet16c >(const Packet2ul &a, const Packet2ul &b, const Packet2ul &c, const Packet2ul &d, const Packet2ul &e, const Packet2ul &f, const Packet2ul &g, const Packet2ul &h)
Packet8c pcast< Packet4s, Packet8c >(const Packet4s &a, const Packet4s &b)
Packet4uc pcast< Packet4ui, Packet4uc >(const Packet4ui &a)
Packet4s pcast< Packet2ul, Packet4s >(const Packet2ul &a, const Packet2ul &b)
Packet4uc pcast< Packet4us, Packet4uc >(const Packet4us &a)
Packet4s pcast< Packet4ui, Packet4s >(const Packet4ui &a)
Packet2ui pcast< Packet4s, Packet2ui >(const Packet4s &a)
Packet2l pcast< Packet4ui, Packet2l >(const Packet4ui &a)
Packet4uc preinterpret< Packet4uc, Packet16uc >(const Packet16uc &a)
Packet4f preinterpret< Packet4f, Packet4i >(const Packet4i &a)
Packet4uc pcast< Packet4s, Packet4uc >(const Packet4s &a)
eigen_packet_wrapper< int32_t,2 > Packet4c
Packet4i pcast< Packet8s, Packet4i >(const Packet8s &a)
Packet2ui pcast< Packet2ul, Packet2ui >(const Packet2ul &a)
Packet4ui pcast< Packet4s, Packet4ui >(const Packet4s &a)
Packet2ui pcast< Packet2f, Packet2ui >(const Packet2f &a)
__vector unsigned short int Packet8us
Packet2l pcast< Packet16c, Packet2l >(const Packet16c &a)
Packet2f pcast< Packet2ul, Packet2f >(const Packet2ul &a)
Packet8c pcast< Packet4us, Packet8c >(const Packet4us &a, const Packet4us &b)
Packet8us pcast< Packet8c, Packet8us >(const Packet8c &a)
Packet4f pcast< Packet8s, Packet4f >(const Packet8s &a)
Packet8us preinterpret< Packet8us, Packet8s >(const Packet8s &a)
Packet4c pcast< Packet4s, Packet4c >(const Packet4s &a)
Packet2i pcast< Packet2ul, Packet2i >(const Packet2ul &a)
Packet8us pcast< Packet16c, Packet8us >(const Packet16c &a)
Packet4uc pcast< Packet4i, Packet4uc >(const Packet4i &a)
Packet8s pcast< Packet8c, Packet8s >(const Packet8c &a)
Packet4ui preinterpret< Packet4ui, Packet4i >(const Packet4i &a)
Packet4f pcast< Packet16c, Packet4f >(const Packet16c &a)
Packet8s pcast< Packet4i, Packet8s >(const Packet4i &a, const Packet4i &b)
Packet4ui pcast< Packet4c, Packet4ui >(const Packet4c &a)
Packet2f preinterpret< Packet2f, Packet2ui >(const Packet2ui &a)
Packet2l preinterpret< Packet2l, Packet2ul >(const Packet2ul &a)
Packet4i pcast< Packet2d, Packet4i >(const Packet2d &a, const Packet2d &b)
Packet4c pcast< Packet4i, Packet4c >(const Packet4i &a)
Packet4ui pcast< Packet8us, Packet4ui >(const Packet8us &a)
Packet8uc pcast< Packet2ul, Packet8uc >(const Packet2ul &a, const Packet2ul &b, const Packet2ul &c, const Packet2ul &d)
Packet8uc pcast< Packet8us, Packet8uc >(const Packet8us &a)
Packet8us pcast< Packet2l, Packet8us >(const Packet2l &a, const Packet2l &b, const Packet2l &c, const Packet2l &d)
Packet4s pcast< Packet4i, Packet4s >(const Packet4i &a)
Packet8s pcast< Packet8uc, Packet8s >(const Packet8uc &a)
Packet2f pcast< Packet2ui, Packet2f >(const Packet2ui &a)
Packet4f pcast< Packet4c, Packet4f >(const Packet4c &a)
Packet2d preinterpret< Packet2d, Packet4i >(const Packet4i &a)
Packet4c pcast< Packet2l, Packet4c >(const Packet2l &a, const Packet2l &b)
Packet4s pcast< Packet2i, Packet4s >(const Packet2i &a, const Packet2i &b)
Packet4us pcast< Packet4f, Packet4us >(const Packet4f &a)
__vector signed char Packet16c
Packet4i pcast< Packet4f, Packet4i >(const Packet4f &a)
Packet4uc pcast< Packet2l, Packet4uc >(const Packet2l &a, const Packet2l &b)
Packet2i pcast< Packet4s, Packet2i >(const Packet4s &a)
Packet4us pcast< Packet2l, Packet4us >(const Packet2l &a, const Packet2l &b)
Packet2ul pcast< Packet16uc, Packet2ul >(const Packet16uc &a)
__vector unsigned int Packet4ui
Packet2i pcast< Packet2l, Packet2i >(const Packet2l &a)
Packet4uc preinterpret< Packet4uc, Packet4c >(const Packet4c &a)
Packet4f pcast< Packet8us, Packet4f >(const Packet8us &a)
Packet4s preinterpret< Packet4s, Packet8s >(const Packet8s &a)
Packet4ui pcast< Packet8s, Packet4ui >(const Packet8s &a)
Packet2ul pcast< Packet8s, Packet2ul >(const Packet8s &a)
Packet2ul pcast< Packet8us, Packet2ul >(const Packet8us &a)
Packet2l pcast< Packet2i, Packet2l >(const Packet2i &a)
Packet8uc pcast< Packet4i, Packet8uc >(const Packet4i &a, const Packet4i &b)
Packet16c pcast< Packet8us, Packet16c >(const Packet8us &a, const Packet8us &b)
Packet8us pcast< Packet4ui, Packet8us >(const Packet4ui &a, const Packet4ui &b)
Packet4i pcast< Packet2ul, Packet4i >(const Packet2ul &a, const Packet2ul &b)
Packet16uc pcast< Packet4i, Packet16uc >(const Packet4i &a, const Packet4i &b, const Packet4i &c, const Packet4i &d)
Packet4uc preinterpret< Packet4uc, Packet8uc >(const Packet8uc &a)
Packet2ui pcast< Packet4us, Packet2ui >(const Packet4us &a)
Packet8s pcast< Packet4f, Packet8s >(const Packet4f &a, const Packet4f &b)
Packet4i pcast< Packet4c, Packet4i >(const Packet4c &a)
Packet8us pcast< Packet4i, Packet8us >(const Packet4i &a, const Packet4i &b)
Packet4f pcast< Packet4ui, Packet4f >(const Packet4ui &a)
Packet8uc pcast< Packet4us, Packet8uc >(const Packet4us &a, const Packet4us &b)
Packet2l pcast< Packet4i, Packet2l >(const Packet4i &a)
Packet8us pcast< Packet16uc, Packet8us >(const Packet16uc &a)
Packet4i pcast< Packet8c, Packet4i >(const Packet8c &a)
Packet4f pcast< Packet4i, Packet4f >(const Packet4i &a)
Packet4s pcast< Packet2ui, Packet4s >(const Packet2ui &a, const Packet2ui &b)
Packet4s pcast< Packet4uc, Packet4s >(const Packet4uc &a)
Packet8s pcast< Packet2ul, Packet8s >(const Packet2ul &a, const Packet2ul &b, const Packet2ul &c, const Packet2ul &d)
Packet8c pcast< Packet2l, Packet8c >(const Packet2l &a, const Packet2l &b, const Packet2l &c, const Packet2l &d)
Packet8s pcast< Packet16c, Packet8s >(const Packet16c &a)
__vector short int Packet8s
Packet8uc pcast< Packet4ui, Packet8uc >(const Packet4ui &a, const Packet4ui &b)
Packet16c pcast< Packet8s, Packet16c >(const Packet8s &a, const Packet8s &b)
Packet8c pcast< Packet2ui, Packet8c >(const Packet2ui &a, const Packet2ui &b, const Packet2ui &c, const Packet2ui &d)
Packet8us pcast< Packet8uc, Packet8us >(const Packet8uc &a)
Packet8uc preinterpret< Packet8uc, Packet8c >(const Packet8c &a)
Packet2f pcast< Packet8c, Packet2f >(const Packet8c &a)
Packet2f preinterpret< Packet2f, Packet4f >(const Packet4f &a)
Packet8uc pcast< Packet4s, Packet8uc >(const Packet4s &a, const Packet4s &b)
Packet4us pcast< Packet4ui, Packet4us >(const Packet4ui &a)
Packet2ul pcast< Packet2ui, Packet2ul >(const Packet2ui &a)
Packet8c pcast< Packet2ul, Packet8c >(const Packet2ul &a, const Packet2ul &b, const Packet2ul &c, const Packet2ul &d)
Packet4ui pcast< Packet16c, Packet4ui >(const Packet16c &a)
Packet4us pcast< Packet2ui, Packet4us >(const Packet2ui &a, const Packet2ui &b)
Packet2ui preinterpret< Packet2ui, Packet4ui >(const Packet4ui &a)
Packet4i pcast< Packet4uc, Packet4i >(const Packet4uc &a)
Packet2i pcast< Packet8c, Packet2i >(const Packet8c &a)
Packet4c pcast< Packet4us, Packet4c >(const Packet4us &a)
Packet2ul pcast< Packet4i, Packet2ul >(const Packet4i &a)
Packet4ui pcast< Packet2ul, Packet4ui >(const Packet2ul &a, const Packet2ul &b)
Packet16uc pcast< Packet4ui, Packet16uc >(const Packet4ui &a, const Packet4ui &b, const Packet4ui &c, const Packet4ui &d)
Packet2l pcast< Packet2ui, Packet2l >(const Packet2ui &a)
Packet2ul pcast< Packet4ui, Packet2ul >(const Packet4ui &a)
Packet4ui pcast< Packet8uc, Packet4ui >(const Packet8uc &a)
Packet4i pcast< Packet8us, Packet4i >(const Packet8us &a)
Packet2ul pcast< Packet4f, Packet2ul >(const Packet4f &a)
Packet4s pcast< Packet4f, Packet4s >(const Packet4f &a)
Packet2i preinterpret< Packet2i, Packet2ui >(const Packet2ui &a)
Packet4ui pcast< Packet2l, Packet4ui >(const Packet2l &a, const Packet2l &b)
Packet8uc pcast< Packet2l, Packet8uc >(const Packet2l &a, const Packet2l &b, const Packet2l &c, const Packet2l &d)
Packet4ui pcast< Packet4us, Packet4ui >(const Packet4us &a)
Packet8c pcast< Packet8s, Packet8c >(const Packet8s &a)
Packet2i preinterpret< Packet2i, Packet2f >(const Packet2f &a)
Packet8c pcast< Packet4i, Packet8c >(const Packet4i &a, const Packet4i &b)
Packet4i preinterpret< Packet4i, Packet4f >(const Packet4f &a)
Packet8c preinterpret< Packet8c, Packet8uc >(const Packet8uc &a)
Packet16c preinterpret< Packet16c, Packet16uc >(const Packet16uc &a)
Packet4us preinterpret< Packet4us, Packet4s >(const Packet4s &a)
Packet8uc pcast< Packet2f, Packet8uc >(const Packet2f &a, const Packet2f &b, const Packet2f &c, const Packet2f &d)
Packet8c preinterpret< Packet8c, Packet16c >(const Packet16c &a)
Packet4us pcast< Packet4uc, Packet4us >(const Packet4uc &a)
Packet2ul pcast< Packet2f, Packet2ul >(const Packet2f &a)
Packet2i pcast< Packet4us, Packet2i >(const Packet4us &a)
Packet16uc preinterpret< Packet16uc, Packet16c >(const Packet16c &a)
Packet2f pcast< Packet8uc, Packet2f >(const Packet8uc &a)
Packet4c preinterpret< Packet4c, Packet4uc >(const Packet4uc &a)
Packet4f pcast< Packet2l, Packet4f >(const Packet2l &a, const Packet2l &b)
Packet8s pcast< Packet2l, Packet8s >(const Packet2l &a, const Packet2l &b, const Packet2l &c, const Packet2l &d)
Packet4s pcast< Packet2l, Packet4s >(const Packet2l &a, const Packet2l &b)
Packet8uc pcast< Packet8s, Packet8uc >(const Packet8s &a)
Packet8us pcast< Packet4f, Packet8us >(const Packet4f &a, const Packet4f &b)
Packet2ui preinterpret< Packet2ui, Packet2f >(const Packet2f &a)
Packet8c pcast< Packet8us, Packet8c >(const Packet8us &a)
Packet4f pcast< Packet2ul, Packet4f >(const Packet2ul &a, const Packet2ul &b)
Packet4ui pcast< Packet4f, Packet4ui >(const Packet4f &a)
Packet2l pcast< Packet8us, Packet2l >(const Packet8us &a)
Packet4f pcast< Packet16uc, Packet4f >(const Packet16uc &a)
Packet2l pcast< Packet16uc, Packet2l >(const Packet16uc &a)
Packet4s preinterpret< Packet4s, Packet4us >(const Packet4us &a)
Packet2ul pcast< Packet16c, Packet2ul >(const Packet16c &a)
Packet4us pcast< Packet2i, Packet4us >(const Packet2i &a, const Packet2i &b)
Packet16uc pcast< Packet4f, Packet16uc >(const Packet4f &a, const Packet4f &b, const Packet4f &c, const Packet4f &d)
Packet16c pcast< Packet4i, Packet16c >(const Packet4i &a, const Packet4i &b, const Packet4i &c, const Packet4i &d)
Packet4s pcast< Packet8c, Packet4s >(const Packet8c &a)
Packet4i preinterpret< Packet4i, Packet2d >(const Packet2d &a)
Packet4s pcast< Packet2f, Packet4s >(const Packet2f &a, const Packet2f &b)
Packet4us pcast< Packet4i, Packet4us >(const Packet4i &a)
Packet2ui pcast< Packet2l, Packet2ui >(const Packet2l &a)
Packet4i pcast< Packet4s, Packet4i >(const Packet4s &a)
Packet16uc pcast< Packet2ul, Packet16uc >(const Packet2ul &a, const Packet2ul &b, const Packet2ul &c, const Packet2ul &d, const Packet2ul &e, const Packet2ul &f, const Packet2ul &g, const Packet2ul &h)
Packet4c pcast< Packet2ul, Packet4c >(const Packet2ul &a, const Packet2ul &b)
Packet2i pcast< Packet2f, Packet2i >(const Packet2f &a)
Packet8s pcast< Packet4ui, Packet8s >(const Packet4ui &a, const Packet4ui &b)
Packet2l pcast< Packet8s, Packet2l >(const Packet8s &a)
Packet2ui preinterpret< Packet2ui, Packet2i >(const Packet2i &a)
Packet2i preinterpret< Packet2i, Packet4i >(const Packet4i &a)
Packet16uc pcast< Packet8s, Packet16uc >(const Packet8s &a, const Packet8s &b)
Packet8s preinterpret< Packet8s, Packet8us >(const Packet8us &a)
eigen_packet_wrapper< uint32_t,5 > Packet4uc
Packet16c pcast< Packet4f, Packet16c >(const Packet4f &a, const Packet4f &b, const Packet4f &c, const Packet4f &d)
Packet8s pcast< Packet16uc, Packet8s >(const Packet16uc &a)
Packet4c preinterpret< Packet4c, Packet16c >(const Packet16c &a)
Packet16uc pcast< Packet2l, Packet16uc >(const Packet2l &a, const Packet2l &b, const Packet2l &c, const Packet2l &d, const Packet2l &e, const Packet2l &f, const Packet2l &g, const Packet2l &h)
Packet4i preinterpret< Packet4i, Packet4ui >(const Packet4ui &a)
Packet4us pcast< Packet2f, Packet4us >(const Packet2f &a, const Packet2f &b)
Packet4f pcast< Packet4s, Packet4f >(const Packet4s &a)
Packet8uc preinterpret< Packet8uc, Packet16uc >(const Packet16uc &a)
Packet4i pcast< Packet16c, Packet4i >(const Packet16c &a)
Packet4c pcast< Packet4ui, Packet4c >(const Packet4ui &a)
Packet4c pcast< Packet4f, Packet4c >(const Packet4f &a)
Packet2ul pcast< Packet2i, Packet2ul >(const Packet2i &a)
Packet4us preinterpret< Packet4us, Packet8us >(const Packet8us &a)
Packet2i pcast< Packet8uc, Packet2i >(const Packet8uc &a)
Packet4i pcast< Packet4us, Packet4i >(const Packet4us &a)
Packet4f pcast< Packet4us, Packet4f >(const Packet4us &a)
Packet4c preinterpret< Packet4c, Packet8c >(const Packet8c &a)