5 #ifndef LIN_QUERIES_OPERATORS_HPP_ 6 #define LIN_QUERIES_OPERATORS_HPP_ 11 #include <type_traits> 16 template <
class C,
class D, std::enable_if_t<
17 internal::matches_tensor_tensor<C, D>::value,
size_t> = 0>
18 inline constexpr
auto operator==(internal::Stream<C>
const &c, internal::Stream<D>
const &d) {
19 return lin::equal_to(c, d);
22 template <
typename T,
class C, std::enable_if_t<
23 internal::matches_scalar_tensor<T, C>::value,
size_t> = 0>
24 inline constexpr
auto operator==(T
const &t, internal::Stream<C>
const &c) {
25 return lin::equal_to(t, c);
28 template <
class C,
typename T, std::enable_if_t<
29 internal::matches_tensor_scalar<C, T>::value,
size_t> = 0>
30 inline constexpr
auto operator==(internal::Stream<C>
const &c, T
const &t) {
31 return lin::equal_to(c, t);
34 template <
class C,
class D, std::enable_if_t<
35 internal::matches_tensor_tensor<C, D>::value,
size_t> = 0>
36 inline constexpr
auto operator>(internal::Stream<C>
const &c, internal::Stream<D>
const &d) {
37 return lin::greater(c, d);
40 template <
typename T,
class C, std::enable_if_t<
41 internal::matches_scalar_tensor<T, C>::value,
size_t> = 0>
42 inline constexpr
auto operator>(T
const &t, internal::Stream<C>
const &c) {
43 return lin::greater(t, c);
46 template <
class C,
typename T, std::enable_if_t<
47 internal::matches_tensor_scalar<C, T>::value,
size_t> = 0>
48 inline constexpr
auto operator>(internal::Stream<C>
const &c, T
const &t) {
49 return lin::greater(c, t);
52 template <
class C,
class D, std::enable_if_t<
53 internal::matches_tensor_tensor<C, D>::value,
size_t> = 0>
54 inline constexpr
auto operator>=(internal::Stream<C>
const &c, internal::Stream<D>
const &d) {
55 return lin::greater_equal(c, d);
58 template <
typename T,
class C, std::enable_if_t<
59 internal::matches_scalar_tensor<T, C>::value,
size_t> = 0>
60 inline constexpr
auto operator>=(T
const &t, internal::Stream<C>
const &c) {
61 return lin::greater_equal(t, c);
64 template <
class C,
typename T, std::enable_if_t<
65 internal::matches_tensor_scalar<C, T>::value,
size_t> = 0>
66 inline constexpr
auto operator>=(internal::Stream<C>
const &c, T
const &t) {
67 return lin::greater_equal(c, t);
70 template <
class C,
class D, std::enable_if_t<
71 internal::matches_tensor_tensor<C, D>::value,
size_t> = 0>
72 inline constexpr
auto operator<(internal::Stream<C>
const &c, internal::Stream<D>
const &d) {
73 return lin::less(c, d);
76 template <
typename T,
class C, std::enable_if_t<
77 internal::matches_scalar_tensor<T, C>::value,
size_t> = 0>
78 inline constexpr
auto operator<(T const &t, internal::Stream<C>
const &c) {
79 return lin::less(t, c);
82 template <
class C,
typename T, std::enable_if_t<
83 internal::matches_tensor_scalar<C, T>::value,
size_t> = 0>
84 inline constexpr
auto operator<(internal::Stream<C>
const &c, T
const &t) {
85 return lin::less(c, t);
88 template <
class C,
class D, std::enable_if_t<
89 internal::matches_tensor_tensor<C, D>::value,
size_t> = 0>
90 inline constexpr
auto operator<=(internal::Stream<C>
const &c, internal::Stream<D>
const &d) {
91 return lin::less_equal(c, d);
94 template <
typename T,
class C, std::enable_if_t<
95 internal::matches_scalar_tensor<T, C>::value,
size_t> = 0>
96 inline constexpr
auto operator<=(T const &t, internal::Stream<C>
const &c) {
97 return lin::less_equal(t, c);
100 template <
class C,
typename T, std::enable_if_t<
101 internal::matches_tensor_scalar<C, T>::value,
size_t> = 0>
102 inline constexpr
auto operator<=(internal::Stream<C>
const &c, T
const &t) {
103 return lin::less_equal(c, t);
106 template <
class C,
class D, std::enable_if_t<
107 internal::matches_tensor_tensor<C, D>::value,
size_t> = 0>
108 inline constexpr
auto operator&&(internal::Stream<C>
const &c, internal::Stream<D>
const &d) {
109 return lin::logical_and(c, d);
112 template <
typename T,
class C, std::enable_if_t<
113 internal::matches_scalar_tensor<T, C>::value,
size_t> = 0>
114 inline constexpr
auto operator&&(T
const &t, internal::Stream<C>
const &c) {
115 return lin::logical_and(t, c);
118 template <
class C,
typename T, std::enable_if_t<
119 internal::matches_tensor_scalar<C, T>::value,
size_t> = 0>
120 inline constexpr
auto operator&&(internal::Stream<C>
const &c, T
const &t) {
121 return lin::logical_and(c, t);
124 template <class C, std::enable_if_t<internal::matches_tensor<C>::value,
size_t> = 0>
125 inline constexpr
auto operator!(internal::Stream<C>
const &c) {
126 return lin::logical_not(c);
129 template <
class C,
class D, std::enable_if_t<
130 internal::matches_tensor_tensor<C, D>::value,
size_t> = 0>
131 inline constexpr
auto operator||(internal::Stream<C>
const &c, internal::Stream<D>
const &d) {
132 return lin::logical_or(c, d);
135 template <
typename T,
class C, std::enable_if_t<
136 internal::matches_scalar_tensor<T, C>::value,
size_t> = 0>
137 inline constexpr
auto operator||(T
const &t, internal::Stream<C>
const &c) {
138 return lin::logical_or(t, c);
141 template <
class C,
typename T, std::enable_if_t<
142 internal::matches_tensor_scalar<C, T>::value,
size_t> = 0>
143 inline constexpr
auto operator||(internal::Stream<C>
const &c, T
const &t) {
144 return lin::logical_or(c, t);
147 template <
class C,
class D, std::enable_if_t<
148 internal::matches_tensor_tensor<C, D>::value,
size_t> = 0>
149 inline constexpr
auto operator!=(internal::Stream<C>
const &c, internal::Stream<D>
const &d) {
150 return lin::not_equal_to(c, d);
153 template <
typename T,
class C, std::enable_if_t<
154 internal::matches_scalar_tensor<T, C>::value,
size_t> = 0>
155 inline constexpr
auto operator!=(T
const &t, internal::Stream<C>
const &c) {
156 return lin::not_equal_to(t, c);
159 template <
class C,
typename T, std::enable_if_t<
160 internal::matches_tensor_scalar<C, T>::value,
size_t> = 0>
161 inline constexpr
auto operator!=(internal::Stream<C>
const &c, T
const &t) {
162 return lin::not_equal_to(c, t);
Definition: config.hpp:27