8 #ifndef EIGEN_NEON_UNARY_FUNCTORS_H
9 #define EIGEN_NEON_UNARY_FUNCTORS_H
11 #include "../../InternalHeaderCheck.h"
17 #if EIGEN_HAS_ARM64_FP16_VECTOR_ARITHMETIC
22 struct scalar_logistic_op<
Eigen::half> {
26 const scalar_logistic_op<float> float_op;
36 Packet4hf packetOp(
const Packet4hf&
x)
const {
37 const scalar_logistic_op<float> float_op;
38 return vcvt_f16_f32(float_op.packetOp(vcvt_f32_f16(
x)));
42 Packet8hf packetOp(
const Packet8hf&
x)
const {
43 const scalar_logistic_op<float> float_op;
45 vcvt_f16_f32(float_op.packetOp(vcvt_f32_f16(vget_low_f16(
x)))),
46 vcvt_f16_f32(float_op.packetOp(vcvt_high_f32_f16(
x))));
51 struct functor_traits<scalar_logistic_op<
Eigen::half>> {
53 Cost = functor_traits<scalar_logistic_op<float>>::Cost,
54 PacketAccess = functor_traits<scalar_logistic_op<float>>::PacketAccess,
IndexedView_or_Block operator()(const RowIndices &rowIndices, const ColIndices &colIndices)
#define EIGEN_DEVICE_FUNC