10#ifndef EIGEN_MATH_FUNCTIONS_AVX_H
11#define EIGEN_MATH_FUNCTIONS_AVX_H
18#include "../../InternalHeaderCheck.h"
24EIGEN_INSTANTIATE_GENERIC_MATH_FUNCS_FLOAT(Packet8f)
26EIGEN_DOUBLE_PACKET_FUNCTION(
atanh, Packet4d)
27EIGEN_DOUBLE_PACKET_FUNCTION(
log, Packet4d)
28EIGEN_DOUBLE_PACKET_FUNCTION(
log2, Packet4d)
29EIGEN_DOUBLE_PACKET_FUNCTION(
exp, Packet4d)
30EIGEN_DOUBLE_PACKET_FUNCTION(
tanh, Packet4d)
31EIGEN_DOUBLE_PACKET_FUNCTION(
cbrt, Packet4d)
32#ifdef EIGEN_VECTORIZE_AVX2
33EIGEN_DOUBLE_PACKET_FUNCTION(
sin, Packet4d)
34EIGEN_DOUBLE_PACKET_FUNCTION(
cos, Packet4d)
36EIGEN_GENERIC_PACKET_FUNCTION(
atan, Packet4d)
37EIGEN_GENERIC_PACKET_FUNCTION(
exp2, Packet4d)
44EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet8f psqrt<Packet8f>(
const Packet8f& _x) {
45 return _mm256_sqrt_ps(_x);
48EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet4d psqrt<Packet4d>(
const Packet4d& _x) {
49 return _mm256_sqrt_pd(_x);
55EIGEN_DEFINE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet8f prsqrt<Packet8f>(
const Packet8f& a) {
62 return generic_rsqrt_newton_step<Packet8f, 1>::run(a, _mm256_rsqrt_ps(a));
66EIGEN_STRONG_INLINE Packet8f preciprocal<Packet8f>(
const Packet8f& a) {
67 return generic_reciprocal_newton_step<Packet8f, 1>::run(a, _mm256_rcp_ps(a));
73EIGEN_STRONG_INLINE Packet8h pfrexp(
const Packet8h& a, Packet8h& exponent) {
75 const Packet8h out = float2half(pfrexp<Packet8f>(half2float(a), fexponent));
76 exponent = float2half(fexponent);
81EIGEN_STRONG_INLINE Packet8h pldexp(
const Packet8h& a,
const Packet8h& exponent) {
82 return float2half(pldexp<Packet8f>(half2float(a), half2float(exponent)));
86EIGEN_STRONG_INLINE Packet8bf pfrexp(
const Packet8bf& a, Packet8bf& exponent) {
88 const Packet8bf out = F32ToBf16(pfrexp<Packet8f>(Bf16ToF32(a), fexponent));
89 exponent = F32ToBf16(fexponent);
94EIGEN_STRONG_INLINE Packet8bf pldexp(
const Packet8bf& a,
const Packet8bf& exponent) {
95 return F32ToBf16(pldexp<Packet8f>(Bf16ToF32(a), Bf16ToF32(exponent)));
98BF16_PACKET_FUNCTION(Packet8f, Packet8bf, pcos)
99BF16_PACKET_FUNCTION(Packet8f, Packet8bf, pexp)
100BF16_PACKET_FUNCTION(Packet8f, Packet8bf, pexp2)
101BF16_PACKET_FUNCTION(Packet8f, Packet8bf, pexpm1)
102BF16_PACKET_FUNCTION(Packet8f, Packet8bf, plog)
103BF16_PACKET_FUNCTION(Packet8f, Packet8bf, plog1p)
104BF16_PACKET_FUNCTION(Packet8f, Packet8bf, plog2)
105BF16_PACKET_FUNCTION(Packet8f, Packet8bf, preciprocal)
106BF16_PACKET_FUNCTION(Packet8f, Packet8bf, prsqrt)
107BF16_PACKET_FUNCTION(Packet8f, Packet8bf, psin)
108BF16_PACKET_FUNCTION(Packet8f, Packet8bf, psqrt)
109BF16_PACKET_FUNCTION(Packet8f, Packet8bf, ptanh)
111#ifndef EIGEN_VECTORIZE_AVX512FP16
112F16_PACKET_FUNCTION(Packet8f, Packet8h, pcos)
113F16_PACKET_FUNCTION(Packet8f, Packet8h, pexp)
114F16_PACKET_FUNCTION(Packet8f, Packet8h, pexp2)
115F16_PACKET_FUNCTION(Packet8f, Packet8h, pexpm1)
116F16_PACKET_FUNCTION(Packet8f, Packet8h, plog)
117F16_PACKET_FUNCTION(Packet8f, Packet8h, plog1p)
118F16_PACKET_FUNCTION(Packet8f, Packet8h, plog2)
119F16_PACKET_FUNCTION(Packet8f, Packet8h, preciprocal)
120F16_PACKET_FUNCTION(Packet8f, Packet8h, prsqrt)
121F16_PACKET_FUNCTION(Packet8f, Packet8h, psin)
122F16_PACKET_FUNCTION(Packet8f, Packet8h, psqrt)
123F16_PACKET_FUNCTION(Packet8f, Packet8h, ptanh)
Namespace containing all symbols from the Eigen library.
Definition B01_Experimental.dox:1
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_cos_op< typename Derived::Scalar >, const Derived > cos(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_atanh_op< typename Derived::Scalar >, const Derived > atanh(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_exp_op< typename Derived::Scalar >, const Derived > exp(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_log2_op< typename Derived::Scalar >, const Derived > log2(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_atan_op< typename Derived::Scalar >, const Derived > atan(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_log_op< typename Derived::Scalar >, const Derived > log(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_sin_op< typename Derived::Scalar >, const Derived > sin(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_tanh_op< typename Derived::Scalar >, const Derived > tanh(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_exp2_op< typename Derived::Scalar >, const Derived > exp2(const Eigen::ArrayBase< Derived > &x)
const Eigen::CwiseUnaryOp< Eigen::internal::scalar_cbrt_op< typename Derived::Scalar >, const Derived > cbrt(const Eigen::ArrayBase< Derived > &x)