File indexing completed on 2025-01-18 09:57:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef EIGEN_BESSELFUNCTIONS_FUNCTORS_H
0012 #define EIGEN_BESSELFUNCTIONS_FUNCTORS_H
0013
0014 namespace Eigen {
0015
0016 namespace internal {
0017
0018
0019
0020
0021
0022
0023 template <typename Scalar>
0024 struct scalar_bessel_i0_op {
0025 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_i0_op)
0026 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0027 using numext::bessel_i0;
0028 return bessel_i0(x);
0029 }
0030 typedef typename packet_traits<Scalar>::type Packet;
0031 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0032 return internal::pbessel_i0(x);
0033 }
0034 };
0035 template <typename Scalar>
0036 struct functor_traits<scalar_bessel_i0_op<Scalar> > {
0037 enum {
0038
0039
0040
0041 Cost = 28 * NumTraits<Scalar>::MulCost + 48 * NumTraits<Scalar>::AddCost,
0042 PacketAccess = packet_traits<Scalar>::HasBessel
0043 };
0044 };
0045
0046
0047
0048
0049
0050
0051 template <typename Scalar>
0052 struct scalar_bessel_i0e_op {
0053 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_i0e_op)
0054 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0055 using numext::bessel_i0e;
0056 return bessel_i0e(x);
0057 }
0058 typedef typename packet_traits<Scalar>::type Packet;
0059 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0060 return internal::pbessel_i0e(x);
0061 }
0062 };
0063 template <typename Scalar>
0064 struct functor_traits<scalar_bessel_i0e_op<Scalar> > {
0065 enum {
0066
0067
0068 Cost = 20 * NumTraits<Scalar>::MulCost + 40 * NumTraits<Scalar>::AddCost,
0069 PacketAccess = packet_traits<Scalar>::HasBessel
0070 };
0071 };
0072
0073
0074
0075
0076
0077
0078 template <typename Scalar>
0079 struct scalar_bessel_i1_op {
0080 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_i1_op)
0081 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0082 using numext::bessel_i1;
0083 return bessel_i1(x);
0084 }
0085 typedef typename packet_traits<Scalar>::type Packet;
0086 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0087 return internal::pbessel_i1(x);
0088 }
0089 };
0090 template <typename Scalar>
0091 struct functor_traits<scalar_bessel_i1_op<Scalar> > {
0092 enum {
0093
0094
0095
0096 Cost = 28 * NumTraits<Scalar>::MulCost + 48 * NumTraits<Scalar>::AddCost,
0097 PacketAccess = packet_traits<Scalar>::HasBessel
0098 };
0099 };
0100
0101
0102
0103
0104
0105
0106 template <typename Scalar>
0107 struct scalar_bessel_i1e_op {
0108 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_i1e_op)
0109 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0110 using numext::bessel_i1e;
0111 return bessel_i1e(x);
0112 }
0113 typedef typename packet_traits<Scalar>::type Packet;
0114 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0115 return internal::pbessel_i1e(x);
0116 }
0117 };
0118 template <typename Scalar>
0119 struct functor_traits<scalar_bessel_i1e_op<Scalar> > {
0120 enum {
0121
0122
0123 Cost = 20 * NumTraits<Scalar>::MulCost + 40 * NumTraits<Scalar>::AddCost,
0124 PacketAccess = packet_traits<Scalar>::HasBessel
0125 };
0126 };
0127
0128
0129
0130
0131
0132
0133 template <typename Scalar>
0134 struct scalar_bessel_j0_op {
0135 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_j0_op)
0136 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0137 using numext::bessel_j0;
0138 return bessel_j0(x);
0139 }
0140 typedef typename packet_traits<Scalar>::type Packet;
0141 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0142 return internal::pbessel_j0(x);
0143 }
0144 };
0145 template <typename Scalar>
0146 struct functor_traits<scalar_bessel_j0_op<Scalar> > {
0147 enum {
0148
0149
0150
0151 Cost = 63 * NumTraits<Scalar>::MulCost + 48 * NumTraits<Scalar>::AddCost,
0152 PacketAccess = packet_traits<Scalar>::HasBessel
0153 };
0154 };
0155
0156
0157
0158
0159
0160
0161 template <typename Scalar>
0162 struct scalar_bessel_y0_op {
0163 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_y0_op)
0164 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0165 using numext::bessel_y0;
0166 return bessel_y0(x);
0167 }
0168 typedef typename packet_traits<Scalar>::type Packet;
0169 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0170 return internal::pbessel_y0(x);
0171 }
0172 };
0173 template <typename Scalar>
0174 struct functor_traits<scalar_bessel_y0_op<Scalar> > {
0175 enum {
0176
0177
0178
0179 Cost = 126 * NumTraits<Scalar>::MulCost + 96 * NumTraits<Scalar>::AddCost,
0180 PacketAccess = packet_traits<Scalar>::HasBessel
0181 };
0182 };
0183
0184
0185
0186
0187
0188
0189 template <typename Scalar>
0190 struct scalar_bessel_j1_op {
0191 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_j1_op)
0192 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0193 using numext::bessel_j1;
0194 return bessel_j1(x);
0195 }
0196 typedef typename packet_traits<Scalar>::type Packet;
0197 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0198 return internal::pbessel_j1(x);
0199 }
0200 };
0201 template <typename Scalar>
0202 struct functor_traits<scalar_bessel_j1_op<Scalar> > {
0203 enum {
0204
0205
0206
0207 Cost = 63 * NumTraits<Scalar>::MulCost + 48 * NumTraits<Scalar>::AddCost,
0208 PacketAccess = packet_traits<Scalar>::HasBessel
0209 };
0210 };
0211
0212
0213
0214
0215
0216
0217 template <typename Scalar>
0218 struct scalar_bessel_y1_op {
0219 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_y1_op)
0220 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0221 using numext::bessel_y1;
0222 return bessel_y1(x);
0223 }
0224 typedef typename packet_traits<Scalar>::type Packet;
0225 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0226 return internal::pbessel_y1(x);
0227 }
0228 };
0229 template <typename Scalar>
0230 struct functor_traits<scalar_bessel_y1_op<Scalar> > {
0231 enum {
0232
0233
0234
0235 Cost = 126 * NumTraits<Scalar>::MulCost + 96 * NumTraits<Scalar>::AddCost,
0236 PacketAccess = packet_traits<Scalar>::HasBessel
0237 };
0238 };
0239
0240
0241
0242
0243
0244
0245 template <typename Scalar>
0246 struct scalar_bessel_k0_op {
0247 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_k0_op)
0248 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0249 using numext::bessel_k0;
0250 return bessel_k0(x);
0251 }
0252 typedef typename packet_traits<Scalar>::type Packet;
0253 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0254 return internal::pbessel_k0(x);
0255 }
0256 };
0257 template <typename Scalar>
0258 struct functor_traits<scalar_bessel_k0_op<Scalar> > {
0259 enum {
0260
0261
0262
0263 Cost = 68 * NumTraits<Scalar>::MulCost + 88 * NumTraits<Scalar>::AddCost,
0264 PacketAccess = packet_traits<Scalar>::HasBessel
0265 };
0266 };
0267
0268
0269
0270
0271
0272
0273 template <typename Scalar>
0274 struct scalar_bessel_k0e_op {
0275 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_k0e_op)
0276 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0277 using numext::bessel_k0e;
0278 return bessel_k0e(x);
0279 }
0280 typedef typename packet_traits<Scalar>::type Packet;
0281 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0282 return internal::pbessel_k0e(x);
0283 }
0284 };
0285 template <typename Scalar>
0286 struct functor_traits<scalar_bessel_k0e_op<Scalar> > {
0287 enum {
0288
0289
0290
0291 Cost = 68 * NumTraits<Scalar>::MulCost + 88 * NumTraits<Scalar>::AddCost,
0292 PacketAccess = packet_traits<Scalar>::HasBessel
0293 };
0294 };
0295
0296
0297
0298
0299
0300
0301 template <typename Scalar>
0302 struct scalar_bessel_k1_op {
0303 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_k1_op)
0304 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0305 using numext::bessel_k1;
0306 return bessel_k1(x);
0307 }
0308 typedef typename packet_traits<Scalar>::type Packet;
0309 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0310 return internal::pbessel_k1(x);
0311 }
0312 };
0313 template <typename Scalar>
0314 struct functor_traits<scalar_bessel_k1_op<Scalar> > {
0315 enum {
0316
0317
0318
0319 Cost = 68 * NumTraits<Scalar>::MulCost + 88 * NumTraits<Scalar>::AddCost,
0320 PacketAccess = packet_traits<Scalar>::HasBessel
0321 };
0322 };
0323
0324
0325
0326
0327
0328
0329 template <typename Scalar>
0330 struct scalar_bessel_k1e_op {
0331 EIGEN_EMPTY_STRUCT_CTOR(scalar_bessel_k1e_op)
0332 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar& x) const {
0333 using numext::bessel_k1e;
0334 return bessel_k1e(x);
0335 }
0336 typedef typename packet_traits<Scalar>::type Packet;
0337 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE Packet packetOp(const Packet& x) const {
0338 return internal::pbessel_k1e(x);
0339 }
0340 };
0341 template <typename Scalar>
0342 struct functor_traits<scalar_bessel_k1e_op<Scalar> > {
0343 enum {
0344
0345
0346
0347 Cost = 68 * NumTraits<Scalar>::MulCost + 88 * NumTraits<Scalar>::AddCost,
0348 PacketAccess = packet_traits<Scalar>::HasBessel
0349 };
0350 };
0351
0352
0353 }
0354
0355 }
0356
0357 #endif