File indexing completed on 2025-01-19 09:51:42
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef EIGEN_MATH_FUNCTIONS_NEON_H
0009 #define EIGEN_MATH_FUNCTIONS_NEON_H
0010
0011 namespace Eigen {
0012
0013 namespace internal {
0014
0015 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f pexp<Packet2f>(const Packet2f& x)
0016 { return pexp_float(x); }
0017 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f pexp<Packet4f>(const Packet4f& x)
0018 { return pexp_float(x); }
0019
0020 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f plog<Packet2f>(const Packet2f& x)
0021 { return plog_float(x); }
0022 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f plog<Packet4f>(const Packet4f& x)
0023 { return plog_float(x); }
0024
0025 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f psin<Packet2f>(const Packet2f& x)
0026 { return psin_float(x); }
0027 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f psin<Packet4f>(const Packet4f& x)
0028 { return psin_float(x); }
0029
0030 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f pcos<Packet2f>(const Packet2f& x)
0031 { return pcos_float(x); }
0032 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f pcos<Packet4f>(const Packet4f& x)
0033 { return pcos_float(x); }
0034
0035
0036 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f ptanh<Packet2f>(const Packet2f& x)
0037 { return internal::generic_fast_tanh_float(x); }
0038 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f ptanh<Packet4f>(const Packet4f& x)
0039 { return internal::generic_fast_tanh_float(x); }
0040
0041 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, psin)
0042 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pcos)
0043 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, plog)
0044 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pexp)
0045 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, ptanh)
0046
0047 template <>
0048 EIGEN_STRONG_INLINE Packet4bf pfrexp(const Packet4bf& a, Packet4bf& exponent) {
0049 Packet4f fexponent;
0050 const Packet4bf out = F32ToBf16(pfrexp<Packet4f>(Bf16ToF32(a), fexponent));
0051 exponent = F32ToBf16(fexponent);
0052 return out;
0053 }
0054
0055 template <>
0056 EIGEN_STRONG_INLINE Packet4bf pldexp(const Packet4bf& a, const Packet4bf& exponent) {
0057 return F32ToBf16(pldexp<Packet4f>(Bf16ToF32(a), Bf16ToF32(exponent)));
0058 }
0059
0060
0061
0062 #if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG
0063 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d pexp<Packet2d>(const Packet2d& x)
0064 { return pexp_double(x); }
0065
0066 template<> EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d plog<Packet2d>(const Packet2d& x)
0067 { return plog_double(x); }
0068
0069 #endif
0070
0071 }
0072
0073 }
0074
0075 #endif