1 | // This file is generated by tools/gen_operators.pl. CHANGES WILL BE OVERWRITTEN |
2 | /* Copyright (C) 2013-2014 Povilas Kanapickas <povilas@radix.lt> |
3 | |
4 | Distributed under the Boost Software License, Version 1.0. |
5 | (See accompanying file LICENSE_1_0.txt or copy at |
6 | http://www.boost.org/LICENSE_1_0.txt) |
7 | */ |
8 | |
9 | #ifndef LIBSIMDPP_SIMDPP_CORE_CMP_GE_OPERATOR_H |
10 | #define LIBSIMDPP_SIMDPP_CORE_CMP_GE_OPERATOR_H |
11 | |
12 | #ifndef LIBSIMDPP_SIMD_H |
13 | #error "This file must be included through simd.h" |
14 | #endif |
15 | |
16 | #include <simdpp/types.h> |
17 | #include <simdpp/detail/insn/cmp_ge.h> |
18 | #include <simdpp/core/detail/scalar_arg_impl.h> |
19 | |
20 | namespace simdpp { |
21 | namespace SIMDPP_ARCH_NAMESPACE { |
22 | |
23 | /** Compares the values of two signed int16x8 vectors for greater-than |
24 | |
25 | @code |
26 | r0 = (a0 >= b0) ? ~0x0 : 0x0 |
27 | ... |
28 | rN = (aN >= bN) ? ~0x0 : 0x0 |
29 | @endcode |
30 | */ |
31 | template<unsigned N, class E1, class E2> SIMDPP_INL |
32 | mask_int8<N,expr_empty> operator>=(const int8<N,E1>& a, |
33 | const int8<N,E2>& b) |
34 | { |
35 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
36 | } |
37 | |
38 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_int8, int8) |
39 | |
40 | template<unsigned N, class E1, class E2> SIMDPP_INL |
41 | mask_int8<N,expr_empty> operator>=(const uint8<N,E1>& a, |
42 | const uint8<N,E2>& b) |
43 | { |
44 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
45 | } |
46 | |
47 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_int8, uint8) |
48 | |
49 | template<unsigned N, class E1, class E2> SIMDPP_INL |
50 | mask_int16<N,expr_empty> operator>=(const int16<N,E1>& a, |
51 | const int16<N,E2>& b) |
52 | { |
53 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
54 | } |
55 | |
56 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_int16, int16) |
57 | |
58 | template<unsigned N, class E1, class E2> SIMDPP_INL |
59 | mask_int16<N,expr_empty> operator>=(const uint16<N,E1>& a, |
60 | const uint16<N,E2>& b) |
61 | { |
62 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
63 | } |
64 | |
65 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_int16, uint16) |
66 | |
67 | template<unsigned N, class E1, class E2> SIMDPP_INL |
68 | mask_int32<N,expr_empty> operator>=(const int32<N,E1>& a, |
69 | const int32<N,E2>& b) |
70 | { |
71 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
72 | } |
73 | |
74 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_int32, int32) |
75 | |
76 | template<unsigned N, class E1, class E2> SIMDPP_INL |
77 | mask_int32<N,expr_empty> operator>=(const uint32<N,E1>& a, |
78 | const uint32<N,E2>& b) |
79 | { |
80 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
81 | } |
82 | |
83 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_int32, uint32) |
84 | |
85 | template<unsigned N, class E1, class E2> SIMDPP_INL |
86 | mask_int64<N,expr_empty> operator>=(const int64<N,E1>& a, |
87 | const int64<N,E2>& b) |
88 | { |
89 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
90 | } |
91 | |
92 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_int64, int64) |
93 | |
94 | template<unsigned N, class E1, class E2> SIMDPP_INL |
95 | mask_int64<N,expr_empty> operator>=(const uint64<N,E1>& a, |
96 | const uint64<N,E2>& b) |
97 | { |
98 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
99 | } |
100 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_int64, uint64) |
101 | |
102 | /** Compares the values of two float32x4 vectors for greater-than or equal |
103 | |
104 | @code |
105 | r0 = (a0 >= b0) ? 0xffffffff : 0x0 |
106 | ... |
107 | rN = (aN >= bN) ? 0xffffffff : 0x0 |
108 | @endcode |
109 | |
110 | @par 256-bit version: |
111 | @icost{SSE2-SSE4.1, NEON, ALTIVEC, 2} |
112 | */ |
113 | template<unsigned N, class E1, class E2> SIMDPP_INL |
114 | mask_float32<N,expr_empty> operator>=(const float32<N,E1>& a, |
115 | const float32<N,E2>& b) |
116 | { |
117 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
118 | } |
119 | |
120 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_float32, float32) |
121 | |
122 | /** Compares the values of two float64x2 vectors for greater-than |
123 | |
124 | @code |
125 | r0 = (a0 >= b0) ? 0xffffffffffffffff : 0x0 |
126 | ... |
127 | rN = (aN >= bN) ? 0xffffffffffffffff : 0x0 |
128 | @endcode |
129 | |
130 | @par 128-bit version: |
131 | @novec{NEON, ALTIVEC} |
132 | |
133 | @par 256-bit version: |
134 | @novec{NEON, ALTIVEC} |
135 | @icost{SSE2-SSE4.1, 2} |
136 | */ |
137 | template<unsigned N, class E1, class E2> SIMDPP_INL |
138 | mask_float64<N,expr_empty> operator>=(const float64<N,E1>& a, |
139 | const float64<N,E2>& b) |
140 | { |
141 | return detail::insn::i_cmp_ge(a.eval(), b.eval()); |
142 | } |
143 | |
144 | SIMDPP_SCALAR_ARG_IMPL_VEC(operator>=, mask_float64, float64) |
145 | |
146 | } // namespace SIMDPP_ARCH_NAMESPACE |
147 | } // namespace simdpp |
148 | |
149 | #endif |
150 | |
151 | |