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 {
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 {
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 {
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 {
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 {
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 {
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 {
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
SCALAR Scalar
Definition: bench_gemm.cpp:33
#define EIGEN_STRONG_INLINE
Definition: Macros.h:494
#define EIGEN_EMPTY_STRUCT_CTOR(X)
Definition: XprHelper.h:22
Scalar * b
Definition: benchVecAdd.cpp:17
const CwiseBinaryOp< internal::scalar_zeta_op< Scalar >, const Derived, const DerivedQ > zeta(const EIGEN_CURRENT_STORAGE_BASE_CLASS< DerivedQ > &q) const
EIGEN_DEVICE_FUNC const ErfReturnType erf() const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet perf(const Packet &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &x, const Packet &a, const Packet &b) const
packet_traits< Scalar >::type Packet
int n
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &n, const Packet &x) const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pdigamma(const Packet &a)
Namespace containing all symbols from the Eigen library.
Definition: jet.h:637
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Definition: NumTraits.h:150
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
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)
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)
packet_traits< Scalar >::type Packet
packet_traits< Scalar >::type Packet
Array33i a
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &x, const Packet &q) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &x) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pbetainc(const Packet &a, const Packet &b, const Packet &x)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plgamma(const Packet &a)
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
packet_traits< Scalar >::type Packet
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pigammac(const Packet &a, const Packet &x)
EIGEN_DEVICE_FUNC const Scalar & q
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet perfc(const Packet &a)
EIGEN_DEVICE_FUNC const ErfcReturnType erfc() const
packet_traits< Scalar >::type Packet
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)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet ppolygamma(const Packet &n, const Packet &x)
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)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pigamma(const Packet &a, const Packet &x)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pzeta(const Packet &x, const Packet &q)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const TensorCwiseTernaryOp< internal::scalar_betainc_op< typename XDerived::Scalar >, const ADerived, const BDerived, const XDerived > betainc(const ADerived &a, const BDerived &b, const XDerived &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
EIGEN_DEVICE_FUNC const DigammaReturnType digamma() const
EIGEN_DEVICE_FUNC const LgammaReturnType lgamma() const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a, const Packet &x) const


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:44:48