10 #ifndef EIGEN_STL_FUNCTORS_H
11 #define EIGEN_STL_FUNCTORS_H
13 #include "../InternalHeaderCheck.h"
21 struct functor_traits<
std::multiplies<T> >
25 struct functor_traits<
std::divides<T> >
29 struct functor_traits<
std::plus<T> >
33 struct functor_traits<
std::minus<T> >
37 struct functor_traits<
std::negate<T> >
41 struct functor_traits<
std::logical_or<T> >
42 {
enum { Cost = 1, PacketAccess =
false }; };
45 struct functor_traits<
std::logical_and<T> >
46 {
enum { Cost = 1, PacketAccess =
false }; };
49 struct functor_traits<
std::logical_not<T> >
50 {
enum { Cost = 1, PacketAccess =
false }; };
53 struct functor_traits<
std::greater<T> >
54 {
enum { Cost = 1, PacketAccess =
false }; };
57 struct functor_traits<
std::less<T> >
58 {
enum { Cost = 1, PacketAccess =
false }; };
61 struct functor_traits<
std::greater_equal<T> >
62 {
enum { Cost = 1, PacketAccess =
false }; };
65 struct functor_traits<
std::less_equal<T> >
66 {
enum { Cost = 1, PacketAccess =
false }; };
69 struct functor_traits<
std::equal_to<T> >
70 {
enum { Cost = 1, PacketAccess =
false }; };
73 struct functor_traits<
std::not_equal_to<T> >
74 {
enum { Cost = 1, PacketAccess =
false }; };
76 #if (EIGEN_COMP_CXXVER < 17)
79 struct functor_traits<
std::unary_negate<T> >
80 {
enum { Cost = 1 + functor_traits<T>::Cost, PacketAccess =
false }; };
84 struct functor_traits<
std::binary_negate<T> >
85 {
enum { Cost = 1 + functor_traits<T>::Cost, PacketAccess =
false }; };
88 #ifdef EIGEN_STDEXT_SUPPORT
90 template<
typename T0,
typename T1>
91 struct functor_traits<
std::project1st<T0,T1> >
92 {
enum { Cost = 0, PacketAccess =
false }; };
94 template<
typename T0,
typename T1>
95 struct functor_traits<
std::project2nd<T0,T1> >
96 {
enum { Cost = 0, PacketAccess =
false }; };
98 template<
typename T0,
typename T1>
99 struct functor_traits<
std::select2nd<std::pair<T0,T1> > >
100 {
enum { Cost = 0, PacketAccess =
false }; };
102 template<
typename T0,
typename T1>
103 struct functor_traits<
std::select1st<std::pair<T0,T1> > >
104 {
enum { Cost = 0, PacketAccess =
false }; };
106 template<
typename T0,
typename T1>
107 struct functor_traits<
std::unary_compose<T0,T1> >
108 {
enum { Cost = functor_traits<T0>::Cost + functor_traits<T1>::Cost, PacketAccess =
false }; };
110 template<
typename T0,
typename T1,
typename T2>
111 struct functor_traits<
std::binary_compose<T0,T1,T2> >
112 {
enum { Cost = functor_traits<T0>::Cost + functor_traits<T1>::Cost + functor_traits<T2>::Cost, PacketAccess =
false }; };
118 #ifdef EIGEN_FUNCTORS_PLUGIN
119 #include EIGEN_FUNCTORS_PLUGIN