WPILibC++ 2023.4.3-108-ge5452e3
GenericPacketMathFunctionsFwd.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// Copyright (C) 2019 Gael Guennebaud <gael.guennebaud@inria.fr>
5//
6// This Source Code Form is subject to the terms of the Mozilla
7// Public License v. 2.0. If a copy of the MPL was not distributed
8// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
10#ifndef EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H
11#define EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H
12
13namespace Eigen {
14namespace internal {
15
16// Forward declarations of the generic math functions
17// implemented in GenericPacketMathFunctions.h
18// This is needed to workaround a circular dependency.
19
20/***************************************************************************
21 * Some generic implementations to be used by implementors
22***************************************************************************/
23
24/** Default implementation of pfrexp.
25 * It is expected to be called by implementers of template<> pfrexp.
26 */
27template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
28Packet pfrexp_generic(const Packet& a, Packet& exponent);
29
30// Extracts the biased exponent value from Packet p, and casts the results to
31// a floating-point Packet type. Used by pfrexp_generic. Override this if
32// there is no unpacket_traits<Packet>::integer_packet.
33template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
34Packet pfrexp_generic_get_biased_exponent(const Packet& p);
35
36/** Default implementation of pldexp.
37 * It is expected to be called by implementers of template<> pldexp.
38 */
39template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
40Packet pldexp_generic(const Packet& a, const Packet& exponent);
41
42/** \internal \returns log(x) for single precision float */
43template <typename Packet>
46Packet plog_float(const Packet _x);
47
48/** \internal \returns log2(x) for single precision float */
49template <typename Packet>
52Packet plog2_float(const Packet _x);
53
54/** \internal \returns log(x) for single precision float */
55template <typename Packet>
58Packet plog_double(const Packet _x);
59
60/** \internal \returns log2(x) for single precision float */
61template <typename Packet>
64Packet plog2_double(const Packet _x);
65
66/** \internal \returns log(1 + x) */
67template<typename Packet>
68Packet generic_plog1p(const Packet& x);
69
70/** \internal \returns exp(x)-1 */
71template<typename Packet>
72Packet generic_expm1(const Packet& x);
73
74/** \internal \returns exp(x) for single precision float */
75template <typename Packet>
78Packet pexp_float(const Packet _x);
79
80/** \internal \returns exp(x) for double precision real numbers */
81template <typename Packet>
84Packet pexp_double(const Packet _x);
85
86/** \internal \returns sin(x) for single precision float */
87template<typename Packet>
90Packet psin_float(const Packet& x);
91
92/** \internal \returns cos(x) for single precision float */
93template<typename Packet>
96Packet pcos_float(const Packet& x);
97
98/** \internal \returns sqrt(x) for complex types */
99template<typename Packet>
102Packet psqrt_complex(const Packet& a);
103
104template <typename Packet, int N> struct ppolevl;
105
106
107} // end namespace internal
108} // end namespace Eigen
109
110#endif // EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H
#define EIGEN_UNUSED
Definition: Macros.h:1077
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:986
#define EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
Definition: Macros.h:995
#define EIGEN_STRONG_INLINE
Definition: Macros.h:927
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet plog2_float(const Packet _x)
Definition: GenericPacketMathFunctions.h:262
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet pexp_double(const Packet _x)
Definition: GenericPacketMathFunctions.h:490
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet psin_float(const Packet &x)
Definition: GenericPacketMathFunctions.h:747
Packet generic_plog1p(const Packet &x)
Definition: GenericPacketMathFunctions.h:392
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet pcos_float(const Packet &x)
Definition: GenericPacketMathFunctions.h:755
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet plog2_double(const Packet _x)
Definition: GenericPacketMathFunctions.h:383
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet psqrt_complex(const Packet &a)
Definition: GenericPacketMathFunctions.h:764
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet plog_float(const Packet _x)
Definition: GenericPacketMathFunctions.h:254
EIGEN_STRONG_INLINE Packet4d pfrexp_generic_get_biased_exponent(const Packet4d &a)
Definition: PacketMath.h:743
Packet generic_expm1(const Packet &x)
Definition: GenericPacketMathFunctions.h:408
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet plog_double(const Packet _x)
Definition: GenericPacketMathFunctions.h:375
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet pldexp_generic(const Packet &a, const Packet &exponent)
Default implementation of pldexp.
Definition: GenericPacketMathFunctions.h:85
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Packet pfrexp_generic(const Packet &a, Packet &exponent)
Default implementation of pfrexp.
Definition: GenericPacketMathFunctions.h:40
EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS EIGEN_UNUSED Packet pexp_float(const Packet _x)
Definition: GenericPacketMathFunctions.h:439
Namespace containing all symbols from the Eigen library.
Definition: Core:141
Definition: Eigen_Colamd.h:50