SpecialFunctionsPacketMath.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 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_SPECIALFUNCTIONS_PACKETMATH_H
11 #define EIGEN_SPECIALFUNCTIONS_PACKETMATH_H
12 
13 #include "./InternalHeaderCheck.h"
14 
15 namespace Eigen {
16 
17 namespace internal {
18 
21 Packet plgamma(const Packet& a) { using numext::lgamma; return lgamma(a); }
22 
25 Packet pdigamma(const Packet& a) { using numext::digamma; return digamma(a); }
26 
29 Packet pzeta(const Packet& x, const Packet& q) { using numext::zeta; return zeta(x, q); }
30 
33 Packet ppolygamma(const Packet& n, const Packet& x) { using numext::polygamma; return polygamma(n, x); }
34 
37 Packet perf(const Packet& a) { using numext::erf; return erf(a); }
38 
41 Packet perfc(const Packet& a) { using numext::erfc; return erfc(a); }
42 
45 Packet pndtri(const Packet& a) {
46  typedef typename unpacket_traits<Packet>::type ScalarType;
47  using internal::generic_ndtri; return generic_ndtri<Packet, ScalarType>(a);
48 }
49 
51 template<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
52 Packet pigamma(const Packet& a, const Packet& x) { using numext::igamma; return igamma(a, x); }
53 
56 template <typename Packet>
57 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pigamma_der_a(const Packet& a, const Packet& x) {
58  using numext::igamma_der_a; return igamma_der_a(a, x);
59 }
60 
64 template <typename Packet>
65 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet pgamma_sample_der_alpha(const Packet& alpha, const Packet& sample) {
66  using numext::gamma_sample_der_alpha; return gamma_sample_der_alpha(alpha, sample);
67 }
68 
70 template<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
71 Packet pigammac(const Packet& a, const Packet& x) { using numext::igammac; return igammac(a, x); }
72 
74 template<typename Packet> EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE
75 Packet pbetainc(const Packet& a, const Packet& b,const Packet& x) { using numext::betainc; return betainc(a, b, x); }
76 
77 } // end namespace internal
78 
79 } // end namespace Eigen
80 
81 #endif // EIGEN_SPECIALFUNCTIONS_PACKETMATH_H
ArrayXXi a
int n
#define EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS
#define EIGEN_DEVICE_FUNC
Packet pigamma_der_a(const Packet &a, const Packet &x)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pdigamma(const Packet &a)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pndtri(const Packet &a)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet perf(const Packet &a)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet ppolygamma(const Packet &n, const Packet &x)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet perfc(const Packet &a)
Packet pigamma(const Packet &a, const Packet &x)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plgamma(const Packet &a)
Packet pigammac(const Packet &a, const Packet &x)
EIGEN_ALWAYS_INLINE T generic_ndtri(const T &a)
Packet pgamma_sample_der_alpha(const Packet &alpha, const Packet &sample)
Packet pbetainc(const Packet &a, const Packet &b, const Packet &x)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pzeta(const Packet &x, const Packet &q)
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_erfc_op< typename Derived::Scalar >, const Derived > erfc(const Eigen::ArrayBase< Derived > &x)
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 TensorCwiseTernaryOp< internal::scalar_betainc_op< typename XDerived::Scalar >, const ADerived, const BDerived, const XDerived > betainc(const ADerived &a, const BDerived &b, const XDerived &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)
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)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_lgamma_op< typename Derived::Scalar >, const Derived > lgamma(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_erf_op< typename Derived::Scalar >, const Derived > erf(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_igamma_der_a_op< typename Derived::Scalar >, const Derived, const ExponentDerived > igamma_der_a(const Eigen::ArrayBase< Derived > &a, const Eigen::ArrayBase< ExponentDerived > &x)
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)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_digamma_op< typename Derived::Scalar >, const Derived > digamma(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseBinaryOp< Eigen::internal::scalar_gamma_sample_der_alpha_op< typename AlphaDerived::Scalar >, const AlphaDerived, const SampleDerived > gamma_sample_der_alpha(const Eigen::ArrayBase< AlphaDerived > &alpha, const Eigen::ArrayBase< SampleDerived > &sample)