cart-elc

Source code for CART-ELC
git clone git://git.laack.co/cart-elc.git
Log | Files | Refs | README | LICENSE

GenericPacketMathFunctionsFwd.h (3770B)


      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 
     13 namespace Eigen {
     14 namespace 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   */
     27 template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
     28 Packet 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.
     33 template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
     34 Packet 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   */
     39 template<typename Packet> EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC
     40 Packet pldexp_generic(const Packet& a, const Packet& exponent);
     41 
     42 /** \internal \returns log(x) for single precision float */
     43 template <typename Packet>
     44 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
     45 EIGEN_UNUSED
     46 Packet plog_float(const Packet _x);
     47 
     48 /** \internal \returns log2(x) for single precision float */
     49 template <typename Packet>
     50 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
     51 EIGEN_UNUSED
     52 Packet plog2_float(const Packet _x);
     53 
     54 /** \internal \returns log(x) for single precision float */
     55 template <typename Packet>
     56 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
     57 EIGEN_UNUSED
     58 Packet plog_double(const Packet _x);
     59 
     60 /** \internal \returns log2(x) for single precision float */
     61 template <typename Packet>
     62 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
     63 EIGEN_UNUSED
     64 Packet plog2_double(const Packet _x);
     65 
     66 /** \internal \returns log(1 + x) */
     67 template<typename Packet>
     68 Packet generic_plog1p(const Packet& x);
     69 
     70 /** \internal \returns exp(x)-1 */
     71 template<typename Packet>
     72 Packet generic_expm1(const Packet& x);
     73 
     74 /** \internal \returns exp(x) for single precision float */
     75 template <typename Packet>
     76 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
     77 EIGEN_UNUSED
     78 Packet pexp_float(const Packet _x);
     79 
     80 /** \internal \returns exp(x) for double precision real numbers */
     81 template <typename Packet>
     82 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
     83 EIGEN_UNUSED
     84 Packet pexp_double(const Packet _x);
     85 
     86 /** \internal \returns sin(x) for single precision float */
     87 template<typename Packet>
     88 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
     89 EIGEN_UNUSED
     90 Packet psin_float(const Packet& x);
     91 
     92 /** \internal \returns cos(x) for single precision float */
     93 template<typename Packet>
     94 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
     95 EIGEN_UNUSED
     96 Packet pcos_float(const Packet& x);
     97 
     98 /** \internal \returns sqrt(x) for complex types */
     99 template<typename Packet>
    100 EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
    101 EIGEN_UNUSED
    102 Packet psqrt_complex(const Packet& a);
    103 
    104 template <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