mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Special function implementations for half/bfloat16 packets.
Current implementations fail to consider half-float packets, only half-float scalars. Added specializations for packets on AVX, AVX512 and NEON. Added tests to `special_packetmath`. The current `special_functions` tests would fail for half and bfloat16 due to lack of precision. The NEON tests also fail with precision issues and due to different handling of `sqrt(inf)`, so special functions bessel, ndtri have been disabled. Tested with AVX, AVX512.
This commit is contained in:
@@ -147,7 +147,9 @@ struct packet_traits<Eigen::half> : default_packet_traits {
|
||||
HasRound = 1,
|
||||
HasFloor = 1,
|
||||
HasCeil = 1,
|
||||
HasRint = 1
|
||||
HasRint = 1,
|
||||
HasBessel = 1,
|
||||
HasNdtri = 1,
|
||||
};
|
||||
};
|
||||
|
||||
@@ -189,7 +191,9 @@ struct packet_traits<bfloat16> : default_packet_traits {
|
||||
HasRound = 1,
|
||||
HasFloor = 1,
|
||||
HasCeil = 1,
|
||||
HasRint = 1
|
||||
HasRint = 1,
|
||||
HasBessel = 1,
|
||||
HasNdtri = 1,
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user