UnaryFunctors.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) 2008-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_UNARY_FUNCTORS_H
11 #define EIGEN_UNARY_FUNCTORS_H
12 
13 namespace Eigen {
14 
15 namespace internal {
16 
22 template<typename Scalar> struct scalar_opposite_op {
24  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return -a; }
25  template<typename Packet>
26  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const
27  { return internal::pnegate(a); }
28 };
29 template<typename Scalar>
31 { enum {
34 };
35 
41 template<typename Scalar> struct scalar_abs_op {
43  typedef typename NumTraits<Scalar>::Real result_type;
44  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return numext::abs(a); }
45  template<typename Packet>
46  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const
47  { return internal::pabs(a); }
48 };
49 template<typename Scalar>
50 struct functor_traits<scalar_abs_op<Scalar> >
51 {
52  enum {
55  };
56 };
57 
63 template<typename Scalar> struct scalar_score_coeff_op : scalar_abs_op<Scalar>
64 {
65  typedef void Score_is_abs;
66 };
67 template<typename Scalar>
68 struct functor_traits<scalar_score_coeff_op<Scalar> > : functor_traits<scalar_abs_op<Scalar> > {};
69 
70 /* Avoid recomputing abs when we know the score and they are the same. Not a true Eigen functor. */
71 template<typename Scalar, typename=void> struct abs_knowing_score
72 {
74  typedef typename NumTraits<Scalar>::Real result_type;
75  template<typename Score>
76  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a, const Score&) const { return numext::abs(a); }
77 };
78 template<typename Scalar> struct abs_knowing_score<Scalar, typename scalar_score_coeff_op<Scalar>::Score_is_abs>
79 {
81  typedef typename NumTraits<Scalar>::Real result_type;
82  template<typename Scal>
83  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scal&, const result_type& a) const { return a; }
84 };
85 
91 template<typename Scalar> struct scalar_abs2_op {
93  typedef typename NumTraits<Scalar>::Real result_type;
94  EIGEN_DEVICE_FUNC
95  EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { return numext::abs2(a); }
96  template<typename Packet>
97  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const
98  { return internal::pmul(a,a); }
99 };
100 template<typename Scalar>
102 { enum { Cost = NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasAbs2 }; };
103 
109 template<typename Scalar> struct scalar_conjugate_op {
111  EIGEN_DEVICE_FUNC
112  EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { using numext::conj; return conj(a); }
113  template<typename Packet>
114  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const { return internal::pconj(a); }
115 };
116 template<typename Scalar>
118 {
119  enum {
122  };
123 };
124 
130 template<typename Scalar> struct scalar_arg_op {
132  typedef typename NumTraits<Scalar>::Real result_type;
133  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const result_type operator() (const Scalar& a) const { using numext::arg; return arg(a); }
134  template<typename Packet>
135  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet& a) const
136  { return internal::parg(a); }
137 };
138 template<typename Scalar>
140 {
141  enum {
144  };
145 };
151 template<typename Scalar, typename NewType>
154  typedef NewType result_type;
155  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const NewType operator() (const Scalar& a) const { return cast<Scalar, NewType>(a); }
156 };
157 template<typename Scalar, typename NewType>
158 struct functor_traits<scalar_cast_op<Scalar,NewType> >
159 { enum { Cost = is_same<Scalar, NewType>::value ? 0 : NumTraits<NewType>::AddCost, PacketAccess = false }; };
160 
166 template<typename Scalar>
169  typedef typename NumTraits<Scalar>::Real result_type;
170  EIGEN_DEVICE_FUNC
171  EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return numext::real(a); }
172 };
173 template<typename Scalar>
175 { enum { Cost = 0, PacketAccess = false }; };
176 
182 template<typename Scalar>
185  typedef typename NumTraits<Scalar>::Real result_type;
186  EIGEN_DEVICE_FUNC
187  EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return numext::imag(a); }
188 };
189 template<typename Scalar>
191 { enum { Cost = 0, PacketAccess = false }; };
192 
198 template<typename Scalar>
201  typedef typename NumTraits<Scalar>::Real result_type;
202  EIGEN_DEVICE_FUNC
203  EIGEN_STRONG_INLINE result_type& operator() (const Scalar& a) const { return numext::real_ref(*const_cast<Scalar*>(&a)); }
204 };
205 template<typename Scalar>
207 { enum { Cost = 0, PacketAccess = false }; };
208 
214 template<typename Scalar>
217  typedef typename NumTraits<Scalar>::Real result_type;
218  EIGEN_DEVICE_FUNC
219  EIGEN_STRONG_INLINE result_type& operator() (const Scalar& a) const { return numext::imag_ref(*const_cast<Scalar*>(&a)); }
220 };
221 template<typename Scalar>
223 { enum { Cost = 0, PacketAccess = false }; };
224 
231 template<typename Scalar> struct scalar_exp_op {
233  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::exp(a); }
234  template <typename Packet>
235  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pexp(a); }
236 };
237 template <typename Scalar>
238 struct functor_traits<scalar_exp_op<Scalar> > {
239  enum {
241  // The following numbers are based on the AVX implementation.
242 #ifdef EIGEN_VECTORIZE_FMA
243  // Haswell can issue 2 add/mul/madd per cycle.
244  Cost =
245  (sizeof(Scalar) == 4
246  // float: 8 pmadd, 4 pmul, 2 padd/psub, 6 other
248  // double: 7 pmadd, 5 pmul, 3 padd/psub, 1 div, 13 other
252 #else
253  Cost =
254  (sizeof(Scalar) == 4
255  // float: 7 pmadd, 6 pmul, 4 padd/psub, 10 other
257  // double: 7 pmadd, 5 pmul, 3 padd/psub, 1 div, 13 other
261 #endif
262  };
263 };
264 
271 template<typename Scalar> struct scalar_log_op {
273  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::log(a); }
274  template <typename Packet>
275  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::plog(a); }
276 };
277 template <typename Scalar>
278 struct functor_traits<scalar_log_op<Scalar> > {
279  enum {
281  Cost =
282  (PacketAccess
283  // The following numbers are based on the AVX implementation.
284 #ifdef EIGEN_VECTORIZE_FMA
285  // 8 pmadd, 6 pmul, 8 padd/psub, 16 other, can issue 2 add/mul/madd per cycle.
287 #else
288  // 8 pmadd, 6 pmul, 8 padd/psub, 20 other
290 #endif
291  // Measured cost of std::log.
292  : sizeof(Scalar)==4 ? 40 : 85)
293  };
294 };
295 
302 template<typename Scalar> struct scalar_log1p_op {
304  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::log1p(a); }
305  template <typename Packet>
306  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::plog1p(a); }
307 };
308 template <typename Scalar>
309 struct functor_traits<scalar_log1p_op<Scalar> > {
310  enum {
312  Cost = functor_traits<scalar_log_op<Scalar> >::Cost // TODO measure cost of log1p
313  };
314 };
315 
322 template<typename Scalar> struct scalar_log10_op {
324  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { EIGEN_USING_STD_MATH(log10) return log10(a); }
325  template <typename Packet>
326  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::plog10(a); }
327 };
328 template<typename Scalar>
330 { enum { Cost = 5 * NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasLog10 }; };
331 
336 template<typename Scalar> struct scalar_sqrt_op {
338  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::sqrt(a); }
339  template <typename Packet>
340  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psqrt(a); }
341 };
342 template <typename Scalar>
343 struct functor_traits<scalar_sqrt_op<Scalar> > {
344  enum {
345 #if EIGEN_FAST_MATH
346  // The following numbers are based on the AVX implementation.
347  Cost = (sizeof(Scalar) == 8 ? 28
348  // 4 pmul, 1 pmadd, 3 other
351 #else
352  // The following numbers are based on min VSQRT throughput on Haswell.
353  Cost = (sizeof(Scalar) == 8 ? 28 : 14),
354 #endif
356  };
357 };
358 
363 template<typename Scalar> struct scalar_rsqrt_op {
365  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return Scalar(1)/numext::sqrt(a); }
366  template <typename Packet>
367  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::prsqrt(a); }
368 };
369 
370 template<typename Scalar>
372 { enum {
375  };
376 };
377 
382 template<typename Scalar> struct scalar_cos_op {
384  EIGEN_DEVICE_FUNC inline Scalar operator() (const Scalar& a) const { return numext::cos(a); }
385  template <typename Packet>
386  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pcos(a); }
387 };
388 template<typename Scalar>
390 {
391  enum {
394  };
395 };
396 
401 template<typename Scalar> struct scalar_sin_op {
403  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::sin(a); }
404  template <typename Packet>
405  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psin(a); }
406 };
407 template<typename Scalar>
409 {
410  enum {
413  };
414 };
415 
416 
421 template<typename Scalar> struct scalar_tan_op {
423  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::tan(a); }
424  template <typename Packet>
425  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::ptan(a); }
426 };
427 template<typename Scalar>
429 {
430  enum {
433  };
434 };
435 
440 template<typename Scalar> struct scalar_acos_op {
442  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::acos(a); }
443  template <typename Packet>
444  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pacos(a); }
445 };
446 template<typename Scalar>
448 {
449  enum {
452  };
453 };
454 
459 template<typename Scalar> struct scalar_asin_op {
461  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::asin(a); }
462  template <typename Packet>
463  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pasin(a); }
464 };
465 template<typename Scalar>
467 {
468  enum {
471  };
472 };
473 
474 
479 template<typename Scalar> struct scalar_atan_op {
481  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::atan(a); }
482  template <typename Packet>
483  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::patan(a); }
484 };
485 template<typename Scalar>
487 {
488  enum {
491  };
492 };
493 
498 template <typename Scalar>
501  EIGEN_DEVICE_FUNC inline const Scalar operator()(const Scalar& a) const { return numext::tanh(a); }
502  template <typename Packet>
503  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& x) const { return ptanh(x); }
504 };
505 
506 template <typename Scalar>
507 struct functor_traits<scalar_tanh_op<Scalar> > {
508  enum {
511 // The following numbers are based on the AVX implementation,
512 #ifdef EIGEN_VECTORIZE_FMA
513  // Haswell can issue 2 add/mul/madd per cycle.
514  // 9 pmadd, 2 pmul, 1 div, 2 other
518 #else
522 #endif
523  // This number assumes a naive implementation of tanh
528  };
529 };
530 
535 template<typename Scalar> struct scalar_sinh_op {
537  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::sinh(a); }
538  template <typename Packet>
539  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psinh(a); }
540 };
541 template<typename Scalar>
543 {
544  enum {
547  };
548 };
549 
554 template<typename Scalar> struct scalar_cosh_op {
556  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const { return numext::cosh(a); }
557  template <typename Packet>
558  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pcosh(a); }
559 };
560 template<typename Scalar>
562 {
563  enum {
566  };
567 };
568 
573 template<typename Scalar>
576  EIGEN_DEVICE_FUNC inline Scalar operator() (const Scalar& a) const { return Scalar(1)/a; }
577  template<typename Packet>
578  EIGEN_DEVICE_FUNC inline const Packet packetOp(const Packet& a) const
579  { return internal::pdiv(pset1<Packet>(Scalar(1)),a); }
580 };
581 template<typename Scalar>
583 { enum { Cost = NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasDiv }; };
584 
589 template<typename Scalar>
592  EIGEN_DEVICE_FUNC inline Scalar operator() (const Scalar& a) const { return a*a; }
593  template<typename Packet>
594  EIGEN_DEVICE_FUNC inline const Packet packetOp(const Packet& a) const
595  { return internal::pmul(a,a); }
596 };
597 template<typename Scalar>
599 { enum { Cost = NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasMul }; };
600 
605 template<typename Scalar>
608  EIGEN_DEVICE_FUNC inline Scalar operator() (const Scalar& a) const { return a*a*a; }
609  template<typename Packet>
610  EIGEN_DEVICE_FUNC inline const Packet packetOp(const Packet& a) const
611  { return internal::pmul(a,pmul(a,a)); }
612 };
613 template<typename Scalar>
615 { enum { Cost = 2*NumTraits<Scalar>::MulCost, PacketAccess = packet_traits<Scalar>::HasMul }; };
616 
621 template<typename Scalar> struct scalar_round_op {
623  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::round(a); }
624  template <typename Packet>
625  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pround(a); }
626 };
627 template<typename Scalar>
629 {
630  enum {
633  };
634 };
635 
640 template<typename Scalar> struct scalar_floor_op {
642  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::floor(a); }
643  template <typename Packet>
644  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pfloor(a); }
645 };
646 template<typename Scalar>
648 {
649  enum {
652  };
653 };
654 
659 template<typename Scalar> struct scalar_ceil_op {
661  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator() (const Scalar& a) const { return numext::ceil(a); }
662  template <typename Packet>
663  EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::pceil(a); }
664 };
665 template<typename Scalar>
667 {
668  enum {
671  };
672 };
673 
678 template<typename Scalar> struct scalar_isnan_op {
680  typedef bool result_type;
681  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return (numext::isnan)(a); }
682 };
683 template<typename Scalar>
685 {
686  enum {
688  PacketAccess = false
689  };
690 };
691 
696 template<typename Scalar> struct scalar_isinf_op {
698  typedef bool result_type;
699  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return (numext::isinf)(a); }
700 };
701 template<typename Scalar>
703 {
704  enum {
706  PacketAccess = false
707  };
708 };
709 
714 template<typename Scalar> struct scalar_isfinite_op {
716  typedef bool result_type;
717  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE result_type operator() (const Scalar& a) const { return (numext::isfinite)(a); }
718 };
719 template<typename Scalar>
721 {
722  enum {
724  PacketAccess = false
725  };
726 };
727 
733 template<typename Scalar> struct scalar_boolean_not_op {
735  EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE bool operator() (const bool& a) const { return !a; }
736 };
737 template<typename Scalar>
739  enum {
741  PacketAccess = false
742  };
743 };
744 
749 template<typename Scalar,bool iscpx=(NumTraits<Scalar>::IsComplex!=0) > struct scalar_sign_op;
750 template<typename Scalar>
751 struct scalar_sign_op<Scalar,false> {
753  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const
754  {
755  return Scalar( (a>Scalar(0)) - (a<Scalar(0)) );
756  }
757  //TODO
758  //template <typename Packet>
759  //EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psign(a); }
760 };
761 template<typename Scalar>
762 struct scalar_sign_op<Scalar,true> {
764  EIGEN_DEVICE_FUNC inline const Scalar operator() (const Scalar& a) const
765  {
766  typedef typename NumTraits<Scalar>::Real real_type;
767  real_type aa = numext::abs(a);
768  if (aa==real_type(0))
769  return Scalar(0);
770  aa = real_type(1)/aa;
771  return Scalar(real(a)*aa, imag(a)*aa );
772  }
773  //TODO
774  //template <typename Packet>
775  //EIGEN_DEVICE_FUNC inline Packet packetOp(const Packet& a) const { return internal::psign(a); }
776 };
777 template<typename Scalar>
779 { enum {
780  Cost =
782  ? ( 8*NumTraits<Scalar>::MulCost ) // roughly
785  };
786 };
787 
788 } // end namespace internal
789 
790 } // end namespace Eigen
791 
792 #endif // EIGEN_FUNCTORS_H
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isfinite(const half &a)
Definition: Half.h:379
#define EIGEN_STRONG_INLINE
Definition: Macros.h:493
EIGEN_DEVICE_FUNC const Packet packetOp(const Packet &a) const
const AutoDiffScalar< DerType > & conj(const AutoDiffScalar< DerType > &x)
#define EIGEN_EMPTY_STRUCT_CTOR(X)
Definition: XprHelper.h:22
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pasin(const Packet &a)
EIGEN_DEVICE_FUNC RealReturnType real() const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC const ExpReturnType exp() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a) const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet patan(const Packet &a)
NumTraits< Scalar >::Real result_type
Definition: UnaryFunctors.h:43
NumTraits< Scalar >::Real result_type
Definition: UnaryFunctors.h:74
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC const TanhReturnType tanh() const
EIGEN_DEVICE_FUNC const LogReturnType log() const
NumTraits< Scalar >::Real result_type
EIGEN_DEVICE_FUNC const CoshReturnType cosh() const
Definition: LDLT.h:16
DerType::Scalar imag(const AutoDiffScalar< DerType > &)
NumTraits< Scalar >::Real result_type
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psqrt(const Packet &a)
Holds information about the various numeric (i.e. scalar) types allowed by Eigen. ...
Definition: NumTraits.h:150
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet ptanh(const Packet &a)
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const AbsReturnType abs() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a) const
Definition: UnaryFunctors.h:46
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isinf(const half &a)
Definition: Half.h:369
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psinh(const Packet &a)
EIGEN_DEVICE_FUNC const Packet packetOp(const Packet &a) const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pexp(const Packet &a)
EIGEN_DEVICE_FUNC const RoundReturnType round() const
EIGEN_DEVICE_FUNC const CosReturnType cos() const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pceil(const Packet &a)
EIGEN_DEVICE_FUNC const CeilReturnType ceil() const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet ptan(const Packet &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a) const
Definition: UnaryFunctors.h:26
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plog1p(const Packet &a)
#define EIGEN_FAST_MATH
Definition: Macros.h:472
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
NumTraits< Scalar >::Real result_type
EIGEN_DEVICE_FUNC const Log1pReturnType log1p() const
EIGEN_DEVICE_FUNC const SinhReturnType sinh() const
EIGEN_DEVICE_FUNC Packet parg(const Packet &a)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pacos(const Packet &a)
EIGEN_DEVICE_FUNC const AtanReturnType atan() const
EIGEN_DEVICE_FUNC const TanReturnType tan() const
EIGEN_STRONG_INLINE Packet2cf pconj(const Packet2cf &a)
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Scalar operator()(const Scalar &a) const
Definition: UnaryFunctors.h:24
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Abs2ReturnType abs2() const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet prsqrt(const Packet &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC const AcosReturnType acos() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const ArgReturnType arg() const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_STRONG_INLINE Packet2cf pnegate(const Packet2cf &a)
EIGEN_DEVICE_FUNC Packet pdiv(const Packet &a, const Packet &b)
EIGEN_DEVICE_FUNC const FloorReturnType floor() const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plog10(const Packet &a)
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pfloor(const Packet &a)
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &x) const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet plog(const Packet &a)
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pround(const Packet &a)
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE const Packet packetOp(const Packet &a) const
Definition: UnaryFunctors.h:97
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC const ImagReturnType imag() const
EIGEN_DEVICE_FUNC const Log10ReturnType log10() const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
NumTraits< Scalar >::Real result_type
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pcos(const Packet &a)
EIGEN_DEVICE_FUNC const SinReturnType sin() const
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet psin(const Packet &a)
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bool() isnan(const half &a)
Definition: Half.h:372
EIGEN_DEVICE_FUNC const Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE float sqrt(const float &x)
const AutoDiffScalar< DerType > & real(const AutoDiffScalar< DerType > &x)
NumTraits< Scalar >::Real result_type
EIGEN_DECLARE_FUNCTION_ALLOWING_MULTIPLE_DEFINITIONS Packet pcosh(const Packet &a)
EIGEN_DEVICE_FUNC Packet pmul(const Packet &a, const Packet &b)
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC const AsinReturnType asin() const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_DEVICE_FUNC Packet packetOp(const Packet &a) const
EIGEN_STRONG_INLINE Packet4f pabs(const Packet4f &a)
NumTraits< Scalar >::Real result_type
Definition: UnaryFunctors.h:93


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:09:46