BesselFunctionsBFloat16.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 // This Source Code Form is subject to the terms of the Mozilla
5 // Public License v. 2.0. If a copy of the MPL was not distributed
6 // with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 
8 #ifndef EIGEN_BESSELFUNCTIONS_BFLOAT16_H
9 #define EIGEN_BESSELFUNCTIONS_BFLOAT16_H
10 
11 // IWYU pragma: private
12 #include "./InternalHeaderCheck.h"
13 
14 namespace Eigen {
15 namespace numext {
16 
17 #if EIGEN_HAS_C99_MATH
18 template <>
20  return Eigen::bfloat16(Eigen::numext::bessel_i0(static_cast<float>(x)));
21 }
22 template <>
24  return Eigen::bfloat16(Eigen::numext::bessel_i0e(static_cast<float>(x)));
25 }
26 template <>
28  return Eigen::bfloat16(Eigen::numext::bessel_i1(static_cast<float>(x)));
29 }
30 template <>
32  return Eigen::bfloat16(Eigen::numext::bessel_i1e(static_cast<float>(x)));
33 }
34 template <>
36  return Eigen::bfloat16(Eigen::numext::bessel_j0(static_cast<float>(x)));
37 }
38 template <>
40  return Eigen::bfloat16(Eigen::numext::bessel_j1(static_cast<float>(x)));
41 }
42 template <>
44  return Eigen::bfloat16(Eigen::numext::bessel_y0(static_cast<float>(x)));
45 }
46 template <>
48  return Eigen::bfloat16(Eigen::numext::bessel_y1(static_cast<float>(x)));
49 }
50 template <>
52  return Eigen::bfloat16(Eigen::numext::bessel_k0(static_cast<float>(x)));
53 }
54 template <>
56  return Eigen::bfloat16(Eigen::numext::bessel_k0e(static_cast<float>(x)));
57 }
58 template <>
60  return Eigen::bfloat16(Eigen::numext::bessel_k1(static_cast<float>(x)));
61 }
62 template <>
64  return Eigen::bfloat16(Eigen::numext::bessel_k1e(static_cast<float>(x)));
65 }
66 #endif
67 
68 } // end namespace numext
69 } // end namespace Eigen
70 
71 #endif // EIGEN_BESSELFUNCTIONS_BFLOAT16_H
#define EIGEN_DEVICE_FUNC
Definition: Macros.h:892
#define EIGEN_STRONG_INLINE
Definition: Macros.h:834
EIGEN_DEVICE_FUNC const Scalar & x
Definition: SpecialFunctionsImpl.h:2024
Namespace containing all symbols from the Eigen library.
Definition: bench_norm.cpp:70
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k0e_op< typename Derived::Scalar >, const Derived > bessel_k0e(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:142
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_y0_op< typename Derived::Scalar >, const Derived > bessel_y0(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:227
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_j1_op< typename Derived::Scalar >, const Derived > bessel_j1(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:248
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i0e_op< typename Derived::Scalar >, const Derived > bessel_i0e(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:56
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k1_op< typename Derived::Scalar >, const Derived > bessel_k1(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:163
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_j0_op< typename Derived::Scalar >, const Derived > bessel_j0(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:206
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k0_op< typename Derived::Scalar >, const Derived > bessel_k0(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:120
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i1e_op< typename Derived::Scalar >, const Derived > bessel_i1e(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:99
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_k1e_op< typename Derived::Scalar >, const Derived > bessel_k1e(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:185
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i1_op< typename Derived::Scalar >, const Derived > bessel_i1(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:77
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_i0_op< typename Derived::Scalar >, const Derived > bessel_i0(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:34
EIGEN_STRONG_INLINE const Eigen::CwiseUnaryOp< Eigen::internal::scalar_bessel_y1_op< typename Derived::Scalar >, const Derived > bessel_y1(const Eigen::ArrayBase< Derived > &x)
Definition: BesselFunctionsArrayAPI.h:269
Definition: BFloat16.h:101