Eigen/src/Core/arch/NEON/MathFunctions.h
Go to the documentation of this file.
1 // This file is part of Eigen, a lightweight C++ template library
2 // for linear algebra.
3 //
4 // This Source Code Form is subject to the terms of the Mozilla
5 // Public License v. 2.0. If a copy of the MPL was not distributed
6 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 
8 #ifndef EIGEN_MATH_FUNCTIONS_NEON_H
9 #define EIGEN_MATH_FUNCTIONS_NEON_H
10 
11 namespace Eigen {
12 
13 namespace internal {
14 
16 { return pexp_float(x); }
18 { return pexp_float(x); }
19 
21 { return plog_float(x); }
23 { return plog_float(x); }
24 
26 { return psin_float(x); }
28 { return psin_float(x); }
29 
31 { return pcos_float(x); }
33 { return pcos_float(x); }
34 
35 // Hyperbolic Tangent function.
40 
46 
47 template <>
49  Packet4f fexponent;
50  const Packet4bf out = F32ToBf16(pfrexp<Packet4f>(Bf16ToF32(a), fexponent));
51  exponent = F32ToBf16(fexponent);
52  return out;
53 }
54 
55 template <>
57  return F32ToBf16(pldexp<Packet4f>(Bf16ToF32(a), Bf16ToF32(exponent)));
58 }
59 
60 //---------- double ----------
61 
62 #if EIGEN_ARCH_ARM64 && !EIGEN_APPLE_DOUBLE_NEON_BUG
64 { return pexp_double(x); }
65 
67 { return plog_double(x); }
68 
69 #endif
70 
71 } // end namespace internal
72 
73 } // end namespace Eigen
74 
75 #endif // EIGEN_MATH_FUNCTIONS_NEON_H
Eigen::internal::eigen_packet_wrapper
Definition: GenericPacketMath.h:159
Eigen::internal::pldexp
EIGEN_STRONG_INLINE Packet8h pldexp(const Packet8h &a, const Packet8h &exponent)
Definition: Eigen/src/Core/arch/AVX/MathFunctions.h:196
Eigen
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Eigen::internal::Packet4f
__vector float Packet4f
Definition: AltiVec/PacketMath.h:30
Eigen::internal::pldexp< Packet4f >
EIGEN_STRONG_INLINE Packet4f pldexp< Packet4f >(const Packet4f &a, const Packet4f &exponent)
Definition: AltiVec/PacketMath.h:1354
Eigen::internal::pexp< Packet2f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f pexp< Packet2f >(const Packet2f &x)
Definition: Eigen/src/Core/arch/NEON/MathFunctions.h:15
Eigen::internal::pexp< Packet2d >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d pexp< Packet2d >(const Packet2d &_x)
Definition: Eigen/src/Core/arch/MSA/MathFunctions.h:326
x
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Definition: gnuplot_common_settings.hh:12
Eigen::internal::pexp_float
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet pexp_float(const Packet _x)
Definition: GenericPacketMathFunctions.h:439
Eigen::internal::pcos< Packet4f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f pcos< Packet4f >(const Packet4f &_x)
Definition: Eigen/src/Core/arch/AltiVec/MathFunctions.h:38
Eigen::internal::plog_float
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet plog_float(const Packet _x)
Definition: GenericPacketMathFunctions.h:254
Eigen::internal::plog_double
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet plog_double(const Packet _x)
Definition: GenericPacketMathFunctions.h:375
Eigen::internal::pfrexp< Packet4f >
EIGEN_STRONG_INLINE Packet4f pfrexp< Packet4f >(const Packet4f &a, Packet4f &exponent)
Definition: AltiVec/PacketMath.h:1361
Eigen::internal::pcos< Packet2f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f pcos< Packet2f >(const Packet2f &x)
Definition: Eigen/src/Core/arch/NEON/MathFunctions.h:30
Eigen::internal::ptanh< Packet4f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f ptanh< Packet4f >(const Packet4f &x)
Definition: Eigen/src/Core/arch/AltiVec/MathFunctions.h:82
Eigen::internal::pcos
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pcos(const Packet &a)
Definition: GenericPacketMath.h:756
Eigen::internal::pfrexp
EIGEN_STRONG_INLINE Packet8h pfrexp(const Packet8h &a, Packet8h &exponent)
Definition: Eigen/src/Core/arch/AVX/MathFunctions.h:188
Eigen::internal::psin< Packet4f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f psin< Packet4f >(const Packet4f &_x)
Definition: Eigen/src/Core/arch/AltiVec/MathFunctions.h:32
Eigen::internal::pexp< Packet4f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f pexp< Packet4f >(const Packet4f &_x)
Definition: Eigen/src/Core/arch/AltiVec/MathFunctions.h:26
Eigen::internal::generic_fast_tanh_float
T generic_fast_tanh_float(const T &a_x)
Definition: MathFunctionsImpl.h:29
Eigen::internal::F32ToBf16
EIGEN_STRONG_INLINE Packet8bf F32ToBf16(Packet4f p4f)
Definition: AltiVec/PacketMath.h:1252
BF16_PACKET_FUNCTION
#define BF16_PACKET_FUNCTION(PACKET_F, PACKET_BF16, METHOD)
Definition: BFloat16.h:19
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:917
Eigen::internal::plog< Packet2d >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2d plog< Packet2d >(const Packet2d &_x)
Definition: Eigen/src/Core/arch/SSE/MathFunctions.h:28
Eigen::internal::pexp
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pexp(const Packet &a)
Definition: GenericPacketMath.h:788
out
std::ofstream out("Result.txt")
Eigen::internal::Packet4bf
eigen_packet_wrapper< uint16x4_t, 19 > Packet4bf
Definition: NEON/PacketMath.h:3317
Eigen::internal::psin
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psin(const Packet &a)
Definition: GenericPacketMath.h:752
Eigen::internal::Bf16ToF32
EIGEN_STRONG_INLINE Packet8f Bf16ToF32(const Packet8bf &a)
Definition: AVX/PacketMath.h:1260
a
ArrayXXi a
Definition: Array_initializer_list_23_cxx11.cpp:1
Eigen::internal::Packet2d
v2f64 Packet2d
Definition: MSA/PacketMath.h:820
Eigen::internal::pcos_float
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet pcos_float(const Packet &x)
Definition: GenericPacketMathFunctions.h:755
Eigen::internal::Packet2f
float32x2_t Packet2f
Definition: NEON/PacketMath.h:62
Eigen::internal::plog< Packet2f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f plog< Packet2f >(const Packet2f &x)
Definition: Eigen/src/Core/arch/NEON/MathFunctions.h:20
Eigen::internal::plog
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plog(const Packet &a)
Definition: GenericPacketMath.h:796
Eigen::internal::plog< Packet4f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet4f plog< Packet4f >(const Packet4f &_x)
Definition: Eigen/src/Core/arch/AltiVec/MathFunctions.h:20
Eigen::internal::psin_float
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet psin_float(const Packet &x)
Definition: GenericPacketMathFunctions.h:747
EIGEN_UNUSED
#define EIGEN_UNUSED
Definition: Macros.h:1067
Eigen::internal::ptanh
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet ptanh(const Packet &a)
Definition: GenericPacketMath.h:784
internal
Definition: BandTriangularSolver.h:13
Eigen::internal::pexp_double
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet pexp_double(const Packet _x)
Definition: GenericPacketMathFunctions.h:490
Eigen::internal::psin< Packet2f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f psin< Packet2f >(const Packet2f &x)
Definition: Eigen/src/Core/arch/NEON/MathFunctions.h:25
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
#define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Definition: Macros.h:985
Eigen::internal::ptanh< Packet2f >
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet2f ptanh< Packet2f >(const Packet2f &x)
Definition: Eigen/src/Core/arch/NEON/MathFunctions.h:36


gtsam
Author(s):
autogenerated on Thu Jun 13 2024 03:03:32