mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Vectorize fp16 tanh and logistic functions on Neon
Activates vectorization of the Eigen::half versions of the tanh and logistic functions when they run on Neon. Both functions convert their inputs to float before computing the output, and as a result of this commit, the conversions and the computation in float are vectorized.
This commit is contained in:
committed by
Rasmus Munk Larsen
parent
185ad0e610
commit
6bb6a6bf53
@@ -4028,6 +4028,7 @@ struct packet_traits<Eigen::half> : default_packet_traits {
|
||||
HasCos = 0,
|
||||
HasLog = 0,
|
||||
HasExp = 0,
|
||||
HasTanh = packet_traits<float>::HasTanh, // tanh<half> calls tanh<float>
|
||||
HasSqrt = 1,
|
||||
HasRsqrt = 1,
|
||||
HasErf = EIGEN_FAST_MATH,
|
||||
|
||||
Reference in New Issue
Block a user