Eigen-Contrib  5.0.1
 
Loading...
Searching...
No Matches
BesselFunctionsBFloat16.h
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// SPDX-FileCopyrightText: The Eigen Authors
8// SPDX-License-Identifier: MPL-2.0
9
10#ifndef EIGEN_BESSELFUNCTIONS_BFLOAT16_H
11#define EIGEN_BESSELFUNCTIONS_BFLOAT16_H
12
13// IWYU pragma: private
14#include "./InternalHeaderCheck.h"
15
16namespace Eigen {
17namespace numext {
18
19template <>
20EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_i0(const Eigen::bfloat16& x) {
21 return Eigen::bfloat16(Eigen::numext::bessel_i0(static_cast<float>(x)));
22}
23template <>
24EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_i0e(const Eigen::bfloat16& x) {
25 return Eigen::bfloat16(Eigen::numext::bessel_i0e(static_cast<float>(x)));
26}
27template <>
28EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_i1(const Eigen::bfloat16& x) {
29 return Eigen::bfloat16(Eigen::numext::bessel_i1(static_cast<float>(x)));
30}
31template <>
32EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_i1e(const Eigen::bfloat16& x) {
33 return Eigen::bfloat16(Eigen::numext::bessel_i1e(static_cast<float>(x)));
34}
35template <>
36EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_j0(const Eigen::bfloat16& x) {
37 return Eigen::bfloat16(Eigen::numext::bessel_j0(static_cast<float>(x)));
38}
39template <>
40EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_j1(const Eigen::bfloat16& x) {
41 return Eigen::bfloat16(Eigen::numext::bessel_j1(static_cast<float>(x)));
42}
43template <>
44EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_y0(const Eigen::bfloat16& x) {
45 return Eigen::bfloat16(Eigen::numext::bessel_y0(static_cast<float>(x)));
46}
47template <>
48EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_y1(const Eigen::bfloat16& x) {
49 return Eigen::bfloat16(Eigen::numext::bessel_y1(static_cast<float>(x)));
50}
51template <>
52EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_k0(const Eigen::bfloat16& x) {
53 return Eigen::bfloat16(Eigen::numext::bessel_k0(static_cast<float>(x)));
54}
55template <>
56EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_k0e(const Eigen::bfloat16& x) {
57 return Eigen::bfloat16(Eigen::numext::bessel_k0e(static_cast<float>(x)));
58}
59template <>
60EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_k1(const Eigen::bfloat16& x) {
61 return Eigen::bfloat16(Eigen::numext::bessel_k1(static_cast<float>(x)));
62}
63template <>
64EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC Eigen::bfloat16 bessel_k1e(const Eigen::bfloat16& x) {
65 return Eigen::bfloat16(Eigen::numext::bessel_k1e(static_cast<float>(x)));
66}
67
68} // end namespace numext
69} // end namespace Eigen
70
71#endif // EIGEN_BESSELFUNCTIONS_BFLOAT16_H
Namespace containing all symbols from the Eigen library.