32 return a >
b ?
a -
b :
b -
a;
53 const T out =
static_cast<T>(frexp(
x, &iexp));
54 exp =
static_cast<T>(iexp);
61 return static_cast<T>(ldexp(
x,
static_cast<int>(
exp)));
65 template <
typename SrcPacket,
typename TgtPacket,
int SrcCoeffRatio,
int TgtCoeffRatio>
68 template <
typename SrcPacket,
typename TgtPacket,
int TgtCoeffRatio>
76 for (
i = 0;
i <
size &&
i + SrcPacketSize <=
size;
i += TgtPacketSize) {
77 internal::pstoreu(dst +
i, internal::pcast<SrcPacket, TgtPacket>(internal::ploadu<SrcPacket>(src +
i)));
86 template <
typename SrcPacket,
typename TgtPacket>
92 for (
size_t i = 0;
i <
size;
i += TgtPacketSize) {
93 SrcPacket
a = internal::ploadu<SrcPacket>(src +
i);
94 SrcPacket
b = internal::ploadu<SrcPacket>(src +
i + SrcPacketSize);
100 template <
typename SrcPacket,
typename TgtPacket>
106 for (
size_t i = 0;
i <
size;
i += TgtPacketSize) {
107 SrcPacket
a = internal::ploadu<SrcPacket>(src +
i);
108 SrcPacket
b = internal::ploadu<SrcPacket>(src +
i + SrcPacketSize);
109 SrcPacket
c = internal::ploadu<SrcPacket>(src +
i + 2 * SrcPacketSize);
110 SrcPacket
d = internal::ploadu<SrcPacket>(src +
i + 3 * SrcPacketSize);
116 template <
typename SrcPacket,
typename TgtPacket>
122 for (
size_t i = 0;
i <
size;
i += TgtPacketSize) {
123 SrcPacket
a = internal::ploadu<SrcPacket>(src +
i);
124 SrcPacket
b = internal::ploadu<SrcPacket>(src +
i + SrcPacketSize);
125 SrcPacket
c = internal::ploadu<SrcPacket>(src +
i + 2 * SrcPacketSize);
126 SrcPacket
d = internal::ploadu<SrcPacket>(src +
i + 3 * SrcPacketSize);
127 SrcPacket
e = internal::ploadu<SrcPacket>(src +
i + 4 * SrcPacketSize);
128 SrcPacket
f = internal::ploadu<SrcPacket>(src +
i + 5 * SrcPacketSize);
129 SrcPacket
g = internal::ploadu<SrcPacket>(src +
i + 6 * SrcPacketSize);
130 SrcPacket
h = internal::ploadu<SrcPacket>(src +
i + 7 * SrcPacketSize);
136 template <
typename SrcPacket,
typename TgtPacket,
int SrcCoeffRatio,
int TgtCoeffRatio,
bool CanCast = false>
139 template <
typename SrcPacket,
typename TgtPacket,
int SrcCoeffRatio,
int TgtCoeffRatio>
144 template <
typename SrcPacket,
typename TgtPacket,
int SrcCoeffRatio,
int TgtCoeffRatio>
151 static const int BlockSize = SrcPacketSize * SrcCoeffRatio;
152 eigen_assert(BlockSize == TgtPacketSize * TgtCoeffRatio &&
"Packet sizes and cast ratios are mismatched.");
154 static const int DataSize = 10 * BlockSize;
160 for (
int i = 0;
i < DataSize; ++
i) {
164 for (
int i = 0;
i < DataSize; ++
i) {
165 ref[
i] =
static_cast<const TgtScalar
>(data1[
i]);
174 template <
typename SrcPacket,
typename TgtPacket>
179 typedef typename internal::type_casting_traits<SrcScalar, TgtScalar> TypeCastingTraits;
180 static const int SrcCoeffRatio = TypeCastingTraits::SrcCoeffRatio;
181 static const int TgtCoeffRatio = TypeCastingTraits::TgtCoeffRatio;
184 static const bool HasCast =
185 internal::unpacket_traits<SrcPacket>::vectorizable && internal::unpacket_traits<TgtPacket>::vectorizable &&
186 TypeCastingTraits::VectorizedCast && (SrcPacketSize * SrcCoeffRatio == TgtPacketSize * TgtCoeffRatio);
191 template <
typename SrcPacket,
typename TgtScalar,
193 bool Vectorized = internal::packet_traits<TgtScalar>::Vectorizable,
194 bool HasHalf = !internal::is_same<typename internal::unpacket_traits<TgtPacket>::half, TgtPacket>
::value>
197 template <
typename SrcPacket,
typename TgtScalar,
typename TgtPacket>
202 template <
typename SrcPacket,
typename TgtScalar,
typename TgtPacket>
210 template <
typename SrcPacket,
typename TgtScalar,
typename TgtPacket>
215 template <
typename Scalar,
typename Packet,
typename EnableIf =
void>
237 template <
typename Scalar,
typename Packet>
247 template <
typename Scalar,
typename Packet>
250 const int size = 2 * PacketSize;
255 for (
int i = 0;
i <
size; ++
i) {
256 data1[
i] = internal::random<Scalar>();
260 for (
int i = 0;
i < PacketSize; ++
i) {
262 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
268 for (
int i = 0;
i < PacketSize; ++
i) {
270 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
275 for (
int i = 0;
i < PacketSize; ++
i) {
277 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
282 template <
typename Scalar,
typename Packet>
285 const int size = 2 * PacketSize;
290 for (
int i = 0;
i < PacketSize; ++
i) {
291 data1[
i] = internal::random<Scalar>();
292 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
298 for (
int i = 0;
i < PacketSize; ++
i) {
300 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
305 for (
int i = 0;
i < PacketSize; ++
i) {
307 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
312 template <
typename Scalar,
typename Packet>
315 const int size = 2 * PacketSize;
320 for (
int i = 0;
i < PacketSize; ++
i) {
321 data1[
i] = internal::random<Scalar>();
322 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
329 for (
int i = 0;
i < PacketSize; ++
i) {
331 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
337 for (
int i = 0;
i < PacketSize; ++
i) {
339 data1[
i + PacketSize] = internal::random<bool>() ? data1[
i] :
Scalar(0);
352 template <
typename Scalar,
typename Packet>
355 const int size = 2 * PacketSize;
360 for (
int i = 0;
i < PacketSize; ++
i) {
362 data1[
i + PacketSize] =
Scalar(-0.0);
371 template<
typename Packet,
typename EnableIf =
void>
376 template<
typename Packet>
378 !NumTraits<Packet>::IsComplex &&
379 !internal::is_same<Packet, Eigen::half>::value &&
380 !internal::is_same<Packet, Eigen::bfloat16>::value
384 Scalar s = internal::random<Scalar>();
385 Packet barrier = internal::pset1<Packet>(
s);
391 template <
typename Scalar,
typename Packet>
393 typedef internal::packet_traits<Scalar> PacketTraits;
398 std::cerr <<
"=== Testing packet of type '" <<
typeid(
Packet).
name() <<
"' and scalar type '"
399 <<
typeid(
Scalar).
name() <<
"' and size '" << PacketSize <<
"' ===\n";
401 const int max_size = PacketSize > 4 ? PacketSize : 4;
402 const int size = PacketSize * max_size;
412 for (
int i = 0;
i <
size; ++
i) {
413 data1[
i] = internal::random<Scalar>() /
RealScalar(PacketSize);
414 data2[
i] = internal::random<Scalar>() /
RealScalar(PacketSize);
431 if (internal::unpacket_traits<Packet>::masked_load_available) {
432 test::packet_helper<internal::unpacket_traits<Packet>::masked_load_available,
Packet>
h;
433 unsigned long long max_umask = (0x1ull << PacketSize);
436 for (
unsigned long long umask = 0; umask < max_umask; ++umask) {
437 h.store(data2,
h.load(data1 +
offset, umask));
438 for (
int k = 0; k < PacketSize; ++k) data3[k] = ((umask & (0x1ull << k)) >> k) ? data1[k +
offset] :
Scalar(0);
444 if (internal::unpacket_traits<Packet>::masked_store_available) {
445 test::packet_helper<internal::unpacket_traits<Packet>::masked_store_available,
Packet>
h;
446 unsigned long long max_umask = (0x1ull << PacketSize);
449 for (
unsigned long long umask = 0; umask < max_umask; ++umask) {
451 h.store(data2,
h.loadu(data1 +
offset), umask);
452 for (
int k = 0; k < PacketSize; ++k) data3[k] = ((umask & (0x1ull << k)) >> k) ? data1[k +
offset] :
Scalar(0);
458 VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasAdd);
459 VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasSub);
460 VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasMul);
477 for (
int i = 0;
i < PacketSize * 4; ++
i)
ref[
i] = data1[
i / PacketSize];
479 internal::pbroadcast4<Packet>(data1,
A0,
A1,
A2,
A3);
488 for (
int i = 0;
i < PacketSize * 2; ++
i)
ref[
i] = data1[
i / PacketSize];
490 internal::pbroadcast2<Packet>(data1,
A0,
A1);
498 if (PacketSize > 1) {
501 for (
int i = 0;
i < PacketSize / 2; ++
i)
ref[2 *
i + 0] =
ref[2 *
i + 1] = data1[
offset +
i];
507 if (PacketSize > 2) {
510 for (
int i = 0;
i < PacketSize / 4; ++
i)
518 for (
int i = 0;
i < PacketSize; ++
i)
ref[0] += data1[
i];
522 int HalfPacketSize = PacketSize > 4 ? PacketSize / 2 : PacketSize;
524 for (
int i = 0;
i < PacketSize; ++
i)
ref[
i % HalfPacketSize] += data1[
i];
533 for (
int i = 0;
i < PacketSize; ++
i)
ref[
i] = data1[PacketSize -
i - 1];
537 internal::PacketBlock<Packet> kernel;
538 for (
int i = 0;
i < PacketSize; ++
i) {
539 kernel.packet[
i] = internal::pload<Packet>(data1 +
i * PacketSize);
542 for (
int i = 0;
i < PacketSize; ++
i) {
544 for (
int j = 0;
j < PacketSize; ++
j) {
550 if (PacketSize > 4 && PacketSize % 4 == 0) {
551 internal::PacketBlock<Packet, PacketSize%4==0?4:PacketSize> kernel2;
552 for (
int i = 0;
i < 4; ++
i) {
553 kernel2.packet[
i] = internal::pload<Packet>(data1 +
i * PacketSize);
556 int data_counter = 0;
557 for (
int i = 0;
i < PacketSize; ++
i) {
558 for (
int j = 0;
j < 4; ++
j) {
559 data2[data_counter++] = data1[
j*PacketSize +
i];
562 for (
int i = 0;
i < 4; ++
i) {
564 for (
int j = 0;
j < PacketSize; ++
j) {
570 if (PacketTraits::HasBlend) {
571 Packet thenPacket = internal::pload<Packet>(data1);
572 Packet elsePacket = internal::pload<Packet>(data2);
574 for (
int i = 0;
i < PacketSize; ++
i) {
575 selector.select[
i] =
i;
581 for (
int i = 0;
i < PacketSize; ++
i) {
587 for (
int i = 0;
i < PacketSize; ++
i) {
589 unsigned char v = internal::random<bool>() ? 0xff : 0;
590 char*
bytes = (
char*)(data1 +
i);
591 for (
int k = 0; k <
int(
sizeof(
Scalar)); ++k) {
595 data1[
i + PacketSize] = internal::random<Scalar>();
597 data1[
i + 2 * PacketSize] = internal::random<Scalar>();
602 for (
int i = 0;
i <
size; ++
i) {
603 data1[
i] = internal::random<Scalar>();
610 packetmath_boolean_mask_ops<Scalar, Packet>();
612 packetmath_minus_zero_add<Scalar, Packet>();
614 for (
int i = 0;
i <
size; ++
i) {
623 template <
typename Scalar>
628 template <
typename Scalar,
typename Packet>
630 typedef internal::packet_traits<Scalar> PacketTraits;
633 const int size = PacketSize * 4;
638 for (
int i = 0;
i <
size; ++
i) {
639 data1[
i] =
Scalar(internal::random<double>(0, 1) *
std::pow(10., internal::random<double>(-6, 6)));
640 data2[
i] =
Scalar(internal::random<double>(0, 1) *
std::pow(10., internal::random<double>(-6, 6)));
643 if (internal::random<float>(0, 1) < 0.1
f) data1[internal::random<int>(0, PacketSize)] =
Scalar(0);
649 for (
int i = 0;
i <
size; ++
i) {
650 data1[
i] =
Scalar(internal::random<double>(-1, 1) *
std::pow(10., internal::random<double>(-3, 3)));
651 data2[
i] =
Scalar(internal::random<double>(-1, 1) *
std::pow(10., internal::random<double>(-3, 3)));
662 packetmath_boolean_mask_ops_real<Scalar,Packet>();
665 if (PacketTraits::HasRound || PacketTraits::HasCeil || PacketTraits::HasFloor || PacketTraits::HasRint) {
671 std::vector<Scalar>
values;
672 while (val >
Scalar(0.25)) {
697 for (
size_t k=0; k<
values.size(); ++k) {
706 for (
int i = 0;
i <
size; ++
i) {
707 data1[
i] =
Scalar(internal::random<double>(-1, 1));
708 data2[
i] =
Scalar(internal::random<double>(-1, 1));
713 for (
int i = 0;
i <
size; ++
i) {
714 data1[
i] =
Scalar(internal::random<double>(-87, 88));
715 data2[
i] =
Scalar(internal::random<double>(-87, 88));
720 if (PacketTraits::HasExp) {
722 for (
int j=0;
j<3; ++
j) {
725 data1[0] = -data1[0];
734 test::packet_helper<PacketTraits::HasExp,Packet>
h;
740 for (
int i=0;
i<3; ++
i) {
741 data1[0] = special[
i];
748 for (
int i = 0;
i < PacketSize; ++
i) {
749 data1[
i] =
Scalar(internal::random<double>(-1, 1));
750 data2[
i] =
Scalar(internal::random<double>(-1, 1));
752 for (
int i = 0;
i < PacketSize; ++
i) {
753 data1[
i+PacketSize] =
Scalar(internal::random<int>(-4, 4));
754 data2[
i+PacketSize] =
Scalar(internal::random<double>(-4, 4));
757 if (PacketTraits::HasExp) {
789 for (
int i = 0;
i <
size; ++
i) {
790 data1[
i] =
Scalar(internal::random<double>(-1, 1) *
std::pow(10., internal::random<double>(-6, 6)));
791 data2[
i] =
Scalar(internal::random<double>(-1, 1) *
std::pow(10., internal::random<double>(-6, 6)));
795 if (PacketTraits::HasExp && PacketSize >= 2) {
799 test::packet_helper<PacketTraits::HasExp, Packet>
h;
822 data1[0] = std::numeric_limits<Scalar>::denorm_min();
823 data1[1] = -std::numeric_limits<Scalar>::denorm_min();
829 if (PacketTraits::HasTanh) {
832 test::packet_helper<internal::packet_traits<Scalar>::HasTanh,
Packet>
h;
837 if (PacketTraits::HasExp) {
838 internal::scalar_logistic_op<Scalar>
logistic;
839 for (
int i = 0;
i <
size; ++
i) {
840 data1[
i] =
Scalar(internal::random<double>(-20, 20));
843 test::packet_helper<PacketTraits::HasExp, Packet>
h;
844 h.store(data2,
logistic.packetOp(
h.load(data1)));
845 for (
int i = 0;
i < PacketSize; ++
i) {
850 #if EIGEN_HAS_C99_MATH && (EIGEN_COMP_CXXVER >= 11)
859 if (PacketSize >= 2) {
862 if (PacketTraits::HasLog) {
863 test::packet_helper<PacketTraits::HasLog, Packet>
h;
888 if (std::numeric_limits<Scalar>::has_denorm == std::denorm_present) {
889 data1[0] = std::numeric_limits<Scalar>::denorm_min();
890 data1[1] = -std::numeric_limits<Scalar>::denorm_min();
906 if (PacketTraits::HasLog1p) {
907 test::packet_helper<PacketTraits::HasLog1p, Packet>
h;
914 if (PacketTraits::HasSqrt) {
915 test::packet_helper<PacketTraits::HasSqrt, Packet>
h;
917 if (std::numeric_limits<Scalar>::has_denorm == std::denorm_present) {
918 data1[1] = -std::numeric_limits<Scalar>::denorm_min();
927 if (PacketTraits::HasCos
930 test::packet_helper<PacketTraits::HasCos, Packet>
h;
932 for (
int k1 = 0;
k1 <= 1; ++
k1) {
933 data1[0] =
Scalar((2 *
double(k) +
k1) *
double(
EIGEN_PI) / 2 * internal::random<double>(0.8, 1.2));
934 data1[1] =
Scalar((2 *
double(k) + 2 +
k1) *
double(
EIGEN_PI) / 2 * internal::random<double>(0.8, 1.2));
977 #define CAST_CHECK_CWISE1_IF(COND, REFOP, POP, SCALAR, REFTYPE) if(COND) { \
978 test::packet_helper<COND,Packet> h; \
979 for (int i=0; i<PacketSize; ++i) \
980 ref[i] = SCALAR(REFOP(static_cast<REFTYPE>(data1[i]))); \
981 h.store(data2, POP(h.load(data1))); \
982 VERIFY(test::areApprox(ref, data2, PacketSize) && #POP); \
985 template <
typename Scalar>
992 template <
typename Scalar>
999 template <
typename Scalar>
1006 template <
typename Scalar>
1013 template <
typename Scalar,
typename Packet>
1015 typedef internal::packet_traits<Scalar> PacketTraits;
1024 VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasMin);
1025 VERIFY((!PacketTraits::Vectorizable) || PacketTraits::HasMax);
1042 for (
int i = 0;
i < PacketSize; ++
i)
ref[
i] = data1[0] +
Scalar(
i);
1047 unsigned char* data1_bits =
reinterpret_cast<unsigned char*
>(data1);
1059 for (
unsigned int i = 0;
i < PacketSize *
sizeof(
Scalar); ++
i) data1_bits[
i] = 0
x0;
1061 for (
int k = 0; k < PacketSize; ++k) {
1062 for (
unsigned int i = 0;
i <
sizeof(
Scalar); ++
i) data1_bits[k *
sizeof(
Scalar) +
i] = 0xff;
1064 for (
unsigned int i = 0;
i <
sizeof(
Scalar); ++
i) data1_bits[k *
sizeof(
Scalar) +
i] = 0x00;
1073 for (
int i = 0; i < PacketSize; ++i) ref[0] = internal::pmin<PropagateNumbers>(
ref[0], data1[
i]);
1074 VERIFY(
internal::isApprox(
ref[0], internal::predux_min<PropagateNumbers>(internal::pload<Packet>(data1))) &&
"internal::predux_min<PropagateNumbers>");
1076 for (
int i = 0; i < PacketSize; ++i) ref[0] = internal::pmin<PropagateNaN>(
ref[0], data1[
i]);
1077 VERIFY(
internal::isApprox(
ref[0], internal::predux_min<PropagateNaN>(internal::pload<Packet>(data1))) &&
"internal::predux_min<PropagateNaN>");
1079 for (
int i = 0; i < PacketSize; ++i) ref[0] = internal::pmax<PropagateNumbers>(
ref[0], data1[
i]);
1080 VERIFY(
internal::isApprox(
ref[0], internal::predux_max<PropagateNumbers>(internal::pload<Packet>(data1))) &&
"internal::predux_max<PropagateNumbers>");
1082 for (
int i = 0; i < PacketSize; ++i) ref[0] = internal::pmax<PropagateNaN>(
ref[0], data1[
i]);
1083 VERIFY(
internal::isApprox(
ref[0], internal::predux_max<PropagateNaN>(internal::pload<Packet>(data1))) &&
"internal::predux_max<PropagateNumbers>");
1085 const size_t index = std::numeric_limits<size_t>::quiet_NaN() % PacketSize;
1087 VERIFY(PacketSize==1 || !(
numext::isnan)(internal::predux_min<PropagateNumbers>(internal::pload<Packet>(data1))));
1088 VERIFY((
numext::isnan)(internal::predux_min<PropagateNaN>(internal::pload<Packet>(data1))));
1089 VERIFY(PacketSize==1 || !(
numext::isnan)(internal::predux_max<PropagateNumbers>(internal::pload<Packet>(data1))));
1090 VERIFY((
numext::isnan)(internal::predux_max<PropagateNaN>(internal::pload<Packet>(data1))));
1092 for (
int i = 0; i < 4 * PacketSize; ++i) data1[i] = NumTraits<Scalar>::quiet_NaN();
1093 VERIFY((
numext::isnan)(internal::predux_min<PropagateNumbers>(internal::pload<Packet>(data1))));
1094 VERIFY((
numext::isnan)(internal::predux_min<PropagateNaN>(internal::pload<Packet>(data1))));
1095 VERIFY((
numext::isnan)(internal::predux_max<PropagateNumbers>(internal::pload<Packet>(data1))));
1096 VERIFY((
numext::isnan)(internal::predux_max<PropagateNaN>(internal::pload<Packet>(data1))));
1099 for (
int i = 0;
i < PacketSize; ++
i) {
1110 packetmath_boolean_mask_ops_notcomplex<Scalar, Packet>();
1113 template <
typename Scalar,
typename Packet,
bool ConjLhs,
bool ConjRhs>
1117 internal::conj_if<ConjLhs> cj0;
1118 internal::conj_if<ConjRhs> cj1;
1119 internal::conj_helper<Scalar, Scalar, ConjLhs, ConjRhs> cj;
1120 internal::conj_helper<Packet, Packet, ConjLhs, ConjRhs> pcj;
1122 for (
int i = 0;
i < PacketSize; ++
i) {
1123 ref[
i] = cj0(data1[
i]) * cj1(data2[
i]);
1126 internal::pstore(pval, pcj.pmul(internal::pload<Packet>(data1), internal::pload<Packet>(data2)));
1129 for (
int i = 0;
i < PacketSize; ++
i) {
1131 ref[
i] += cj0(data1[
i]) * cj1(data2[
i]);
1135 pval, pcj.pmadd(internal::pload<Packet>(data1), internal::pload<Packet>(data2), internal::pload<Packet>(pval)));
1139 template <
typename Scalar,
typename Packet>
1141 typedef internal::packet_traits<Scalar> PacketTraits;
1142 typedef typename Scalar::value_type
RealScalar;
1145 const int size = PacketSize * 4;
1151 for (
int i = 0;
i <
size; ++
i) {
1152 data1[
i] = internal::random<Scalar>() *
Scalar(1e2);
1153 data2[
i] = internal::random<Scalar>() *
Scalar(1e2);
1156 test_conj_helper<Scalar, Packet, false, false>(data1, data2,
ref, pval);
1157 test_conj_helper<Scalar, Packet, false, true>(data1, data2,
ref, pval);
1158 test_conj_helper<Scalar, Packet, true, false>(data1, data2,
ref, pval);
1159 test_conj_helper<Scalar, Packet, true, true>(data1, data2,
ref, pval);
1168 if (PacketTraits::HasSqrt) {
1169 for (
int i = 0;
i <
size; ++
i) {
1170 data1[
i] =
Scalar(internal::random<RealScalar>(), internal::random<RealScalar>());
1177 const RealScalar inf = std::numeric_limits<RealScalar>::infinity();
1178 const RealScalar nan = std::numeric_limits<RealScalar>::quiet_NaN();
1186 data1[2] =
Scalar(one, one);
1187 data1[3] =
Scalar(-one, -one);
1201 data1[2] =
Scalar(nan, one);
1202 data1[3] =
Scalar(one, nan);
1204 data1[0] =
Scalar(nan, nan);
1212 template <
typename Scalar,
typename Packet>
1218 for (
int i = 0;
i < PacketSize; ++
i) {
1219 data1[
i] = internal::random<Scalar>() /
RealScalar(PacketSize);
1222 int stride = internal::random<int>(1, 20);
1227 Packet packet = internal::pload<Packet>(data1);
1228 internal::pscatter<Scalar, Packet>(
buffer, packet, stride);
1230 for (
int i = 0;
i < PacketSize * 20; ++
i) {
1231 if ((
i % stride) == 0 &&
i < stride * PacketSize) {
1238 for (
int i = 0;
i < PacketSize * 7; ++
i) {
1241 packet = internal::pgather<Scalar, Packet>(
buffer, 7);
1243 for (
int i = 0;
i < PacketSize; ++
i) {
1251 template <
typename Scalar,
typename PacketType>
1254 packetmath<Scalar, PacketType>();
1255 packetmath_scatter_gather<Scalar, PacketType>();
1256 packetmath_notcomplex<Scalar, PacketType>();
1257 packetmath_real<Scalar, PacketType>();
1261 template <
typename Scalar,
typename PacketType>
1264 packetmath<Scalar, PacketType>();
1265 packetmath_scatter_gather<Scalar, PacketType>();
1266 packetmath_notcomplex<Scalar, PacketType>();
1270 template <
typename Scalar,
typename PacketType>
1273 packetmath<Scalar, PacketType>();
1274 packetmath_scatter_gather<Scalar, PacketType>();
1275 packetmath_complex<Scalar, PacketType>();