Vectorize atanh & add a missing definition and unit test for atan.

This commit is contained in:
Rasmus Munk Larsen
2023-02-21 03:14:05 +00:00
parent 049a144798
commit ce62177b5b
17 changed files with 179 additions and 25 deletions

View File

@@ -81,11 +81,6 @@ Packet4f pacos<Packet4f>(const Packet4f& _x)
return pacos_float(_x);
}
template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet2d patan<Packet2d>(const Packet2d& _x) {
return patan_double(_x);
}
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet4f pasin<Packet4f>(const Packet4f& _x)
{
@@ -98,6 +93,17 @@ Packet4f patan<Packet4f>(const Packet4f& _x)
return patan_float(_x);
}
template <> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet2d patan<Packet2d>(const Packet2d& _x) {
return patan_double(_x);
}
template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Packet4f patanh<Packet4f>(const Packet4f& _x)
{
return patanh_float(_x);
}
// Notice that for newer processors, it is counterproductive to use Newton
// iteration for square root. In particular, Skylake and Zen2 processors
// have approximately doubled throughput of the _mm_sqrt_ps instruction

View File

@@ -142,6 +142,7 @@ struct packet_traits<float> : default_packet_traits {
HasACos = 1,
HasASin = 1,
HasATan = 1,
HasATanh = 1,
HasLog = 1,
HasLog1p = 1,
HasExpm1 = 1,