SpecialFunctionsFunctors.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) 2016 Eugene Brevdo <ebrevdo@gmail.com>
5 // Copyright (C) 2016 Gael Guennebaud <gael.guennebaud@inria.fr>
6 //
7 // This Source Code Form is subject to the terms of the Mozilla
8 // Public License v. 2.0. If a copy of the MPL was not distributed
9 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 
11 #ifndef EIGEN_SPECIALFUNCTIONS_FUNCTORS_H
12 #define EIGEN_SPECIALFUNCTIONS_FUNCTORS_H
13 
14 namespace Eigen {
15 
16 namespace internal {
17 
18 
24 template<typename Scalar> struct scalar_igamma_op : binary_op_base<Scalar,Scalar>
25 {
26  EIGEN_EMPTY_STRUCT_CTOR(scalar_igamma_op)
27  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& x) const {
28  using numext::igamma; return igamma(a, x);
29  }
30  template<typename Packet>
31  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& x) const {
32  return internal::pigamma(a, x);
33  }
34 };
35 template<typename Scalar>
37  enum {
38  // Guesstimate
41  };
42 };
43 
44 
50 template<typename Scalar> struct scalar_igammac_op : binary_op_base<Scalar,Scalar>
51 {
52  EIGEN_EMPTY_STRUCT_CTOR(scalar_igammac_op)
53  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a, const Scalar& x) const {
54  using numext::igammac; return igammac(a, x);
55  }
56  template<typename Packet>
57  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a, const Packet& x) const
58  {
59  return internal::pigammac(a, x);
60  }
61 };
62 template<typename Scalar>
64  enum {
65  // Guesstimate
68  };
69 };
70 
71 
76 template<typename Scalar> struct scalar_betainc_op {
77  EIGEN_EMPTY_STRUCT_CTOR(scalar_betainc_op)
78  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& x, const Scalar& a, const Scalar& b) const {
79  using numext::betainc; return betainc(x, a, b);
80  }
81  template<typename Packet>
82  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& x, const Packet& a, const Packet& b) const
83  {
84  return internal::pbetainc(x, a, b);
85  }
86 };
87 template<typename Scalar>
89  enum {
90  // Guesstimate
93  };
94 };
95 
96 
102 template<typename Scalar> struct scalar_lgamma_op {
103  EIGEN_EMPTY_STRUCT_CTOR(scalar_lgamma_op)
104  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const {
105  using numext::lgamma; return lgamma(a);
106  }
108  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::plgamma(a); }
109 };
110 template<typename Scalar>
112 {
113  enum {
114  // Guesstimate
117  };
118 };
119 
124 template<typename Scalar> struct scalar_digamma_op {
125  EIGEN_EMPTY_STRUCT_CTOR(scalar_digamma_op)
126  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const {
127  using numext::digamma; return digamma(a);
128  }
130  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pdigamma(a); }
131 };
132 template<typename Scalar>
134 {
135  enum {
136  // Guesstimate
139  };
140 };
141 
146 template<typename Scalar> struct scalar_zeta_op {
147  EIGEN_EMPTY_STRUCT_CTOR(scalar_zeta_op)
148  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& x, const Scalar& q) const {
149  using numext::zeta; return zeta(x, q);
150  }
152  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& x, const Packet& q) const { return internal::pzeta(x, q); }
153 };
154 template<typename Scalar>
156 {
157  enum {
158  // Guesstimate
161  };
162 };
163 
168 template<typename Scalar> struct scalar_polygamma_op {
170  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& n, const Scalar& x) const {
171  using numext::polygamma; return polygamma(n, x);
172  }
174  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& n, const Packet& x) const { return internal::ppolygamma(n, x); }
175 };
176 template<typename Scalar>
178 {
179  enum {
180  // Guesstimate
183  };
184 };
185 
191 template<typename Scalar> struct scalar_erf_op {
192  EIGEN_EMPTY_STRUCT_CTOR(scalar_erf_op)
193  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const {
194  using numext::erf; return erf(a);
195  }
197  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::perf(a); }
198 };
199 template<typename Scalar>
201 {
202  enum {
203  // Guesstimate
206  };
207 };
208 
214 template<typename Scalar> struct scalar_erfc_op {
215  EIGEN_EMPTY_STRUCT_CTOR(scalar_erfc_op)
216  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const {
217  using numext::erfc; return erfc(a);
218  }
220  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::perfc(a); }
221 };
222 template<typename Scalar>
224 {
225  enum {
226  // Guesstimate
229  };
230 };
231 
232 } // end namespace internal
233 
234 } // end namespace Eigen
235 
236 #endif // EIGEN_SPECIALFUNCTIONS_FUNCTORS_H
EIGEN_EMPTY_STRUCT_CTOR
#define EIGEN_EMPTY_STRUCT_CTOR(X)
Definition: XprHelper.h:22
Eigen::internal::scalar_lgamma_op::Packet
packet_traits< Scalar >::type Packet
Definition: SpecialFunctionsFunctors.h:107
Eigen
Definition: common.h:73
Eigen::internal::scalar_polygamma_op::Packet
packet_traits< Scalar >::type Packet
Definition: SpecialFunctionsFunctors.h:173
b
Scalar * b
Definition: cholesky.cpp:56
Eigen::internal::scalar_igammac_op
Definition: ForwardDeclarations.h:217
Eigen::betainc
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE TensorCwiseTernaryOp< internal::scalar_betainc_op< typename XDerived::Scalar >, const ADerived, const BDerived, const XDerived > betainc(const ADerived &a, const BDerived &b, const XDerived &x)
Definition: TensorGlobalFunctions.h:24
erf
const EIGEN_DEVICE_FUNC ErfReturnType erf() const
Definition: ArrayCwiseUnaryOps.h:528
Eigen::internal::scalar_zeta_op::packetOp
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &x, const Packet &q) const
Definition: SpecialFunctionsFunctors.h:152
Eigen::internal::scalar_lgamma_op
Definition: ForwardDeclarations.h:212
Eigen::internal::packet_traits
Definition: GenericPacketMath.h:96
erfc
const EIGEN_DEVICE_FUNC ErfcReturnType erfc() const
Definition: ArrayCwiseUnaryOps.h:549
Eigen::igammac
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_igammac_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igammac(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition: SpecialFunctionsArrayAPI.h:48
Eigen::internal::scalar_erf_op
Definition: ForwardDeclarations.h:214
Scalar
SCALAR Scalar
Definition: common.h:84
Eigen::internal::scalar_lgamma_op::packetOp
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
Definition: SpecialFunctionsFunctors.h:108
zeta
const CwiseBinaryOp< internal::scalar_zeta_op< Scalar >, const Derived, const DerivedQ > zeta(const EIGEN_CURRENT_STORAGE_BASE_CLASS< DerivedQ > &q) const
Definition: ArrayCwiseBinaryOps.h:329
Eigen::internal::scalar_erf_op::packetOp
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
Definition: SpecialFunctionsFunctors.h:197
digamma
const EIGEN_DEVICE_FUNC DigammaReturnType digamma() const
Definition: ArrayCwiseUnaryOps.h:507
Eigen::internal::ppolygamma
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet ppolygamma(const Packet &n, const Packet &x)
Definition: SpecialFunctionsPacketMath.h:31
lgamma
const EIGEN_DEVICE_FUNC LgammaReturnType lgamma() const
Definition: ArrayCwiseUnaryOps.h:490
Eigen::internal::pigamma
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pigamma(const Packet &a, const Packet &x)
Definition: SpecialFunctionsPacketMath.h:43
Eigen::numext::q
EIGEN_DEVICE_FUNC const Scalar & q
Definition: SpecialFunctionsImpl.h:1520
Eigen::internal::pdigamma
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pdigamma(const Packet &a)
Definition: SpecialFunctionsPacketMath.h:23
Eigen::internal::scalar_erfc_op::packetOp
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
Definition: SpecialFunctionsFunctors.h:220
x
Scalar * x
Definition: level1_cplx_impl.h:89
Eigen::internal::scalar_igamma_op::packetOp
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Packet packetOp(const Packet &a, const Packet &x) const
Definition: SpecialFunctionsFunctors.h:31
EIGEN_STRONG_INLINE
#define EIGEN_STRONG_INLINE
Definition: Macros.h:494
Eigen::internal::scalar_zeta_op::Packet
packet_traits< Scalar >::type Packet
Definition: SpecialFunctionsFunctors.h:151
Eigen::internal::scalar_erfc_op
Definition: ForwardDeclarations.h:215
Eigen::internal::pigammac
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pigammac(const Packet &a, const Packet &x)
Definition: SpecialFunctionsPacketMath.h:47
Eigen::internal::Packet
Definition: ZVector/PacketMath.h:48
Eigen::internal::perfc
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet perfc(const Packet &a)
Definition: SpecialFunctionsPacketMath.h:39
Eigen::internal::scalar_polygamma_op::packetOp
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &n, const Packet &x) const
Definition: SpecialFunctionsFunctors.h:174
Eigen::internal::scalar_erf_op::Packet
packet_traits< Scalar >::type Packet
Definition: SpecialFunctionsFunctors.h:196
Eigen::internal::scalar_igammac_op::packetOp
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Packet packetOp(const Packet &a, const Packet &x) const
Definition: SpecialFunctionsFunctors.h:57
Eigen::internal::scalar_digamma_op::Packet
packet_traits< Scalar >::type Packet
Definition: SpecialFunctionsFunctors.h:129
Eigen::polygamma
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_polygamma_op< typename DerivedX::Scalar >, const DerivedN, const DerivedX > polygamma(const Eigen::ArrayBase< DerivedN > &n, const Eigen::ArrayBase< DerivedX > &x)
Definition: SpecialFunctionsArrayAPI.h:70
a
Scalar * a
Definition: cholesky.cpp:26
Eigen::igamma
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_igamma_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igamma(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
Definition: SpecialFunctionsArrayAPI.h:28
Eigen::internal::scalar_polygamma_op
Definition: SpecialFunctionsFunctors.h:168
Eigen::internal::plgamma
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plgamma(const Packet &a)
Definition: SpecialFunctionsPacketMath.h:19
Eigen::internal::scalar_betainc_op
Definition: ForwardDeclarations.h:219
Eigen::internal::pbetainc
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pbetainc(const Packet &a, const Packet &b, const Packet &x)
Definition: SpecialFunctionsPacketMath.h:51
Eigen::internal::pzeta
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pzeta(const Packet &x, const Packet &q)
Definition: SpecialFunctionsPacketMath.h:27
Eigen::internal::functor_traits
Definition: XprHelper.h:146
internal
Definition: BandTriangularSolver.h:13
n
PlainMatrixType mat * n
Definition: eigenvalues.cpp:41
Eigen::internal::scalar_digamma_op::packetOp
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
Definition: SpecialFunctionsFunctors.h:130
Eigen::internal::functor_traits::PacketAccess
@ PacketAccess
Definition: XprHelper.h:151
Eigen::internal::scalar_betainc_op::packetOp
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Packet packetOp(const Packet &x, const Packet &a, const Packet &b) const
Definition: SpecialFunctionsFunctors.h:82
Eigen::internal::scalar_erfc_op::Packet
packet_traits< Scalar >::type Packet
Definition: SpecialFunctionsFunctors.h:219
Eigen::internal::scalar_zeta_op
Definition: ForwardDeclarations.h:218
Eigen::zeta
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:114
Eigen::internal::scalar_igamma_op
Definition: ForwardDeclarations.h:216
Eigen::NumTraits
Holds information about the various numeric (i.e. scalar) types allowed by Eigen.
Definition: NumTraits.h:150
Eigen::internal::functor_traits::Cost
@ Cost
Definition: XprHelper.h:150
Eigen::internal::perf
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet perf(const Packet &a)
Definition: SpecialFunctionsPacketMath.h:35
Eigen::internal::scalar_digamma_op
Definition: ForwardDeclarations.h:213


control_box_rst
Author(s): Christoph Rösmann
autogenerated on Wed Mar 2 2022 00:06:27