Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-19 09:51:39

0001 // This file is part of Eigen, a lightweight C++ template library
0002 // for linear algebra.
0003 //
0004 // Copyright (C) 2019 Gael Guennebaud <gael.guennebaud@inria.fr>
0005 //
0006 // This Source Code Form is subject to the terms of the Mozilla
0007 // Public License v. 2.0. If a copy of the MPL was not distributed
0008 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
0009 
0010 #ifndef EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H
0011 #define EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H
0012 
0013 namespace Eigen {
0014 namespace internal {
0015 
0016 // Forward declarations of the generic math functions
0017 // implemented in GenericPacketMathFunctions.h
0018 // This is needed to workaround a circular dependency.
0019 
0020 /***************************************************************************
0021  * Some generic implementations to be used by implementors
0022 ***************************************************************************/
0023 
0024 /** Default implementation of pfrexp.
0025   * It is expected to be called by implementers of template<> pfrexp.
0026   */
0027 template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
0028 Packet pfrexp_generic(const Packet& a, Packet& exponent);
0029 
0030 // Extracts the biased exponent value from Packet p, and casts the results to
0031 // a floating-point Packet type. Used by pfrexp_generic. Override this if
0032 // there is no unpacket_traits<Packet>::integer_packet.
0033 template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
0034 Packet pfrexp_generic_get_biased_exponent(const Packet& p);
0035 
0036 /** Default implementation of pldexp.
0037   * It is expected to be called by implementers of template<> pldexp.
0038   */
0039 template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
0040 Packet pldexp_generic(const Packet& a, const Packet& exponent);
0041 
0042 /** \internal \returns log(x) for single precision float */
0043 template <typename Packet>
0044 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0045 EIGEN_UNUSED
0046 Packet plog_float(const Packet _x);
0047 
0048 /** \internal \returns log2(x) for single precision float */
0049 template <typename Packet>
0050 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0051 EIGEN_UNUSED
0052 Packet plog2_float(const Packet _x);
0053 
0054 /** \internal \returns log(x) for single precision float */
0055 template <typename Packet>
0056 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0057 EIGEN_UNUSED
0058 Packet plog_double(const Packet _x);
0059 
0060 /** \internal \returns log2(x) for single precision float */
0061 template <typename Packet>
0062 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0063 EIGEN_UNUSED
0064 Packet plog2_double(const Packet _x);
0065 
0066 /** \internal \returns log(1 + x) */
0067 template<typename Packet>
0068 Packet generic_plog1p(const Packet& x);
0069 
0070 /** \internal \returns exp(x)-1 */
0071 template<typename Packet>
0072 Packet generic_expm1(const Packet& x);
0073 
0074 /** \internal \returns exp(x) for single precision float */
0075 template <typename Packet>
0076 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0077 EIGEN_UNUSED
0078 Packet pexp_float(const Packet _x);
0079 
0080 /** \internal \returns exp(x) for double precision real numbers */
0081 template <typename Packet>
0082 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0083 EIGEN_UNUSED
0084 Packet pexp_double(const Packet _x);
0085 
0086 /** \internal \returns sin(x) for single precision float */
0087 template<typename Packet>
0088 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0089 EIGEN_UNUSED
0090 Packet psin_float(const Packet& x);
0091 
0092 /** \internal \returns cos(x) for single precision float */
0093 template<typename Packet>
0094 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0095 EIGEN_UNUSED
0096 Packet pcos_float(const Packet& x);
0097 
0098 /** \internal \returns sqrt(x) for complex types */
0099 template<typename Packet>
0100 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
0101 EIGEN_UNUSED
0102 Packet psqrt_complex(const Packet& a);
0103 
0104 template <typename Packet, int N> struct ppolevl;
0105 
0106 
0107 } // end namespace internal
0108 } // end namespace Eigen
0109 
0110 #endif // EIGEN_ARCH_GENERIC_PACKET_MATH_FUNCTIONS_FWD_H