Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:52:55

0001 #ifndef EIGEN_NEON_BESSELFUNCTIONS_H
0002 #define EIGEN_NEON_BESSELFUNCTIONS_H
0003 
0004 namespace Eigen {
0005 namespace internal {
0006 
0007 #if EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
0008 
0009 #define NEON_HALF_TO_FLOAT_FUNCTIONS(METHOD)                            \
0010 template <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE                       \
0011 Packet8hf METHOD<Packet8hf>(const Packet8hf& x) {                       \
0012   const Packet4f lo = METHOD<Packet4f>(vcvt_f32_f16(vget_low_f16(x)));  \
0013   const Packet4f hi = METHOD<Packet4f>(vcvt_f32_f16(vget_high_f16(x))); \
0014   return vcombine_f16(vcvt_f16_f32(lo), vcvt_f16_f32(hi));              \
0015 }                                                                       \
0016                                                                         \
0017 template <> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE                       \
0018 Packet4hf METHOD<Packet4hf>(const Packet4hf& x) {                       \
0019   return vcvt_f16_f32(METHOD<Packet4f>(vcvt_f32_f16(x)));               \
0020 }
0021 
0022 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_i0)
0023 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_i0e)
0024 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_i1)
0025 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_i1e)
0026 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_j0)
0027 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_j1)
0028 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_k0)
0029 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_k0e)
0030 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_k1)
0031 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_k1e)
0032 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_y0)
0033 NEON_HALF_TO_FLOAT_FUNCTIONS(pbessel_y1)
0034 
0035 #undef NEON_HALF_TO_FLOAT_FUNCTIONS
0036 #endif
0037 
0038 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_i0)
0039 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_i0e)
0040 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_i1)
0041 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_i1e)
0042 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_j0)
0043 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_j1)
0044 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_k0)
0045 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_k0e)
0046 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_k1)
0047 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_k1e)
0048 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_y0)
0049 BF16_PACKET_FUNCTION(Packet4f, Packet4bf, pbessel_y1)
0050 
0051 }  // namespace internal
0052 }  // namespace Eigen
0053 
0054 #endif  // EIGEN_NEON_BESSELFUNCTIONS_H