source: trunk/lib/idisa_cpp/idisa_neon.cpp @ 1740

Last change on this file since 1740 was 1740, checked in by huah, 7 years ago

added support for ARM NEON

File size: 139.6 KB
Line 
1#ifndef IDISA_NEON_CPP
2#define IDISA_NEON_CPP
3#include <stdint.h>
4#include "../config.hpp"
5
6#include "arm_neon.h"
7
8typedef uint64x2_t bitblock128_t;
9template <uint32_t fw>
10class simd128
11{
12public:
13        static IDISA_ALWAYS_INLINE bitblock128_t max(bitblock128_t arg1, bitblock128_t arg2);
14        static IDISA_ALWAYS_INLINE bitblock128_t mult(bitblock128_t arg1, bitblock128_t arg2);
15        static IDISA_ALWAYS_INLINE bitblock128_t gt(bitblock128_t arg1, bitblock128_t arg2);
16        static IDISA_ALWAYS_INLINE bitblock128_t ult(bitblock128_t arg1, bitblock128_t arg2);
17        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srli(bitblock128_t arg1);
18        static IDISA_ALWAYS_INLINE bitblock128_t ctz(bitblock128_t arg1);
19        static IDISA_ALWAYS_INLINE bitblock128_t eq(bitblock128_t arg1, bitblock128_t arg2);
20        static IDISA_ALWAYS_INLINE bitblock128_t popcount(bitblock128_t arg1);
21        static IDISA_ALWAYS_INLINE bitblock128_t neg(bitblock128_t arg1);
22        static IDISA_ALWAYS_INLINE bitblock128_t himask();
23        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t slli(bitblock128_t arg1);
24        static IDISA_ALWAYS_INLINE bitblock128_t ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
25        static IDISA_ALWAYS_INLINE bitblock128_t sub(bitblock128_t arg1, bitblock128_t arg2);
26        static IDISA_ALWAYS_INLINE bitblock128_t add_hl(bitblock128_t arg1);
27        static IDISA_ALWAYS_INLINE bitblock128_t lomask();
28        static IDISA_ALWAYS_INLINE bitblock128_t umin(bitblock128_t arg1, bitblock128_t arg2);
29        template <uint64_t val> static IDISA_ALWAYS_INLINE bitblock128_t constant();
30        static IDISA_ALWAYS_INLINE bitblock128_t min(bitblock128_t arg1, bitblock128_t arg2);
31        static IDISA_ALWAYS_INLINE bitblock128_t umax(bitblock128_t arg1, bitblock128_t arg2);
32        static IDISA_ALWAYS_INLINE bitblock128_t abs(bitblock128_t arg1);
33        static IDISA_ALWAYS_INLINE bitblock128_t xor_hl(bitblock128_t arg1);
34        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srai(bitblock128_t arg1);
35        static IDISA_ALWAYS_INLINE bitblock128_t lt(bitblock128_t arg1, bitblock128_t arg2);
36        static IDISA_ALWAYS_INLINE bitblock128_t add(bitblock128_t arg1, bitblock128_t arg2);
37        static IDISA_ALWAYS_INLINE bitblock128_t ugt(bitblock128_t arg1, bitblock128_t arg2);
38};
39
40template <uint32_t fw>
41class hsimd128
42{
43public:
44        static IDISA_ALWAYS_INLINE bitblock128_t umin_hl(bitblock128_t arg1, bitblock128_t arg2);
45        static IDISA_ALWAYS_INLINE bitblock128_t add_hl(bitblock128_t arg1, bitblock128_t arg2);
46        static IDISA_ALWAYS_INLINE bitblock128_t packss(bitblock128_t arg1, bitblock128_t arg2);
47        static IDISA_ALWAYS_INLINE bitblock128_t packh(bitblock128_t arg1, bitblock128_t arg2);
48        static IDISA_ALWAYS_INLINE uint64_t signmask(bitblock128_t arg1);
49        static IDISA_ALWAYS_INLINE bitblock128_t packl(bitblock128_t arg1, bitblock128_t arg2);
50        static IDISA_ALWAYS_INLINE bitblock128_t min_hl(bitblock128_t arg1, bitblock128_t arg2);
51        static IDISA_ALWAYS_INLINE bitblock128_t packus(bitblock128_t arg1, bitblock128_t arg2);
52};
53
54template <uint32_t fw>
55class esimd128
56{
57public:
58        static IDISA_ALWAYS_INLINE bitblock128_t mergel(bitblock128_t arg1, bitblock128_t arg2);
59        static IDISA_ALWAYS_INLINE bitblock128_t signextendh(bitblock128_t arg1);
60        static IDISA_ALWAYS_INLINE bitblock128_t mergeh(bitblock128_t arg1, bitblock128_t arg2);
61        static IDISA_ALWAYS_INLINE bitblock128_t zeroextendh(bitblock128_t arg1);
62        static IDISA_ALWAYS_INLINE bitblock128_t zeroextendl(bitblock128_t arg1);
63        static IDISA_ALWAYS_INLINE bitblock128_t signextendl(bitblock128_t arg1);
64};
65
66template <uint32_t fw>
67class mvmd128
68{
69public:
70        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t dsrli(bitblock128_t arg1, bitblock128_t arg2);
71        static IDISA_ALWAYS_INLINE bitblock128_t fill(uint64_t val1);
72        template <uint64_t pos> static IDISA_ALWAYS_INLINE uint64_t extract(bitblock128_t arg1);
73        template <uint64_t pos> static IDISA_ALWAYS_INLINE bitblock128_t splat(bitblock128_t arg1);
74        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t slli(bitblock128_t arg1);
75        static IDISA_ALWAYS_INLINE bitblock128_t fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
76        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srli(bitblock128_t arg1);
77        static IDISA_ALWAYS_INLINE bitblock128_t fill2(uint64_t val1, uint64_t val2);
78        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t dslli(bitblock128_t arg1, bitblock128_t arg2);
79        static IDISA_ALWAYS_INLINE bitblock128_t fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8);
80        static IDISA_ALWAYS_INLINE bitblock128_t fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16);
81};
82
83class bitblock128
84{
85public:
86        static IDISA_ALWAYS_INLINE bitblock128_t load_unaligned(uint64_t const* arg1);
87        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srli(bitblock128_t arg1);
88        static IDISA_ALWAYS_INLINE void store_aligned(uint64_t* arg1, bitblock128_t arg2);
89        static IDISA_ALWAYS_INLINE bool all(bitblock128_t arg1);
90        static IDISA_ALWAYS_INLINE bool any(bitblock128_t arg1);
91        static IDISA_ALWAYS_INLINE uint64_t popcount(bitblock128_t arg1);
92        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t slli(bitblock128_t arg1);
93        static IDISA_ALWAYS_INLINE bitblock128_t load_aligned(uint64_t const* arg1);
94        static IDISA_ALWAYS_INLINE void store_unaligned(uint64_t* arg1, bitblock128_t arg2);
95};
96
97//Declaration Part
98IDISA_ALWAYS_INLINE bitblock128_t simd_nor(bitblock128_t arg1, bitblock128_t arg2);
99IDISA_ALWAYS_INLINE bitblock128_t simd_not(bitblock128_t arg1);
100IDISA_ALWAYS_INLINE bitblock128_t simd_andc(bitblock128_t arg1, bitblock128_t arg2);
101IDISA_ALWAYS_INLINE bitblock128_t simd_or(bitblock128_t arg1, bitblock128_t arg2);
102IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2);
103IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2);
104template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::max(bitblock128_t arg1, bitblock128_t arg2);
105template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::max(bitblock128_t arg1, bitblock128_t arg2);
106template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::max(bitblock128_t arg1, bitblock128_t arg2);
107template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::max(bitblock128_t arg1, bitblock128_t arg2);
108template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::max(bitblock128_t arg1, bitblock128_t arg2);
109template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::max(bitblock128_t arg1, bitblock128_t arg2);
110template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::max(bitblock128_t arg1, bitblock128_t arg2);
111template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::max(bitblock128_t arg1, bitblock128_t arg2);
112template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::mult(bitblock128_t arg1, bitblock128_t arg2);
113template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::mult(bitblock128_t arg1, bitblock128_t arg2);
114template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::mult(bitblock128_t arg1, bitblock128_t arg2);
115template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::mult(bitblock128_t arg1, bitblock128_t arg2);
116template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::mult(bitblock128_t arg1, bitblock128_t arg2);
117template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::mult(bitblock128_t arg1, bitblock128_t arg2);
118template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2);
119template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::gt(bitblock128_t arg1, bitblock128_t arg2);
120template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::gt(bitblock128_t arg1, bitblock128_t arg2);
121template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::gt(bitblock128_t arg1, bitblock128_t arg2);
122template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::gt(bitblock128_t arg1, bitblock128_t arg2);
123template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::gt(bitblock128_t arg1, bitblock128_t arg2);
124template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::gt(bitblock128_t arg1, bitblock128_t arg2);
125template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::gt(bitblock128_t arg1, bitblock128_t arg2);
126template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2);
127template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ult(bitblock128_t arg1, bitblock128_t arg2);
128template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2);
129template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ult(bitblock128_t arg1, bitblock128_t arg2);
130template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ult(bitblock128_t arg1, bitblock128_t arg2);
131template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ult(bitblock128_t arg1, bitblock128_t arg2);
132template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ult(bitblock128_t arg1, bitblock128_t arg2);
133template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ult(bitblock128_t arg1, bitblock128_t arg2);
134template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2);
135template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::lt(bitblock128_t arg1, bitblock128_t arg2);
136template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::lt(bitblock128_t arg1, bitblock128_t arg2);
137template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::lt(bitblock128_t arg1, bitblock128_t arg2);
138template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::lt(bitblock128_t arg1, bitblock128_t arg2);
139template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::lt(bitblock128_t arg1, bitblock128_t arg2);
140template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::lt(bitblock128_t arg1, bitblock128_t arg2);
141template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::lt(bitblock128_t arg1, bitblock128_t arg2);
142template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::srli(bitblock128_t arg1);
143template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::srli(bitblock128_t arg1);
144template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::srli(bitblock128_t arg1);
145template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::srli(bitblock128_t arg1);
146template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::srli(bitblock128_t arg1);
147template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srli(bitblock128_t arg1);
148template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srli(bitblock128_t arg1);
149template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ctz(bitblock128_t arg1);
150template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ctz(bitblock128_t arg1);
151template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ctz(bitblock128_t arg1);
152template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ctz(bitblock128_t arg1);
153template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ctz(bitblock128_t arg1);
154template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ctz(bitblock128_t arg1);
155template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ctz(bitblock128_t arg1);
156template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ctz(bitblock128_t arg1);
157template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2);
158template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ugt(bitblock128_t arg1, bitblock128_t arg2);
159template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2);
160template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ugt(bitblock128_t arg1, bitblock128_t arg2);
161template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ugt(bitblock128_t arg1, bitblock128_t arg2);
162template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ugt(bitblock128_t arg1, bitblock128_t arg2);
163template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ugt(bitblock128_t arg1, bitblock128_t arg2);
164template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ugt(bitblock128_t arg1, bitblock128_t arg2);
165template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::xor_hl(bitblock128_t arg1);
166template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::xor_hl(bitblock128_t arg1);
167template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::xor_hl(bitblock128_t arg1);
168template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::xor_hl(bitblock128_t arg1);
169template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::xor_hl(bitblock128_t arg1);
170template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::xor_hl(bitblock128_t arg1);
171template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::xor_hl(bitblock128_t arg1);
172template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::popcount(bitblock128_t arg1);
173template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::popcount(bitblock128_t arg1);
174template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::popcount(bitblock128_t arg1);
175template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::popcount(bitblock128_t arg1);
176template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::popcount(bitblock128_t arg1);
177template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::popcount(bitblock128_t arg1);
178template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::popcount(bitblock128_t arg1);
179template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::popcount(bitblock128_t arg1);
180template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::neg(bitblock128_t arg1);
181template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::neg(bitblock128_t arg1);
182template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::neg(bitblock128_t arg1);
183template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::neg(bitblock128_t arg1);
184template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::neg(bitblock128_t arg1);
185template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::neg(bitblock128_t arg1);
186template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::neg(bitblock128_t arg1);
187template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::slli(bitblock128_t arg1);
188template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::slli(bitblock128_t arg1);
189template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::slli(bitblock128_t arg1);
190template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::slli(bitblock128_t arg1);
191template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::slli(bitblock128_t arg1);
192template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::slli(bitblock128_t arg1);
193template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::slli(bitblock128_t arg1);
194template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
195template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
196template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
197template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
198template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
199template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
200template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
201template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
202template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::sub(bitblock128_t arg1, bitblock128_t arg2);
203template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::sub(bitblock128_t arg1, bitblock128_t arg2);
204template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::sub(bitblock128_t arg1, bitblock128_t arg2);
205template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::sub(bitblock128_t arg1, bitblock128_t arg2);
206template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::sub(bitblock128_t arg1, bitblock128_t arg2);
207template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::sub(bitblock128_t arg1, bitblock128_t arg2);
208template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::sub(bitblock128_t arg1, bitblock128_t arg2);
209template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sub(bitblock128_t arg1, bitblock128_t arg2);
210template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::add_hl(bitblock128_t arg1);
211template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::add_hl(bitblock128_t arg1);
212template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::add_hl(bitblock128_t arg1);
213template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::add_hl(bitblock128_t arg1);
214template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::add_hl(bitblock128_t arg1);
215template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::add_hl(bitblock128_t arg1);
216template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::add_hl(bitblock128_t arg1);
217template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::constant();
218template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::constant();
219template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::constant();
220template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::constant();
221template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::constant();
222template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::constant();
223template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::constant();
224template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::constant();
225template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::min(bitblock128_t arg1, bitblock128_t arg2);
226template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::min(bitblock128_t arg1, bitblock128_t arg2);
227template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::min(bitblock128_t arg1, bitblock128_t arg2);
228template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::min(bitblock128_t arg1, bitblock128_t arg2);
229template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::min(bitblock128_t arg1, bitblock128_t arg2);
230template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::min(bitblock128_t arg1, bitblock128_t arg2);
231template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::min(bitblock128_t arg1, bitblock128_t arg2);
232template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::min(bitblock128_t arg1, bitblock128_t arg2);
233template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::lomask();
234template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::lomask();
235template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::lomask();
236template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::lomask();
237template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::lomask();
238template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::lomask();
239template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::lomask();
240template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umin(bitblock128_t arg1, bitblock128_t arg2);
241template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umin(bitblock128_t arg1, bitblock128_t arg2);
242template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umin(bitblock128_t arg1, bitblock128_t arg2);
243template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umin(bitblock128_t arg1, bitblock128_t arg2);
244template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umin(bitblock128_t arg1, bitblock128_t arg2);
245template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umin(bitblock128_t arg1, bitblock128_t arg2);
246template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umin(bitblock128_t arg1, bitblock128_t arg2);
247template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::umin(bitblock128_t arg1, bitblock128_t arg2);
248template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::abs(bitblock128_t arg1);
249template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::abs(bitblock128_t arg1);
250template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::abs(bitblock128_t arg1);
251template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::abs(bitblock128_t arg1);
252template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::abs(bitblock128_t arg1);
253template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::abs(bitblock128_t arg1);
254template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::abs(bitblock128_t arg1);
255template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::eq(bitblock128_t arg1, bitblock128_t arg2);
256template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::eq(bitblock128_t arg1, bitblock128_t arg2);
257template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::eq(bitblock128_t arg1, bitblock128_t arg2);
258template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::eq(bitblock128_t arg1, bitblock128_t arg2);
259template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::eq(bitblock128_t arg1, bitblock128_t arg2);
260template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::eq(bitblock128_t arg1, bitblock128_t arg2);
261template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::eq(bitblock128_t arg1, bitblock128_t arg2);
262template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::eq(bitblock128_t arg1, bitblock128_t arg2);
263template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::srai(bitblock128_t arg1);
264template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::srai(bitblock128_t arg1);
265template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::srai(bitblock128_t arg1);
266template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::srai(bitblock128_t arg1);
267template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::srai(bitblock128_t arg1);
268template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srai(bitblock128_t arg1);
269template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srai(bitblock128_t arg1);
270template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::himask();
271template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::himask();
272template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::himask();
273template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::himask();
274template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::himask();
275template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::himask();
276template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::himask();
277template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::add(bitblock128_t arg1, bitblock128_t arg2);
278template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::add(bitblock128_t arg1, bitblock128_t arg2);
279template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::add(bitblock128_t arg1, bitblock128_t arg2);
280template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::add(bitblock128_t arg1, bitblock128_t arg2);
281template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::add(bitblock128_t arg1, bitblock128_t arg2);
282template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::add(bitblock128_t arg1, bitblock128_t arg2);
283template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::add(bitblock128_t arg1, bitblock128_t arg2);
284template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::add(bitblock128_t arg1, bitblock128_t arg2);
285template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umax(bitblock128_t arg1, bitblock128_t arg2);
286template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umax(bitblock128_t arg1, bitblock128_t arg2);
287template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umax(bitblock128_t arg1, bitblock128_t arg2);
288template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umax(bitblock128_t arg1, bitblock128_t arg2);
289template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umax(bitblock128_t arg1, bitblock128_t arg2);
290template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umax(bitblock128_t arg1, bitblock128_t arg2);
291template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umax(bitblock128_t arg1, bitblock128_t arg2);
292template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::umax(bitblock128_t arg1, bitblock128_t arg2);
293template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
294template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
295template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
296template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
297template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
298template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
299template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
300template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
301template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
302template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
303template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
304template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
305template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
306template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
307template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packss(bitblock128_t arg1, bitblock128_t arg2);
308template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packss(bitblock128_t arg1, bitblock128_t arg2);
309template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packss(bitblock128_t arg1, bitblock128_t arg2);
310template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packss(bitblock128_t arg1, bitblock128_t arg2);
311template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packss(bitblock128_t arg1, bitblock128_t arg2);
312template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packss(bitblock128_t arg1, bitblock128_t arg2);
313template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packss(bitblock128_t arg1, bitblock128_t arg2);
314template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<4>::signmask(bitblock128_t arg1);
315template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<8>::signmask(bitblock128_t arg1);
316template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<16>::signmask(bitblock128_t arg1);
317template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<32>::signmask(bitblock128_t arg1);
318template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<64>::signmask(bitblock128_t arg1);
319template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<128>::signmask(bitblock128_t arg1);
320template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packl(bitblock128_t arg1, bitblock128_t arg2);
321template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packl(bitblock128_t arg1, bitblock128_t arg2);
322template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packl(bitblock128_t arg1, bitblock128_t arg2);
323template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packl(bitblock128_t arg1, bitblock128_t arg2);
324template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packl(bitblock128_t arg1, bitblock128_t arg2);
325template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packl(bitblock128_t arg1, bitblock128_t arg2);
326template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packl(bitblock128_t arg1, bitblock128_t arg2);
327template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packh(bitblock128_t arg1, bitblock128_t arg2);
328template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packh(bitblock128_t arg1, bitblock128_t arg2);
329template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packh(bitblock128_t arg1, bitblock128_t arg2);
330template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packh(bitblock128_t arg1, bitblock128_t arg2);
331template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packh(bitblock128_t arg1, bitblock128_t arg2);
332template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packh(bitblock128_t arg1, bitblock128_t arg2);
333template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packh(bitblock128_t arg1, bitblock128_t arg2);
334template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
335template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
336template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
337template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
338template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
339template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
340template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
341template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packus(bitblock128_t arg1, bitblock128_t arg2);
342template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packus(bitblock128_t arg1, bitblock128_t arg2);
343template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packus(bitblock128_t arg1, bitblock128_t arg2);
344template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packus(bitblock128_t arg1, bitblock128_t arg2);
345template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packus(bitblock128_t arg1, bitblock128_t arg2);
346template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packus(bitblock128_t arg1, bitblock128_t arg2);
347template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packus(bitblock128_t arg1, bitblock128_t arg2);
348template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::mergel(bitblock128_t arg1, bitblock128_t arg2);
349template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::mergel(bitblock128_t arg1, bitblock128_t arg2);
350template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::mergel(bitblock128_t arg1, bitblock128_t arg2);
351template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::mergel(bitblock128_t arg1, bitblock128_t arg2);
352template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::mergel(bitblock128_t arg1, bitblock128_t arg2);
353template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::mergel(bitblock128_t arg1, bitblock128_t arg2);
354template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::mergel(bitblock128_t arg1, bitblock128_t arg2);
355template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
356template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
357template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
358template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
359template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
360template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
361template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
362template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::zeroextendh(bitblock128_t arg1);
363template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::zeroextendh(bitblock128_t arg1);
364template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::zeroextendh(bitblock128_t arg1);
365template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::zeroextendh(bitblock128_t arg1);
366template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::zeroextendh(bitblock128_t arg1);
367template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::zeroextendh(bitblock128_t arg1);
368template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::zeroextendh(bitblock128_t arg1);
369template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::zeroextendl(bitblock128_t arg1);
370template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::zeroextendl(bitblock128_t arg1);
371template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::zeroextendl(bitblock128_t arg1);
372template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::zeroextendl(bitblock128_t arg1);
373template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::zeroextendl(bitblock128_t arg1);
374template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::zeroextendl(bitblock128_t arg1);
375template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::zeroextendl(bitblock128_t arg1);
376template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::signextendh(bitblock128_t arg1);
377template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::signextendh(bitblock128_t arg1);
378template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::signextendh(bitblock128_t arg1);
379template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::signextendh(bitblock128_t arg1);
380template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::signextendh(bitblock128_t arg1);
381template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::signextendh(bitblock128_t arg1);
382template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::signextendh(bitblock128_t arg1);
383template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::signextendl(bitblock128_t arg1);
384template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::signextendl(bitblock128_t arg1);
385template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::signextendl(bitblock128_t arg1);
386template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::signextendl(bitblock128_t arg1);
387template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::signextendl(bitblock128_t arg1);
388template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::signextendl(bitblock128_t arg1);
389template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::signextendl(bitblock128_t arg1);
390template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
391template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
392template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
393template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
394template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
395template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
396template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
397template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill(uint64_t val1);
398template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill(uint64_t val1);
399template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill(uint64_t val1);
400template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill(uint64_t val1);
401template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill(uint64_t val1);
402template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill(uint64_t val1);
403template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::fill(uint64_t val1);
404template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<1>::extract(bitblock128_t arg1);
405template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<2>::extract(bitblock128_t arg1);
406template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<4>::extract(bitblock128_t arg1);
407template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<8>::extract(bitblock128_t arg1);
408template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<16>::extract(bitblock128_t arg1);
409template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<32>::extract(bitblock128_t arg1);
410template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<64>::extract(bitblock128_t arg1);
411template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::splat(bitblock128_t arg1);
412template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::splat(bitblock128_t arg1);
413template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::splat(bitblock128_t arg1);
414template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::splat(bitblock128_t arg1);
415template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::splat(bitblock128_t arg1);
416template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::splat(bitblock128_t arg1);
417template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::splat(bitblock128_t arg1);
418template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::splat(bitblock128_t arg1);
419template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16);
420template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16);
421template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16);
422template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16);
423template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
424template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
425template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
426template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
427template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
428template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
429template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::srli(bitblock128_t arg1);
430template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1);
431template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::srli(bitblock128_t arg1);
432template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::srli(bitblock128_t arg1);
433template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1);
434template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::srli(bitblock128_t arg1);
435template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1);
436template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill2(uint64_t val1, uint64_t val2);
437template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill2(uint64_t val1, uint64_t val2);
438template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill2(uint64_t val1, uint64_t val2);
439template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill2(uint64_t val1, uint64_t val2);
440template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill2(uint64_t val1, uint64_t val2);
441template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill2(uint64_t val1, uint64_t val2);
442template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::fill2(uint64_t val1, uint64_t val2);
443template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::dslli(bitblock128_t arg1, bitblock128_t arg2);
444template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::dslli(bitblock128_t arg1, bitblock128_t arg2);
445template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::dslli(bitblock128_t arg1, bitblock128_t arg2);
446template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::dslli(bitblock128_t arg1, bitblock128_t arg2);
447template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::dslli(bitblock128_t arg1, bitblock128_t arg2);
448template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::dslli(bitblock128_t arg1, bitblock128_t arg2);
449template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::dslli(bitblock128_t arg1, bitblock128_t arg2);
450template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::slli(bitblock128_t arg1);
451template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1);
452template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::slli(bitblock128_t arg1);
453template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1);
454template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::slli(bitblock128_t arg1);
455template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1);
456template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::slli(bitblock128_t arg1);
457template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8);
458template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8);
459template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8);
460template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8);
461template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8);
462
463//Implementation Part
464
465#define neon_shift_right_64_bits(x) \
466        vextq_u64((bitblock128_t)(x), vdupq_n_u64(0), 1)
467
468#define neon_shift_left_64_bits(x) \
469        vextq_u64(vdupq_n_u64(0), (bitblock128_t)(x), 1)
470//The total number of operations is 2
471IDISA_ALWAYS_INLINE bitblock128_t simd_nor(bitblock128_t arg1, bitblock128_t arg2)
472{
473        return simd_not(simd_or(arg1, arg2));
474}
475
476//The total number of operations is 1
477IDISA_ALWAYS_INLINE bitblock128_t simd_not(bitblock128_t arg1)
478{
479        return (bitblock128_t)vmvnq_u32((uint32x4_t)(arg1));
480}
481
482//The total number of operations is 1
483IDISA_ALWAYS_INLINE bitblock128_t simd_andc(bitblock128_t arg1, bitblock128_t arg2)
484{
485        return vbicq_u64(arg1, arg2);
486}
487
488//The total number of operations is 1
489IDISA_ALWAYS_INLINE bitblock128_t simd_or(bitblock128_t arg1, bitblock128_t arg2)
490{
491        return vorrq_u64(arg1, arg2);
492}
493
494//The total number of operations is 1
495IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2)
496{
497        return vandq_u64(arg1, arg2);
498}
499
500//The total number of operations is 1
501IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2)
502{
503        return veorq_u64(arg1, arg2);
504}
505
506//The total number of operations is 1
507template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::max(bitblock128_t arg1, bitblock128_t arg2)
508{
509        return simd_and(arg1, arg2);
510}
511
512//The total number of operations is 13
513template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::max(bitblock128_t arg1, bitblock128_t arg2)
514{
515        bitblock128_t hiAns = simd128<(1)>::max(arg1, arg2);
516        bitblock128_t loAns = simd128<(1)>::umax(arg1, arg2);
517        bitblock128_t eqMask1 = simd128<2>::srli<(1)>(simd128<(1)>::eq(hiAns, arg1));
518        bitblock128_t eqMask2 = simd128<2>::srli<(1)>(simd128<(1)>::eq(hiAns, arg2));
519        return simd128<1>::ifh(simd128<2>::himask(), hiAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, loAns, arg1), arg2));
520}
521
522//The total number of operations is 7
523template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::max(bitblock128_t arg1, bitblock128_t arg2)
524{
525        return simd128<1>::ifh(simd128<4>::gt(arg1, arg2), arg1, arg2);
526}
527
528//The total number of operations is 1
529template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::max(bitblock128_t arg1, bitblock128_t arg2)
530{
531        return (bitblock128_t)vmaxq_s8((int8x16_t)(arg1), (int8x16_t)(arg2));
532}
533
534//The total number of operations is 1
535template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::max(bitblock128_t arg1, bitblock128_t arg2)
536{
537        return (bitblock128_t)vmaxq_s16((int16x8_t)(arg1), (int16x8_t)(arg2));
538}
539
540//The total number of operations is 1
541template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::max(bitblock128_t arg1, bitblock128_t arg2)
542{
543        return (bitblock128_t)vmaxq_s32((int32x4_t)(arg1), (int32x4_t)(arg2));
544}
545
546//The total number of operations is 12
547template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::max(bitblock128_t arg1, bitblock128_t arg2)
548{
549        bitblock128_t hiAns = simd128<(32)>::max(arg1, arg2);
550        bitblock128_t loAns = simd128<(32)>::umax(arg1, arg2);
551        bitblock128_t eqMask1 = simd128<64>::srli<(32)>(simd128<(32)>::eq(hiAns, arg1));
552        bitblock128_t eqMask2 = simd128<64>::srli<(32)>(simd128<(32)>::eq(hiAns, arg2));
553        return simd128<1>::ifh(simd128<64>::himask(), hiAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, loAns, arg1), arg2));
554}
555
556//The total number of operations is 46
557template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::max(bitblock128_t arg1, bitblock128_t arg2)
558{
559        bitblock128_t hiAns = simd128<(64)>::max(arg1, arg2);
560        bitblock128_t loAns = simd128<(64)>::umax(arg1, arg2);
561        bitblock128_t eqMask1 = simd128<128>::srli<(64)>(simd128<(64)>::eq(hiAns, arg1));
562        bitblock128_t eqMask2 = simd128<128>::srli<(64)>(simd128<(64)>::eq(hiAns, arg2));
563        return simd128<1>::ifh(simd128<128>::himask(), hiAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, loAns, arg1), arg2));
564}
565
566//The total number of operations is 1
567template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::mult(bitblock128_t arg1, bitblock128_t arg2)
568{
569        return simd_and(arg1, arg2);
570}
571
572//The total number of operations is 23
573template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::mult(bitblock128_t arg1, bitblock128_t arg2)
574{
575        bitblock128_t tmp1 = simd128<128>::slli<1>(arg1);
576        bitblock128_t tmp2 = simd128<128>::slli<1>(arg2);
577        return simd128<1>::ifh(simd128<2>::himask(), simd_or(simd_and(tmp1, simd_and(arg2, simd_or(simd_not(arg1), simd_not(tmp2)))), simd_and(arg1, simd_and(tmp2, simd_or(simd_not(tmp1), simd_not(arg2))))), simd_and(arg1, arg2));
578}
579
580//The total number of operations is 8
581template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::mult(bitblock128_t arg1, bitblock128_t arg2)
582{
583        bitblock128_t loMask = simd128<(8)>::lomask();
584        bitblock128_t tmpAns1 = simd128<(8)>::mult(simd_and(loMask, arg1), simd_and(loMask, arg2));
585        bitblock128_t tmpAns2 = simd128<(8)>::mult(simd128<(8)>::srli<4>(arg1), simd128<(8)>::srli<4>(arg2));
586        return simd128<1>::ifh(loMask, tmpAns1, simd128<(8)>::slli<4>(tmpAns2));
587}
588
589//The total number of operations is 1
590template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::mult(bitblock128_t arg1, bitblock128_t arg2)
591{
592        return (bitblock128_t)vmulq_s8((int8x16_t)(arg1), (int8x16_t)(arg2));
593}
594
595//The total number of operations is 1
596template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::mult(bitblock128_t arg1, bitblock128_t arg2)
597{
598        return (bitblock128_t)vmulq_s16((int16x8_t)(arg1), (int16x8_t)(arg2));
599}
600
601//The total number of operations is 1
602template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::mult(bitblock128_t arg1, bitblock128_t arg2)
603{
604        return (bitblock128_t)vmulq_s32((int32x4_t)(arg1), (int32x4_t)(arg2));
605}
606
607//The total number of operations is 1
608template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2)
609{
610        return simd_andc(arg2, arg1);
611}
612
613//The total number of operations is 15
614template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::gt(bitblock128_t arg1, bitblock128_t arg2)
615{
616        bitblock128_t hiAns = simd128<(1)>::gt(arg1, arg2);
617        bitblock128_t loAns = simd128<(1)>::ugt(arg1, arg2);
618        bitblock128_t mask = simd_and(loAns, simd128<2>::srli<(1)>(simd128<(1)>::eq(arg1, arg2)));
619        mask = simd_or(mask, simd128<2>::slli<(1)>(mask));
620        return simd_or(simd128<2>::srai<(1)>(hiAns), mask);
621}
622
623//The total number of operations is 6
624template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::gt(bitblock128_t arg1, bitblock128_t arg2)
625{
626        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::gt(simd_and(simd128<(8)>::himask(), arg1), arg2), simd128<(8)>::gt(simd128<(8)>::slli<4>(arg1), simd128<(8)>::slli<4>(arg2)));
627}
628
629//The total number of operations is 1
630template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::gt(bitblock128_t arg1, bitblock128_t arg2)
631{
632        return (bitblock128_t)vcgtq_s8((int8x16_t)(arg1), (int8x16_t)(arg2));
633}
634
635//The total number of operations is 1
636template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::gt(bitblock128_t arg1, bitblock128_t arg2)
637{
638        return (bitblock128_t)vcgtq_s16((int16x8_t)(arg1), (int16x8_t)(arg2));
639}
640
641//The total number of operations is 1
642template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::gt(bitblock128_t arg1, bitblock128_t arg2)
643{
644        return (bitblock128_t)vcgtq_s32((int32x4_t)(arg1), (int32x4_t)(arg2));
645}
646
647//The total number of operations is 11
648template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::gt(bitblock128_t arg1, bitblock128_t arg2)
649{
650        bitblock128_t hiAns = simd128<(32)>::gt(arg1, arg2);
651        bitblock128_t loAns = simd128<(32)>::ugt(arg1, arg2);
652        bitblock128_t mask = simd_and(loAns, simd128<64>::srli<(32)>(simd128<(32)>::eq(arg1, arg2)));
653        mask = simd_or(mask, simd128<64>::slli<(32)>(mask));
654        return simd_or(simd128<64>::srai<(32)>(hiAns), mask);
655}
656
657//The total number of operations is 48
658template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::gt(bitblock128_t arg1, bitblock128_t arg2)
659{
660        bitblock128_t hiAns = simd128<(64)>::gt(arg1, arg2);
661        bitblock128_t loAns = simd128<(64)>::ugt(arg1, arg2);
662        bitblock128_t mask = simd_and(loAns, simd128<128>::srli<(64)>(simd128<(64)>::eq(arg1, arg2)));
663        mask = simd_or(mask, simd128<128>::slli<(64)>(mask));
664        return simd_or(simd128<128>::srai<(64)>(hiAns), mask);
665}
666
667//The total number of operations is 1
668template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2)
669{
670        return simd_andc(arg2, arg1);
671}
672
673//The total number of operations is 14
674template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ult(bitblock128_t arg1, bitblock128_t arg2)
675{
676        bitblock128_t tmpAns = simd128<(1)>::ult(arg1, arg2);
677        bitblock128_t mask = simd_and(tmpAns, simd128<2>::srli<(1)>(simd128<(1)>::eq(arg1, arg2)));
678        mask = simd_or(mask, simd128<2>::slli<(1)>(mask));
679        return simd_or(simd128<2>::srai<(1)>(tmpAns), mask);
680}
681
682//The total number of operations is 8
683template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2)
684{
685        bitblock128_t high_bit = simd128<4>::constant<(8)>();
686        return simd128<4>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
687}
688
689//The total number of operations is 3
690template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ult(bitblock128_t arg1, bitblock128_t arg2)
691{
692        bitblock128_t high_bit = simd128<8>::constant<(128)>();
693        return simd128<8>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
694}
695
696//The total number of operations is 3
697template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ult(bitblock128_t arg1, bitblock128_t arg2)
698{
699        bitblock128_t high_bit = simd128<16>::constant<(32768)>();
700        return simd128<16>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
701}
702
703//The total number of operations is 3
704template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ult(bitblock128_t arg1, bitblock128_t arg2)
705{
706        bitblock128_t high_bit = simd128<32>::constant<(2147483648ULL)>();
707        return simd128<32>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
708}
709
710//The total number of operations is 10
711template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ult(bitblock128_t arg1, bitblock128_t arg2)
712{
713        bitblock128_t tmpAns = simd128<(32)>::ult(arg1, arg2);
714        bitblock128_t mask = simd_and(tmpAns, simd128<64>::srli<(32)>(simd128<(32)>::eq(arg1, arg2)));
715        mask = simd_or(mask, simd128<64>::slli<(32)>(mask));
716        return simd_or(simd128<64>::srai<(32)>(tmpAns), mask);
717}
718
719//The total number of operations is 37
720template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ult(bitblock128_t arg1, bitblock128_t arg2)
721{
722        bitblock128_t tmpAns = simd128<(64)>::ult(arg1, arg2);
723        bitblock128_t mask = simd_and(tmpAns, simd128<128>::srli<(64)>(simd128<(64)>::eq(arg1, arg2)));
724        mask = simd_or(mask, simd128<128>::slli<(64)>(mask));
725        return simd_or(simd128<128>::srai<(64)>(tmpAns), mask);
726}
727
728//The total number of operations is 1
729template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2)
730{
731        return simd_andc(arg1, arg2);
732}
733
734//The total number of operations is 15
735template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::lt(bitblock128_t arg1, bitblock128_t arg2)
736{
737        bitblock128_t hiAns = simd128<(1)>::lt(arg1, arg2);
738        bitblock128_t loAns = simd128<(1)>::ult(arg1, arg2);
739        bitblock128_t mask = simd_and(loAns, simd128<2>::srli<(1)>(simd128<(1)>::eq(arg1, arg2)));
740        mask = simd_or(mask, simd128<2>::slli<(1)>(mask));
741        return simd_or(simd128<2>::srai<(1)>(hiAns), mask);
742}
743
744//The total number of operations is 6
745template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::lt(bitblock128_t arg1, bitblock128_t arg2)
746{
747        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::lt(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::lt(simd128<(8)>::slli<4>(arg1), simd128<(8)>::slli<4>(arg2)));
748}
749
750//The total number of operations is 1
751template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::lt(bitblock128_t arg1, bitblock128_t arg2)
752{
753        return (bitblock128_t)vcltq_s8((int8x16_t)(arg1), (int8x16_t)(arg2));
754}
755
756//The total number of operations is 1
757template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::lt(bitblock128_t arg1, bitblock128_t arg2)
758{
759        return (bitblock128_t)vcltq_s16((int16x8_t)(arg1), (int16x8_t)(arg2));
760}
761
762//The total number of operations is 1
763template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::lt(bitblock128_t arg1, bitblock128_t arg2)
764{
765        return (bitblock128_t)vcltq_s32((int32x4_t)(arg1), (int32x4_t)(arg2));
766}
767
768//The total number of operations is 11
769template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::lt(bitblock128_t arg1, bitblock128_t arg2)
770{
771        bitblock128_t hiAns = simd128<(32)>::lt(arg1, arg2);
772        bitblock128_t loAns = simd128<(32)>::ult(arg1, arg2);
773        bitblock128_t mask = simd_and(loAns, simd128<64>::srli<(32)>(simd128<(32)>::eq(arg1, arg2)));
774        mask = simd_or(mask, simd128<64>::slli<(32)>(mask));
775        return simd_or(simd128<64>::srai<(32)>(hiAns), mask);
776}
777
778//The total number of operations is 48
779template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::lt(bitblock128_t arg1, bitblock128_t arg2)
780{
781        bitblock128_t hiAns = simd128<(64)>::lt(arg1, arg2);
782        bitblock128_t loAns = simd128<(64)>::ult(arg1, arg2);
783        bitblock128_t mask = simd_and(loAns, simd128<128>::srli<(64)>(simd128<(64)>::eq(arg1, arg2)));
784        mask = simd_or(mask, simd128<128>::slli<(64)>(mask));
785        return simd_or(simd128<128>::srai<(64)>(hiAns), mask);
786}
787
788//The total number of operations is 2
789template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::srli(bitblock128_t arg1)
790{
791        return simd_and(simd128<32>::srli<sh>(arg1), simd128<2>::constant<((3)>>sh)>());
792}
793
794//The total number of operations is 2
795template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::srli(bitblock128_t arg1)
796{
797        return simd_and(simd128<32>::srli<sh>(arg1), simd128<4>::constant<((15)>>sh)>());
798}
799
800//The total number of operations is 1
801template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::srli(bitblock128_t arg1)
802{
803        return ((sh == 0) ? arg1 : ((bitblock128_t)vshrq_n_u8((uint8x16_t)(arg1), (int32_t)(sh))));
804}
805
806//The total number of operations is 1
807template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::srli(bitblock128_t arg1)
808{
809        return ((sh == 0) ? arg1 : ((bitblock128_t)vshrq_n_u16((uint16x8_t)(arg1), (int32_t)(sh))));
810}
811
812//The total number of operations is 1
813template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::srli(bitblock128_t arg1)
814{
815        return ((sh == 0) ? arg1 : ((bitblock128_t)vshrq_n_u32((uint32x4_t)(arg1), (int32_t)(sh))));
816}
817
818//The total number of operations is 1
819template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srli(bitblock128_t arg1)
820{
821        return ((sh == 0) ? arg1 : ((bitblock128_t)vshrq_n_u64((uint64x2_t)(arg1), (int32_t)(sh))));
822}
823
824//The total number of operations is 5
825template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srli(bitblock128_t arg1)
826{
827        return ((sh == 64) ? neon_shift_right_64_bits(arg1) : ((sh > 64) ? simd128<64>::srli<(sh-64)>(neon_shift_right_64_bits(arg1)) : simd_or(neon_shift_right_64_bits(simd128<64>::slli<(64-sh)>(arg1)), simd128<64>::srli<sh>(arg1))));
828}
829
830//The total number of operations is 1
831template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ctz(bitblock128_t arg1)
832{
833        return simd_not(arg1);
834}
835
836//The total number of operations is 14
837template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ctz(bitblock128_t arg1)
838{
839        bitblock128_t tmp = simd_not(arg1);
840        return simd128<1>::ifh(simd128<2>::himask(), simd_and(tmp, simd128<128>::slli<1>(tmp)), simd_and(simd128<128>::srli<1>(arg1), tmp));
841}
842
843//The total number of operations is 12
844template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ctz(bitblock128_t arg1)
845{
846        return simd128<4>::popcount(simd_andc(simd128<4>::sub(arg1, simd128<4>::constant<1>()), arg1));
847}
848
849//The total number of operations is 3
850template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ctz(bitblock128_t arg1)
851{
852        return simd128<8>::popcount(simd_andc(simd128<8>::sub(arg1, simd128<8>::constant<1>()), arg1));
853}
854
855//The total number of operations is 6
856template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ctz(bitblock128_t arg1)
857{
858        return simd128<16>::popcount(simd_andc(simd128<16>::sub(arg1, simd128<16>::constant<1>()), arg1));
859}
860
861//The total number of operations is 9
862template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ctz(bitblock128_t arg1)
863{
864        return simd128<32>::popcount(simd_andc(simd128<32>::sub(arg1, simd128<32>::constant<1>()), arg1));
865}
866
867//The total number of operations is 12
868template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ctz(bitblock128_t arg1)
869{
870        return simd128<64>::popcount(simd_andc(simd128<64>::sub(arg1, simd128<64>::constant<1>()), arg1));
871}
872
873//The total number of operations is 30
874template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ctz(bitblock128_t arg1)
875{
876        return simd128<128>::popcount(simd_andc(simd128<128>::sub(arg1, simd128<128>::constant<1>()), arg1));
877}
878
879//The total number of operations is 1
880template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2)
881{
882        return simd_andc(arg1, arg2);
883}
884
885//The total number of operations is 14
886template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ugt(bitblock128_t arg1, bitblock128_t arg2)
887{
888        bitblock128_t tmpAns = simd128<(1)>::ugt(arg1, arg2);
889        bitblock128_t mask = simd_and(tmpAns, simd128<2>::srli<(1)>(simd128<(1)>::eq(arg1, arg2)));
890        mask = simd_or(mask, simd128<2>::slli<(1)>(mask));
891        return simd_or(simd128<2>::srai<(1)>(tmpAns), mask);
892}
893
894//The total number of operations is 8
895template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2)
896{
897        bitblock128_t high_bit = simd128<4>::constant<(8)>();
898        return simd128<4>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
899}
900
901//The total number of operations is 3
902template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ugt(bitblock128_t arg1, bitblock128_t arg2)
903{
904        bitblock128_t high_bit = simd128<8>::constant<(128)>();
905        return simd128<8>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
906}
907
908//The total number of operations is 3
909template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ugt(bitblock128_t arg1, bitblock128_t arg2)
910{
911        bitblock128_t high_bit = simd128<16>::constant<(32768)>();
912        return simd128<16>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
913}
914
915//The total number of operations is 3
916template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ugt(bitblock128_t arg1, bitblock128_t arg2)
917{
918        bitblock128_t high_bit = simd128<32>::constant<(2147483648ULL)>();
919        return simd128<32>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
920}
921
922//The total number of operations is 10
923template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ugt(bitblock128_t arg1, bitblock128_t arg2)
924{
925        bitblock128_t tmpAns = simd128<(32)>::ugt(arg1, arg2);
926        bitblock128_t mask = simd_and(tmpAns, simd128<64>::srli<(32)>(simd128<(32)>::eq(arg1, arg2)));
927        mask = simd_or(mask, simd128<64>::slli<(32)>(mask));
928        return simd_or(simd128<64>::srai<(32)>(tmpAns), mask);
929}
930
931//The total number of operations is 37
932template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ugt(bitblock128_t arg1, bitblock128_t arg2)
933{
934        bitblock128_t tmpAns = simd128<(64)>::ugt(arg1, arg2);
935        bitblock128_t mask = simd_and(tmpAns, simd128<128>::srli<(64)>(simd128<(64)>::eq(arg1, arg2)));
936        mask = simd_or(mask, simd128<128>::slli<(64)>(mask));
937        return simd_or(simd128<128>::srai<(64)>(tmpAns), mask);
938}
939
940//The total number of operations is 4
941template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::xor_hl(bitblock128_t arg1)
942{
943        return simd_xor(simd128<2>::srli<(1)>(arg1), simd_and(arg1, simd128<2>::lomask()));
944}
945
946//The total number of operations is 4
947template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::xor_hl(bitblock128_t arg1)
948{
949        return simd_xor(simd128<4>::srli<(2)>(arg1), simd_and(arg1, simd128<4>::lomask()));
950}
951
952//The total number of operations is 3
953template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::xor_hl(bitblock128_t arg1)
954{
955        return simd_xor(simd128<8>::srli<(4)>(arg1), simd_and(arg1, simd128<8>::lomask()));
956}
957
958//The total number of operations is 3
959template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::xor_hl(bitblock128_t arg1)
960{
961        return simd_xor(simd128<16>::srli<(8)>(arg1), simd_and(arg1, simd128<16>::lomask()));
962}
963
964//The total number of operations is 3
965template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::xor_hl(bitblock128_t arg1)
966{
967        return simd_xor(simd128<32>::srli<(16)>(arg1), simd_and(arg1, simd128<32>::lomask()));
968}
969
970//The total number of operations is 3
971template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::xor_hl(bitblock128_t arg1)
972{
973        return simd_xor(simd128<64>::srli<(32)>(arg1), simd_and(arg1, simd128<64>::lomask()));
974}
975
976//The total number of operations is 7
977template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::xor_hl(bitblock128_t arg1)
978{
979        return simd_xor(simd128<128>::srli<(64)>(arg1), simd_and(arg1, simd128<128>::lomask()));
980}
981
982//The total number of operations is 0
983template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::popcount(bitblock128_t arg1)
984{
985        return arg1;
986}
987
988//The total number of operations is 3
989template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::popcount(bitblock128_t arg1)
990{
991        return simd128<2>::add_hl(simd128<(1)>::popcount(arg1));
992}
993
994//The total number of operations is 7
995template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::popcount(bitblock128_t arg1)
996{
997        return simd128<4>::add_hl(simd128<(2)>::popcount(arg1));
998}
999
1000//The total number of operations is 1
1001template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::popcount(bitblock128_t arg1)
1002{
1003        return (bitblock128_t)vcntq_u8((uint8x16_t)(arg1));
1004}
1005
1006//The total number of operations is 4
1007template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::popcount(bitblock128_t arg1)
1008{
1009        return simd128<16>::add_hl(simd128<(8)>::popcount(arg1));
1010}
1011
1012//The total number of operations is 7
1013template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::popcount(bitblock128_t arg1)
1014{
1015        return simd128<32>::add_hl(simd128<(16)>::popcount(arg1));
1016}
1017
1018//The total number of operations is 10
1019template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::popcount(bitblock128_t arg1)
1020{
1021        return simd128<64>::add_hl(simd128<(32)>::popcount(arg1));
1022}
1023
1024//The total number of operations is 17
1025template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::popcount(bitblock128_t arg1)
1026{
1027        bitblock128_t tmpAns = simd128<(64)>::popcount(arg1);
1028        return simd128<(64)>::add(simd_and(tmpAns, simd128<128>::lomask()), simd128<128>::srli<(64)>(tmpAns));
1029}
1030
1031//The total number of operations is 7
1032template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::neg(bitblock128_t arg1)
1033{
1034        return simd128<1>::ifh(simd128<2>::himask(), simd_xor(arg1, simd128<128>::slli<1>(arg1)), arg1);
1035}
1036
1037//The total number of operations is 4
1038template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::neg(bitblock128_t arg1)
1039{
1040        return simd128<4>::sub(simd128<4>::constant<0>(), arg1);
1041}
1042
1043//The total number of operations is 1
1044template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::neg(bitblock128_t arg1)
1045{
1046        return (bitblock128_t)vnegq_s8((int8x16_t)(arg1));
1047}
1048
1049//The total number of operations is 1
1050template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::neg(bitblock128_t arg1)
1051{
1052        return (bitblock128_t)vnegq_s16((int16x8_t)(arg1));
1053}
1054
1055//The total number of operations is 1
1056template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::neg(bitblock128_t arg1)
1057{
1058        return (bitblock128_t)vnegq_s32((int32x4_t)(arg1));
1059}
1060
1061//The total number of operations is 1
1062template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::neg(bitblock128_t arg1)
1063{
1064        return simd128<64>::sub(simd128<64>::constant<0>(), arg1);
1065}
1066
1067//The total number of operations is 12
1068template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::neg(bitblock128_t arg1)
1069{
1070        return simd128<128>::sub(simd128<128>::constant<0>(), arg1);
1071}
1072
1073//The total number of operations is 2
1074template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::slli(bitblock128_t arg1)
1075{
1076        return simd_and(simd128<32>::slli<sh>(arg1), simd128<2>::constant<(((3)<<sh)&(3))>());
1077}
1078
1079//The total number of operations is 2
1080template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::slli(bitblock128_t arg1)
1081{
1082        return simd_and(simd128<32>::slli<sh>(arg1), simd128<4>::constant<(((15)<<sh)&(15))>());
1083}
1084
1085//The total number of operations is 1
1086template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::slli(bitblock128_t arg1)
1087{
1088        return ((sh == 8) ? simd128<32>::constant<0>() : ((bitblock128_t)vshlq_n_u8((uint8x16_t)(arg1), (int32_t)(sh))));
1089}
1090
1091//The total number of operations is 1
1092template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::slli(bitblock128_t arg1)
1093{
1094        return ((sh == 16) ? simd128<32>::constant<0>() : ((bitblock128_t)vshlq_n_u16((uint16x8_t)(arg1), (int32_t)(sh))));
1095}
1096
1097//The total number of operations is 1
1098template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::slli(bitblock128_t arg1)
1099{
1100        return ((sh == 32) ? simd128<32>::constant<0>() : ((bitblock128_t)vshlq_n_u32((uint32x4_t)(arg1), (int32_t)(sh))));
1101}
1102
1103//The total number of operations is 1
1104template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::slli(bitblock128_t arg1)
1105{
1106        return ((sh == 64) ? simd128<32>::constant<0>() : ((bitblock128_t)vshlq_n_u64((uint64x2_t)(arg1), (int32_t)(sh))));
1107}
1108
1109//The total number of operations is 5
1110template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::slli(bitblock128_t arg1)
1111{
1112        return ((sh == 128) ? simd128<32>::constant<0>() : ((sh >= 64) ? simd128<64>::slli<(sh-64)>(neon_shift_left_64_bits(arg1)) : simd_or(neon_shift_left_64_bits(simd128<64>::srli<(64-sh)>(arg1)), simd128<64>::slli<sh>(arg1))));
1113}
1114
1115//The total number of operations is 1
1116template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1117{
1118        return vbslq_u64(arg1, arg2, arg3);
1119}
1120
1121//The total number of operations is 4
1122template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1123{
1124        return simd128<(1)>::ifh(simd128<1>::ifh(simd128<2>::himask(), arg1, simd128<2>::srli<(1)>(arg1)), arg2, arg3);
1125}
1126
1127//The total number of operations is 7
1128template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1129{
1130        return simd128<1>::ifh(simd128<4>::gt(simd128<4>::constant<0>(), arg1), arg2, arg3);
1131}
1132
1133//The total number of operations is 2
1134template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1135{
1136        return simd128<1>::ifh(simd128<8>::gt(simd128<8>::constant<0>(), arg1), arg2, arg3);
1137}
1138
1139//The total number of operations is 2
1140template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1141{
1142        return simd128<1>::ifh(simd128<16>::gt(simd128<16>::constant<0>(), arg1), arg2, arg3);
1143}
1144
1145//The total number of operations is 2
1146template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1147{
1148        return simd128<1>::ifh(simd128<32>::gt(simd128<32>::constant<0>(), arg1), arg2, arg3);
1149}
1150
1151//The total number of operations is 4
1152template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1153{
1154        return simd128<(32)>::ifh(simd128<1>::ifh(simd128<64>::himask(), arg1, simd128<64>::srli<(32)>(arg1)), arg2, arg3);
1155}
1156
1157//The total number of operations is 10
1158template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1159{
1160        return simd128<(64)>::ifh(simd128<1>::ifh(simd128<128>::himask(), arg1, simd128<128>::srli<(64)>(arg1)), arg2, arg3);
1161}
1162
1163//The total number of operations is 1
1164template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::sub(bitblock128_t arg1, bitblock128_t arg2)
1165{
1166        return simd_xor(arg1, arg2);
1167}
1168
1169//The total number of operations is 10
1170template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::sub(bitblock128_t arg1, bitblock128_t arg2)
1171{
1172        return simd128<1>::ifh(simd128<(4)>::himask(), simd128<(4)>::sub(arg1, simd_and(simd128<(4)>::himask(), arg2)), simd128<(4)>::sub(arg1, arg2));
1173}
1174
1175//The total number of operations is 4
1176template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::sub(bitblock128_t arg1, bitblock128_t arg2)
1177{
1178        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::sub(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::sub(arg1, arg2));
1179}
1180
1181//The total number of operations is 1
1182template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::sub(bitblock128_t arg1, bitblock128_t arg2)
1183{
1184        return (bitblock128_t)vsubq_u8((uint8x16_t)(arg1), (uint8x16_t)(arg2));
1185}
1186
1187//The total number of operations is 1
1188template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::sub(bitblock128_t arg1, bitblock128_t arg2)
1189{
1190        return (bitblock128_t)vsubq_u16((uint16x8_t)(arg1), (uint16x8_t)(arg2));
1191}
1192
1193//The total number of operations is 1
1194template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::sub(bitblock128_t arg1, bitblock128_t arg2)
1195{
1196        return (bitblock128_t)vsubq_u32((uint32x4_t)(arg1), (uint32x4_t)(arg2));
1197}
1198
1199//The total number of operations is 1
1200template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::sub(bitblock128_t arg1, bitblock128_t arg2)
1201{
1202        return (bitblock128_t)vsubq_u64((uint64x2_t)(arg1), (uint64x2_t)(arg2));
1203}
1204
1205//The total number of operations is 12
1206template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sub(bitblock128_t arg1, bitblock128_t arg2)
1207{
1208        bitblock128_t partial = simd128<(64)>::sub(arg1, arg2);
1209        bitblock128_t borrowMask = simd_or(simd_andc(arg2, arg1), simd_andc(partial, simd_xor(arg1, arg2)));
1210        bitblock128_t borrow = simd128<128>::slli<(64)>(simd128<(64)>::srli<(63)>(borrowMask));
1211        return simd128<(64)>::sub(partial, borrow);
1212}
1213
1214//The total number of operations is 3
1215template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::add_hl(bitblock128_t arg1)
1216{
1217        return simd128<16>::sub(arg1, simd_and(simd128<2>::lomask(), simd128<16>::srli<1>(arg1)));
1218}
1219
1220//The total number of operations is 4
1221template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::add_hl(bitblock128_t arg1)
1222{
1223        return simd128<(8)>::add(simd128<4>::srli<(2)>(arg1), simd_and(arg1, simd128<4>::lomask()));
1224}
1225
1226//The total number of operations is 3
1227template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::add_hl(bitblock128_t arg1)
1228{
1229        return simd128<(16)>::add(simd128<8>::srli<(4)>(arg1), simd_and(arg1, simd128<8>::lomask()));
1230}
1231
1232//The total number of operations is 3
1233template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::add_hl(bitblock128_t arg1)
1234{
1235        return simd128<(32)>::add(simd128<16>::srli<(8)>(arg1), simd_and(arg1, simd128<16>::lomask()));
1236}
1237
1238//The total number of operations is 3
1239template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::add_hl(bitblock128_t arg1)
1240{
1241        return simd128<(64)>::add(simd128<32>::srli<(16)>(arg1), simd_and(arg1, simd128<32>::lomask()));
1242}
1243
1244//The total number of operations is 3
1245template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::add_hl(bitblock128_t arg1)
1246{
1247        return simd128<64>::add(simd128<64>::srli<(32)>(arg1), simd_and(arg1, simd128<64>::lomask()));
1248}
1249
1250//The total number of operations is 18
1251template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::add_hl(bitblock128_t arg1)
1252{
1253        return simd128<128>::add(simd128<128>::srli<(64)>(arg1), simd_and(arg1, simd128<128>::lomask()));
1254}
1255
1256//The total number of operations is 0
1257template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::constant()
1258{
1259        return simd128<32>::constant<(-1*val)>();
1260}
1261
1262//The total number of operations is 0
1263template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::constant()
1264{
1265        return ((val < 0) ? simd128<(4)>::constant<((val<<2)|(val^(-4)))>() : simd128<(4)>::constant<((val<<2)|val)>());
1266}
1267
1268//The total number of operations is 0
1269template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::constant()
1270{
1271        return ((val < 0) ? simd128<(8)>::constant<((val<<4)|(val^(-16)))>() : simd128<(8)>::constant<((val<<4)|val)>());
1272}
1273
1274//The total number of operations is 0
1275template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::constant()
1276{
1277        return (bitblock128_t)vdupq_n_u8((uint8_t)(val));
1278}
1279
1280//The total number of operations is 0
1281template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::constant()
1282{
1283        return (bitblock128_t)vdupq_n_u16((uint16_t)(val));
1284}
1285
1286//The total number of operations is 0
1287template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::constant()
1288{
1289        return (bitblock128_t)vdupq_n_u32((uint32_t)(val));
1290}
1291
1292//The total number of operations is 0
1293template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::constant()
1294{
1295        return (bitblock128_t)vdupq_n_u64((uint64_t)(val));
1296}
1297
1298//The total number of operations is 0
1299template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::constant()
1300{
1301        return vsetq_lane_u64((uint64_t)(0), simd128<64>::constant<val>(), (int32_t)(1));
1302}
1303
1304//The total number of operations is 1
1305template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::min(bitblock128_t arg1, bitblock128_t arg2)
1306{
1307        return simd_or(arg1, arg2);
1308}
1309
1310//The total number of operations is 13
1311template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::min(bitblock128_t arg1, bitblock128_t arg2)
1312{
1313        bitblock128_t hiAns = simd128<(1)>::min(arg1, arg2);
1314        bitblock128_t loAns = simd128<(1)>::umin(arg1, arg2);
1315        bitblock128_t eqMask1 = simd128<2>::srli<(1)>(simd128<(1)>::eq(hiAns, arg1));
1316        bitblock128_t eqMask2 = simd128<2>::srli<(1)>(simd128<(1)>::eq(hiAns, arg2));
1317        return simd128<1>::ifh(simd128<2>::himask(), hiAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, loAns, arg1), arg2));
1318}
1319
1320//The total number of operations is 7
1321template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::min(bitblock128_t arg1, bitblock128_t arg2)
1322{
1323        return simd128<1>::ifh(simd128<4>::gt(arg1, arg2), arg2, arg1);
1324}
1325
1326//The total number of operations is 1
1327template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::min(bitblock128_t arg1, bitblock128_t arg2)
1328{
1329        return (bitblock128_t)vminq_s8((int8x16_t)(arg1), (int8x16_t)(arg2));
1330}
1331
1332//The total number of operations is 1
1333template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::min(bitblock128_t arg1, bitblock128_t arg2)
1334{
1335        return (bitblock128_t)vminq_s16((int16x8_t)(arg1), (int16x8_t)(arg2));
1336}
1337
1338//The total number of operations is 1
1339template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::min(bitblock128_t arg1, bitblock128_t arg2)
1340{
1341        return (bitblock128_t)vminq_s32((int32x4_t)(arg1), (int32x4_t)(arg2));
1342}
1343
1344//The total number of operations is 12
1345template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::min(bitblock128_t arg1, bitblock128_t arg2)
1346{
1347        bitblock128_t hiAns = simd128<(32)>::min(arg1, arg2);
1348        bitblock128_t loAns = simd128<(32)>::umin(arg1, arg2);
1349        bitblock128_t eqMask1 = simd128<64>::srli<(32)>(simd128<(32)>::eq(hiAns, arg1));
1350        bitblock128_t eqMask2 = simd128<64>::srli<(32)>(simd128<(32)>::eq(hiAns, arg2));
1351        return simd128<1>::ifh(simd128<64>::himask(), hiAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, loAns, arg1), arg2));
1352}
1353
1354//The total number of operations is 46
1355template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::min(bitblock128_t arg1, bitblock128_t arg2)
1356{
1357        bitblock128_t hiAns = simd128<(64)>::min(arg1, arg2);
1358        bitblock128_t loAns = simd128<(64)>::umin(arg1, arg2);
1359        bitblock128_t eqMask1 = simd128<128>::srli<(64)>(simd128<(64)>::eq(hiAns, arg1));
1360        bitblock128_t eqMask2 = simd128<128>::srli<(64)>(simd128<(64)>::eq(hiAns, arg2));
1361        return simd128<1>::ifh(simd128<128>::himask(), hiAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, loAns, arg1), arg2));
1362}
1363
1364//The total number of operations is 0
1365template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::lomask()
1366{
1367        return simd128<2>::constant<(1)>();
1368}
1369
1370//The total number of operations is 0
1371template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::lomask()
1372{
1373        return simd128<4>::constant<(3)>();
1374}
1375
1376//The total number of operations is 0
1377template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::lomask()
1378{
1379        return simd128<8>::constant<(15)>();
1380}
1381
1382//The total number of operations is 0
1383template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::lomask()
1384{
1385        return simd128<16>::constant<(255)>();
1386}
1387
1388//The total number of operations is 0
1389template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::lomask()
1390{
1391        return simd128<32>::constant<(65535)>();
1392}
1393
1394//The total number of operations is 0
1395template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::lomask()
1396{
1397        return simd128<64>::constant<4294967295ULL>();
1398}
1399
1400//The total number of operations is 0
1401template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::lomask()
1402{
1403        return vsetq_lane_u64((uint64_t)(-1), simd128<64>::constant<0>(), (int32_t)(0));
1404}
1405
1406//The total number of operations is 1
1407template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umin(bitblock128_t arg1, bitblock128_t arg2)
1408{
1409        return simd_and(arg1, arg2);
1410}
1411
1412//The total number of operations is 12
1413template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umin(bitblock128_t arg1, bitblock128_t arg2)
1414{
1415        bitblock128_t tmpAns = simd128<(1)>::umin(arg1, arg2);
1416        bitblock128_t eqMask1 = simd128<2>::srli<(1)>(simd128<(1)>::eq(tmpAns, arg1));
1417        bitblock128_t eqMask2 = simd128<2>::srli<(1)>(simd128<(1)>::eq(tmpAns, arg2));
1418        return simd128<1>::ifh(simd128<2>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1419}
1420
1421//The total number of operations is 10
1422template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umin(bitblock128_t arg1, bitblock128_t arg2)
1423{
1424        bitblock128_t high_bit = simd128<4>::constant<(8)>();
1425        return simd_xor(simd128<4>::min(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1426}
1427
1428//The total number of operations is 4
1429template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umin(bitblock128_t arg1, bitblock128_t arg2)
1430{
1431        bitblock128_t high_bit = simd128<8>::constant<(128)>();
1432        return simd_xor(simd128<8>::min(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1433}
1434
1435//The total number of operations is 4
1436template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umin(bitblock128_t arg1, bitblock128_t arg2)
1437{
1438        bitblock128_t high_bit = simd128<16>::constant<(32768)>();
1439        return simd_xor(simd128<16>::min(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1440}
1441
1442//The total number of operations is 4
1443template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umin(bitblock128_t arg1, bitblock128_t arg2)
1444{
1445        bitblock128_t high_bit = simd128<32>::constant<(2147483648ULL)>();
1446        return simd_xor(simd128<32>::min(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1447}
1448
1449//The total number of operations is 11
1450template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umin(bitblock128_t arg1, bitblock128_t arg2)
1451{
1452        bitblock128_t tmpAns = simd128<(32)>::umin(arg1, arg2);
1453        bitblock128_t eqMask1 = simd128<64>::srli<(32)>(simd128<(32)>::eq(tmpAns, arg1));
1454        bitblock128_t eqMask2 = simd128<64>::srli<(32)>(simd128<(32)>::eq(tmpAns, arg2));
1455        return simd128<1>::ifh(simd128<64>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1456}
1457
1458//The total number of operations is 34
1459template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::umin(bitblock128_t arg1, bitblock128_t arg2)
1460{
1461        bitblock128_t tmpAns = simd128<(64)>::umin(arg1, arg2);
1462        bitblock128_t eqMask1 = simd128<128>::srli<(64)>(simd128<(64)>::eq(tmpAns, arg1));
1463        bitblock128_t eqMask2 = simd128<128>::srli<(64)>(simd128<(64)>::eq(tmpAns, arg2));
1464        return simd128<1>::ifh(simd128<128>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1465}
1466
1467//The total number of operations is 8
1468template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::abs(bitblock128_t arg1)
1469{
1470        return simd128<1>::ifh(simd128<2>::himask(), simd_and(arg1, simd128<128>::slli<1>(simd_not(arg1))), arg1);
1471}
1472
1473//The total number of operations is 11
1474template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::abs(bitblock128_t arg1)
1475{
1476        bitblock128_t gtMask = simd128<4>::gt(arg1, simd128<4>::constant<0>());
1477        return simd128<1>::ifh(gtMask, arg1, simd128<4>::sub(gtMask, arg1));
1478}
1479
1480//The total number of operations is 1
1481template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::abs(bitblock128_t arg1)
1482{
1483        return (bitblock128_t)vabsq_s8((int8x16_t)(arg1));
1484}
1485
1486//The total number of operations is 1
1487template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::abs(bitblock128_t arg1)
1488{
1489        return (bitblock128_t)vabsq_s16((int16x8_t)(arg1));
1490}
1491
1492//The total number of operations is 1
1493template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::abs(bitblock128_t arg1)
1494{
1495        return (bitblock128_t)vabsq_s32((int32x4_t)(arg1));
1496}
1497
1498//The total number of operations is 9
1499template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::abs(bitblock128_t arg1)
1500{
1501        bitblock128_t eqMask = simd128<64>::eq(simd128<1>::ifh(simd128<64>::himask(), simd128<(32)>::abs(arg1), arg1), arg1);
1502        return simd128<1>::ifh(eqMask, arg1, simd128<64>::sub(eqMask, arg1));
1503}
1504
1505//The total number of operations is 40
1506template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::abs(bitblock128_t arg1)
1507{
1508        bitblock128_t eqMask = simd128<128>::eq(simd128<1>::ifh(simd128<128>::himask(), simd128<(64)>::abs(arg1), arg1), arg1);
1509        return simd128<1>::ifh(eqMask, arg1, simd128<128>::sub(eqMask, arg1));
1510}
1511
1512//The total number of operations is 2
1513template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::eq(bitblock128_t arg1, bitblock128_t arg2)
1514{
1515        return simd_not(simd_xor(arg1, arg2));
1516}
1517
1518//The total number of operations is 8
1519template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::eq(bitblock128_t arg1, bitblock128_t arg2)
1520{
1521        bitblock128_t tmpAns = simd128<(1)>::eq(arg1, arg2);
1522        bitblock128_t loMask = simd_and(tmpAns, simd128<2>::srli<(1)>(tmpAns));
1523        bitblock128_t hiMask = simd128<2>::slli<(1)>(loMask);
1524        return simd_or(loMask, hiMask);
1525}
1526
1527//The total number of operations is 9
1528template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::eq(bitblock128_t arg1, bitblock128_t arg2)
1529{
1530        return simd_or(simd_and(simd128<(8)>::himask(), simd128<(8)>::eq(simd_and(simd128<(8)>::himask(), arg1), simd_and(simd128<(8)>::himask(), arg2))), simd_and(simd128<(8)>::lomask(), simd128<(8)>::eq(simd_and(simd128<(8)>::lomask(), arg1), simd_and(simd128<(8)>::lomask(), arg2))));
1531}
1532
1533//The total number of operations is 1
1534template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::eq(bitblock128_t arg1, bitblock128_t arg2)
1535{
1536        return (bitblock128_t)vceqq_u8((uint8x16_t)(arg1), (uint8x16_t)(arg2));
1537}
1538
1539//The total number of operations is 1
1540template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::eq(bitblock128_t arg1, bitblock128_t arg2)
1541{
1542        return (bitblock128_t)vceqq_u16((uint16x8_t)(arg1), (uint16x8_t)(arg2));
1543}
1544
1545//The total number of operations is 1
1546template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::eq(bitblock128_t arg1, bitblock128_t arg2)
1547{
1548        return (bitblock128_t)vceqq_u32((uint32x4_t)(arg1), (uint32x4_t)(arg2));
1549}
1550
1551//The total number of operations is 5
1552template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::eq(bitblock128_t arg1, bitblock128_t arg2)
1553{
1554        bitblock128_t tmpAns = simd128<(32)>::eq(arg1, arg2);
1555        bitblock128_t loMask = simd_and(tmpAns, simd128<64>::srli<(32)>(tmpAns));
1556        bitblock128_t hiMask = simd128<64>::slli<(32)>(loMask);
1557        return simd_or(loMask, hiMask);
1558}
1559
1560//The total number of operations is 17
1561template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::eq(bitblock128_t arg1, bitblock128_t arg2)
1562{
1563        bitblock128_t tmpAns = simd128<(64)>::eq(arg1, arg2);
1564        bitblock128_t loMask = simd_and(tmpAns, simd128<128>::srli<(64)>(tmpAns));
1565        bitblock128_t hiMask = simd128<128>::slli<(64)>(loMask);
1566        return simd_or(loMask, hiMask);
1567}
1568
1569//The total number of operations is 4
1570template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::srai(bitblock128_t arg1)
1571{
1572        return ((sh == 0) ? arg1 : simd_or(simd_and(simd128<2>::himask(), arg1), simd128<2>::srli<1>(arg1)));
1573}
1574
1575//The total number of operations is 8
1576template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::srai(bitblock128_t arg1)
1577{
1578        bitblock128_t tmp = simd128<4>::srli<((sh >= 4) ? (3) : ((sh < 0) ? 0 : sh))>(arg1);
1579        return simd_or(tmp, simd128<4>::sub(simd128<4>::constant<0>(), simd_and(simd128<4>::constant<(1<<((4-((sh >= 4) ? (3) : ((sh < 0) ? 0 : sh)))-1))>(), tmp)));
1580}
1581
1582//The total number of operations is 1
1583template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::srai(bitblock128_t arg1)
1584{
1585        return ((sh == 0) ? arg1 : ((bitblock128_t)vshrq_n_s8((int8x16_t)(arg1), (int32_t)(sh))));
1586}
1587
1588//The total number of operations is 1
1589template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::srai(bitblock128_t arg1)
1590{
1591        return ((sh == 0) ? arg1 : ((bitblock128_t)vshrq_n_s16((int16x8_t)(arg1), (int32_t)(sh))));
1592}
1593
1594//The total number of operations is 1
1595template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::srai(bitblock128_t arg1)
1596{
1597        return ((sh == 0) ? arg1 : ((bitblock128_t)vshrq_n_s32((int32x4_t)(arg1), (int32_t)(sh))));
1598}
1599
1600//The total number of operations is 1
1601template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srai(bitblock128_t arg1)
1602{
1603        return ((sh == 0) ? arg1 : ((bitblock128_t)vshrq_n_s64((int64x2_t)(arg1), (int32_t)(sh))));
1604}
1605
1606//The total number of operations is 9
1607template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srai(bitblock128_t arg1)
1608{
1609        return simd_or(simd_and(simd128<128>::himask(), simd128<(64)>::srai<((sh < (64)) ? sh : (64))>(arg1)), ((sh <= (64)) ? simd128<128>::srli<sh>(arg1) : simd128<(64)>::srai<(sh-(64))>(simd128<128>::srli<(64)>(arg1))));
1610}
1611
1612//The total number of operations is 0
1613template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::himask()
1614{
1615        return simd128<2>::constant<(2)>();
1616}
1617
1618//The total number of operations is 0
1619template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::himask()
1620{
1621        return simd128<4>::constant<(12)>();
1622}
1623
1624//The total number of operations is 0
1625template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::himask()
1626{
1627        return simd128<8>::constant<(240)>();
1628}
1629
1630//The total number of operations is 0
1631template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::himask()
1632{
1633        return simd128<16>::constant<(65280)>();
1634}
1635
1636//The total number of operations is 0
1637template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::himask()
1638{
1639        return simd128<32>::constant<-65536>();
1640}
1641
1642//The total number of operations is 0
1643template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::himask()
1644{
1645        return simd128<64>::constant<18446744069414584320ULL>();
1646}
1647
1648//The total number of operations is 0
1649template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::himask()
1650{
1651        return vsetq_lane_u64((uint64_t)(-1), simd128<64>::constant<0>(), (int32_t)(1));
1652}
1653
1654//The total number of operations is 1
1655template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::add(bitblock128_t arg1, bitblock128_t arg2)
1656{
1657        return simd_xor(arg1, arg2);
1658}
1659
1660//The total number of operations is 9
1661template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::add(bitblock128_t arg1, bitblock128_t arg2)
1662{
1663        bitblock128_t tmp = simd_xor(arg1, arg2);
1664        return simd128<1>::ifh(simd128<2>::himask(), simd_xor(tmp, simd128<128>::slli<1>(simd_and(arg1, arg2))), tmp);
1665}
1666
1667//The total number of operations is 4
1668template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::add(bitblock128_t arg1, bitblock128_t arg2)
1669{
1670        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::add(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::add(arg1, arg2));
1671}
1672
1673//The total number of operations is 1
1674template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::add(bitblock128_t arg1, bitblock128_t arg2)
1675{
1676        return (bitblock128_t)vaddq_u8((uint8x16_t)(arg1), (uint8x16_t)(arg2));
1677}
1678
1679//The total number of operations is 1
1680template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::add(bitblock128_t arg1, bitblock128_t arg2)
1681{
1682        return (bitblock128_t)vaddq_u16((uint16x8_t)(arg1), (uint16x8_t)(arg2));
1683}
1684
1685//The total number of operations is 1
1686template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::add(bitblock128_t arg1, bitblock128_t arg2)
1687{
1688        return (bitblock128_t)vaddq_u32((uint32x4_t)(arg1), (uint32x4_t)(arg2));
1689}
1690
1691//The total number of operations is 1
1692template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::add(bitblock128_t arg1, bitblock128_t arg2)
1693{
1694        return (bitblock128_t)vaddq_u64((uint64x2_t)(arg1), (uint64x2_t)(arg2));
1695}
1696
1697//The total number of operations is 12
1698template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::add(bitblock128_t arg1, bitblock128_t arg2)
1699{
1700        bitblock128_t partial = simd128<(64)>::add(arg1, arg2);
1701        bitblock128_t carryMask = simd_or(simd_and(arg1, arg2), simd_andc(simd_xor(arg1, arg2), partial));
1702        bitblock128_t carry = simd128<128>::slli<(64)>(simd128<(64)>::srli<(63)>(carryMask));
1703        return simd128<(64)>::add(partial, carry);
1704}
1705
1706//The total number of operations is 1
1707template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umax(bitblock128_t arg1, bitblock128_t arg2)
1708{
1709        return simd_or(arg1, arg2);
1710}
1711
1712//The total number of operations is 12
1713template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umax(bitblock128_t arg1, bitblock128_t arg2)
1714{
1715        bitblock128_t tmpAns = simd128<(1)>::umax(arg1, arg2);
1716        bitblock128_t eqMask1 = simd128<2>::srli<(1)>(simd128<(1)>::eq(tmpAns, arg1));
1717        bitblock128_t eqMask2 = simd128<2>::srli<(1)>(simd128<(1)>::eq(tmpAns, arg2));
1718        return simd128<1>::ifh(simd128<2>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1719}
1720
1721//The total number of operations is 10
1722template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umax(bitblock128_t arg1, bitblock128_t arg2)
1723{
1724        bitblock128_t high_bit = simd128<4>::constant<(8)>();
1725        return simd_xor(simd128<4>::max(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1726}
1727
1728//The total number of operations is 4
1729template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umax(bitblock128_t arg1, bitblock128_t arg2)
1730{
1731        bitblock128_t high_bit = simd128<8>::constant<(128)>();
1732        return simd_xor(simd128<8>::max(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1733}
1734
1735//The total number of operations is 4
1736template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umax(bitblock128_t arg1, bitblock128_t arg2)
1737{
1738        bitblock128_t high_bit = simd128<16>::constant<(32768)>();
1739        return simd_xor(simd128<16>::max(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1740}
1741
1742//The total number of operations is 4
1743template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umax(bitblock128_t arg1, bitblock128_t arg2)
1744{
1745        bitblock128_t high_bit = simd128<32>::constant<(2147483648ULL)>();
1746        return simd_xor(simd128<32>::max(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1747}
1748
1749//The total number of operations is 11
1750template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umax(bitblock128_t arg1, bitblock128_t arg2)
1751{
1752        bitblock128_t tmpAns = simd128<(32)>::umax(arg1, arg2);
1753        bitblock128_t eqMask1 = simd128<64>::srli<(32)>(simd128<(32)>::eq(tmpAns, arg1));
1754        bitblock128_t eqMask2 = simd128<64>::srli<(32)>(simd128<(32)>::eq(tmpAns, arg2));
1755        return simd128<1>::ifh(simd128<64>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1756}
1757
1758//The total number of operations is 34
1759template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::umax(bitblock128_t arg1, bitblock128_t arg2)
1760{
1761        bitblock128_t tmpAns = simd128<(64)>::umax(arg1, arg2);
1762        bitblock128_t eqMask1 = simd128<128>::srli<(64)>(simd128<(64)>::eq(tmpAns, arg1));
1763        bitblock128_t eqMask2 = simd128<128>::srli<(64)>(simd128<(64)>::eq(tmpAns, arg2));
1764        return simd128<1>::ifh(simd128<128>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1765}
1766
1767//The total number of operations is 77
1768template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1769{
1770        return simd128<(1)>::umin(hsimd128<2>::packh(arg1, arg2), hsimd128<2>::packl(arg1, arg2));
1771}
1772
1773//The total number of operations is 64
1774template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1775{
1776        return simd128<(2)>::umin(hsimd128<4>::packh(arg1, arg2), hsimd128<4>::packl(arg1, arg2));
1777}
1778
1779//The total number of operations is 38
1780template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1781{
1782        return simd128<(4)>::umin(hsimd128<8>::packh(arg1, arg2), hsimd128<8>::packl(arg1, arg2));
1783}
1784
1785//The total number of operations is 6
1786template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1787{
1788        return simd128<(8)>::umin(hsimd128<16>::packh(arg1, arg2), hsimd128<16>::packl(arg1, arg2));
1789}
1790
1791//The total number of operations is 6
1792template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1793{
1794        return simd128<(16)>::umin(hsimd128<32>::packh(arg1, arg2), hsimd128<32>::packl(arg1, arg2));
1795}
1796
1797//The total number of operations is 6
1798template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1799{
1800        return simd128<(32)>::umin(hsimd128<64>::packh(arg1, arg2), hsimd128<64>::packl(arg1, arg2));
1801}
1802
1803//The total number of operations is 23
1804template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1805{
1806        return simd128<(64)>::umin(hsimd128<128>::packh(arg1, arg2), hsimd128<128>::packl(arg1, arg2));
1807}
1808
1809//The total number of operations is 77
1810template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1811{
1812        return simd128<(1)>::add(hsimd128<2>::packh(arg1, arg2), hsimd128<2>::packl(arg1, arg2));
1813}
1814
1815//The total number of operations is 61
1816template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1817{
1818        return simd128<(2)>::add(hsimd128<4>::packh(arg1, arg2), hsimd128<4>::packl(arg1, arg2));
1819}
1820
1821//The total number of operations is 32
1822template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1823{
1824        return simd128<(4)>::add(hsimd128<8>::packh(arg1, arg2), hsimd128<8>::packl(arg1, arg2));
1825}
1826
1827//The total number of operations is 3
1828template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1829{
1830        return simd128<(8)>::add(hsimd128<16>::packh(arg1, arg2), hsimd128<16>::packl(arg1, arg2));
1831}
1832
1833//The total number of operations is 3
1834template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1835{
1836        return simd128<(16)>::add(hsimd128<32>::packh(arg1, arg2), hsimd128<32>::packl(arg1, arg2));
1837}
1838
1839//The total number of operations is 3
1840template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1841{
1842        return simd128<(32)>::add(hsimd128<64>::packh(arg1, arg2), hsimd128<64>::packl(arg1, arg2));
1843}
1844
1845//The total number of operations is 13
1846template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1847{
1848        return simd128<(64)>::add(hsimd128<128>::packh(arg1, arg2), hsimd128<128>::packl(arg1, arg2));
1849}
1850
1851//The total number of operations is 104
1852template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packss(bitblock128_t arg1, bitblock128_t arg2)
1853{
1854        bitblock128_t hiBound = simd128<2>::srli<1>(simd128<2>::lomask());
1855        bitblock128_t loBound = simd_not(hiBound);
1856        return hsimd128<2>::packl(simd128<1>::ifh(simd128<2>::gt(arg1, hiBound), hiBound, simd128<1>::ifh(simd128<2>::gt(arg1, loBound), arg1, loBound)), simd128<1>::ifh(simd128<2>::gt(arg2, hiBound), hiBound, simd128<1>::ifh(simd128<2>::gt(arg2, loBound), arg2, loBound)));
1857}
1858
1859//The total number of operations is 56
1860template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packss(bitblock128_t arg1, bitblock128_t arg2)
1861{
1862        bitblock128_t hiBound = simd128<4>::srli<1>(simd128<4>::lomask());
1863        bitblock128_t loBound = simd_not(hiBound);
1864        return hsimd128<4>::packl(simd128<1>::ifh(simd128<4>::gt(arg1, hiBound), hiBound, simd128<1>::ifh(simd128<4>::gt(arg1, loBound), arg1, loBound)), simd128<1>::ifh(simd128<4>::gt(arg2, hiBound), hiBound, simd128<1>::ifh(simd128<4>::gt(arg2, loBound), arg2, loBound)));
1865}
1866
1867//The total number of operations is 23
1868template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packss(bitblock128_t arg1, bitblock128_t arg2)
1869{
1870        bitblock128_t hiBound = simd128<8>::srli<1>(simd128<8>::lomask());
1871        bitblock128_t loBound = simd_not(hiBound);
1872        return hsimd128<8>::packl(simd128<1>::ifh(simd128<8>::gt(arg1, hiBound), hiBound, simd128<1>::ifh(simd128<8>::gt(arg1, loBound), arg1, loBound)), simd128<1>::ifh(simd128<8>::gt(arg2, hiBound), hiBound, simd128<1>::ifh(simd128<8>::gt(arg2, loBound), arg2, loBound)));
1873}
1874
1875//The total number of operations is 11
1876template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packss(bitblock128_t arg1, bitblock128_t arg2)
1877{
1878        bitblock128_t hiBound = simd128<16>::srli<1>(simd128<16>::lomask());
1879        bitblock128_t loBound = simd_not(hiBound);
1880        return hsimd128<16>::packl(simd128<1>::ifh(simd128<16>::gt(arg1, hiBound), hiBound, simd128<1>::ifh(simd128<16>::gt(arg1, loBound), arg1, loBound)), simd128<1>::ifh(simd128<16>::gt(arg2, hiBound), hiBound, simd128<1>::ifh(simd128<16>::gt(arg2, loBound), arg2, loBound)));
1881}
1882
1883//The total number of operations is 11
1884template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packss(bitblock128_t arg1, bitblock128_t arg2)
1885{
1886        bitblock128_t hiBound = simd128<32>::srli<1>(simd128<32>::lomask());
1887        bitblock128_t loBound = simd_not(hiBound);
1888        return hsimd128<32>::packl(simd128<1>::ifh(simd128<32>::gt(arg1, hiBound), hiBound, simd128<1>::ifh(simd128<32>::gt(arg1, loBound), arg1, loBound)), simd128<1>::ifh(simd128<32>::gt(arg2, hiBound), hiBound, simd128<1>::ifh(simd128<32>::gt(arg2, loBound), arg2, loBound)));
1889}
1890
1891//The total number of operations is 51
1892template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packss(bitblock128_t arg1, bitblock128_t arg2)
1893{
1894        bitblock128_t hiBound = simd128<64>::srli<1>(simd128<64>::lomask());
1895        bitblock128_t loBound = simd_not(hiBound);
1896        return hsimd128<64>::packl(simd128<1>::ifh(simd128<64>::gt(arg1, hiBound), hiBound, simd128<1>::ifh(simd128<64>::gt(arg1, loBound), arg1, loBound)), simd128<1>::ifh(simd128<64>::gt(arg2, hiBound), hiBound, simd128<1>::ifh(simd128<64>::gt(arg2, loBound), arg2, loBound)));
1897}
1898
1899//The total number of operations is 208
1900template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packss(bitblock128_t arg1, bitblock128_t arg2)
1901{
1902        bitblock128_t hiBound = simd128<128>::srli<1>(simd128<128>::lomask());
1903        bitblock128_t loBound = simd_not(hiBound);
1904        return hsimd128<128>::packl(simd128<1>::ifh(simd128<128>::gt(arg1, hiBound), hiBound, simd128<1>::ifh(simd128<128>::gt(arg1, loBound), arg1, loBound)), simd128<1>::ifh(simd128<128>::gt(arg2, hiBound), hiBound, simd128<1>::ifh(simd128<128>::gt(arg2, loBound), arg2, loBound)));
1905}
1906
1907//The total number of operations is 46
1908template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<4>::signmask(bitblock128_t arg1)
1909{
1910        uint64_t tmpAns1 = hsimd128<(8)>::signmask(esimd128<4>::mergeh(arg1, simd128<4>::constant<0>()));
1911        uint64_t tmpAns2 = hsimd128<(8)>::signmask(esimd128<4>::mergel(arg1, simd128<4>::constant<0>()));
1912        return ((tmpAns1<<(16))+tmpAns2);
1913}
1914
1915//The total number of operations is 18
1916template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<8>::signmask(bitblock128_t arg1)
1917{
1918        uint64_t tmpAns1 = hsimd128<(16)>::signmask(esimd128<8>::mergeh(arg1, simd128<8>::constant<0>()));
1919        uint64_t tmpAns2 = hsimd128<(16)>::signmask(esimd128<8>::mergel(arg1, simd128<8>::constant<0>()));
1920        return ((tmpAns1<<(8))+tmpAns2);
1921}
1922
1923//The total number of operations is 8
1924template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<16>::signmask(bitblock128_t arg1)
1925{
1926        return (((((((((mvmd128<16>::extract<7>(arg1)>>8)&128)|((mvmd128<16>::extract<6>(arg1)>>9)&64))|((mvmd128<16>::extract<5>(arg1)>>10)&32))|((mvmd128<16>::extract<4>(arg1)>>11)&16))|((mvmd128<16>::extract<3>(arg1)>>12)&8))|((mvmd128<16>::extract<2>(arg1)>>13)&4))|((mvmd128<16>::extract<1>(arg1)>>14)&2))|(mvmd128<16>::extract<0>(arg1)>>15));
1927}
1928
1929//The total number of operations is 4
1930template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<32>::signmask(bitblock128_t arg1)
1931{
1932        return (((((mvmd128<32>::extract<3>(arg1)>>28)&8)|((mvmd128<32>::extract<2>(arg1)>>29)&4))|((mvmd128<32>::extract<1>(arg1)>>30)&2))|(mvmd128<32>::extract<0>(arg1)>>31));
1933}
1934
1935//The total number of operations is 2
1936template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<64>::signmask(bitblock128_t arg1)
1937{
1938        return (((mvmd128<64>::extract<1>(arg1)>>62)&2)|(mvmd128<64>::extract<0>(arg1)>>63));
1939}
1940
1941//The total number of operations is 8
1942template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<128>::signmask(bitblock128_t arg1)
1943{
1944        return hsimd128<(64)>::signmask(hsimd128<128>::packh(simd128<128>::constant<0>(), arg1));
1945}
1946
1947//The total number of operations is 37
1948template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packl(bitblock128_t arg1, bitblock128_t arg2)
1949{
1950        return hsimd128<(4)>::packl(simd128<1>::ifh(simd128<2>::himask(), simd128<128>::srli<(1)>(arg1), arg1), simd128<1>::ifh(simd128<2>::himask(), simd128<128>::srli<(1)>(arg2), arg2));
1951}
1952
1953//The total number of operations is 25
1954template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packl(bitblock128_t arg1, bitblock128_t arg2)
1955{
1956        return hsimd128<(8)>::packl(simd128<1>::ifh(simd128<4>::himask(), simd128<128>::srli<(2)>(arg1), arg1), simd128<1>::ifh(simd128<4>::himask(), simd128<128>::srli<(2)>(arg2), arg2));
1957}
1958
1959//The total number of operations is 13
1960template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packl(bitblock128_t arg1, bitblock128_t arg2)
1961{
1962        return hsimd128<(16)>::packl(simd128<1>::ifh(simd128<8>::himask(), simd128<128>::srli<(4)>(arg1), arg1), simd128<1>::ifh(simd128<8>::himask(), simd128<128>::srli<(4)>(arg2), arg2));
1963}
1964
1965//The total number of operations is 1
1966template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packl(bitblock128_t arg1, bitblock128_t arg2)
1967{
1968        return (bitblock128_t)(vuzpq_u8((uint8x16_t)(arg2), (uint8x16_t)(arg1)).val[0]);
1969}
1970
1971//The total number of operations is 1
1972template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packl(bitblock128_t arg1, bitblock128_t arg2)
1973{
1974        return (bitblock128_t)(vuzpq_u16((uint16x8_t)(arg2), (uint16x8_t)(arg1)).val[0]);
1975}
1976
1977//The total number of operations is 1
1978template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packl(bitblock128_t arg1, bitblock128_t arg2)
1979{
1980        return (bitblock128_t)(vuzpq_u32((uint32x4_t)(arg2), (uint32x4_t)(arg1)).val[0]);
1981}
1982
1983//The total number of operations is 6
1984template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packl(bitblock128_t arg1, bitblock128_t arg2)
1985{
1986        return simd128<1>::ifh(simd128<128>::himask(), simd128<128>::slli<(64)>(arg1), arg2);
1987}
1988
1989//The total number of operations is 39
1990template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packh(bitblock128_t arg1, bitblock128_t arg2)
1991{
1992        return hsimd128<2>::packl(simd128<64>::srli<(1)>(arg1), simd128<64>::srli<(1)>(arg2));
1993}
1994
1995//The total number of operations is 27
1996template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packh(bitblock128_t arg1, bitblock128_t arg2)
1997{
1998        return hsimd128<4>::packl(simd128<64>::srli<(2)>(arg1), simd128<64>::srli<(2)>(arg2));
1999}
2000
2001//The total number of operations is 15
2002template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packh(bitblock128_t arg1, bitblock128_t arg2)
2003{
2004        return hsimd128<8>::packl(simd128<64>::srli<(4)>(arg1), simd128<64>::srli<(4)>(arg2));
2005}
2006
2007//The total number of operations is 1
2008template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packh(bitblock128_t arg1, bitblock128_t arg2)
2009{
2010        return (bitblock128_t)(vuzpq_u8((uint8x16_t)(arg2), (uint8x16_t)(arg1)).val[1]);
2011}
2012
2013//The total number of operations is 1
2014template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packh(bitblock128_t arg1, bitblock128_t arg2)
2015{
2016        return (bitblock128_t)(vuzpq_u16((uint16x8_t)(arg2), (uint16x8_t)(arg1)).val[1]);
2017}
2018
2019//The total number of operations is 1
2020template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packh(bitblock128_t arg1, bitblock128_t arg2)
2021{
2022        return (bitblock128_t)(vuzpq_u32((uint32x4_t)(arg2), (uint32x4_t)(arg1)).val[1]);
2023}
2024
2025//The total number of operations is 6
2026template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packh(bitblock128_t arg1, bitblock128_t arg2)
2027{
2028        return simd128<1>::ifh(simd128<128>::himask(), arg1, simd128<128>::srli<(64)>(arg2));
2029}
2030
2031//The total number of operations is 77
2032template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2033{
2034        return simd128<(1)>::min(hsimd128<2>::packh(arg1, arg2), hsimd128<2>::packl(arg1, arg2));
2035}
2036
2037//The total number of operations is 65
2038template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2039{
2040        return simd128<(2)>::min(hsimd128<4>::packh(arg1, arg2), hsimd128<4>::packl(arg1, arg2));
2041}
2042
2043//The total number of operations is 35
2044template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2045{
2046        return simd128<(4)>::min(hsimd128<8>::packh(arg1, arg2), hsimd128<8>::packl(arg1, arg2));
2047}
2048
2049//The total number of operations is 3
2050template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2051{
2052        return simd128<(8)>::min(hsimd128<16>::packh(arg1, arg2), hsimd128<16>::packl(arg1, arg2));
2053}
2054
2055//The total number of operations is 3
2056template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2057{
2058        return simd128<(16)>::min(hsimd128<32>::packh(arg1, arg2), hsimd128<32>::packl(arg1, arg2));
2059}
2060
2061//The total number of operations is 3
2062template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2063{
2064        return simd128<(32)>::min(hsimd128<64>::packh(arg1, arg2), hsimd128<64>::packl(arg1, arg2));
2065}
2066
2067//The total number of operations is 24
2068template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2069{
2070        return simd128<(64)>::min(hsimd128<128>::packh(arg1, arg2), hsimd128<128>::packl(arg1, arg2));
2071}
2072
2073//The total number of operations is 65
2074template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packus(bitblock128_t arg1, bitblock128_t arg2)
2075{
2076        bitblock128_t arg11 = simd128<2>::ifh(arg1, simd128<2>::constant<0>(), arg1);
2077        bitblock128_t arg12 = simd_and(simd128<2>::lomask(), arg11);
2078        bitblock128_t arg21 = simd128<2>::ifh(arg2, simd128<2>::constant<0>(), arg2);
2079        bitblock128_t arg22 = simd_and(simd128<2>::lomask(), arg21);
2080        return hsimd128<2>::packl(simd128<1>::ifh(simd128<2>::eq(arg12, arg11), arg12, simd128<2>::lomask()), simd128<1>::ifh(simd128<2>::eq(arg22, arg21), arg22, simd128<2>::lomask()));
2081}
2082
2083//The total number of operations is 61
2084template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packus(bitblock128_t arg1, bitblock128_t arg2)
2085{
2086        bitblock128_t arg11 = simd128<4>::ifh(arg1, simd128<4>::constant<0>(), arg1);
2087        bitblock128_t arg12 = simd_and(simd128<4>::lomask(), arg11);
2088        bitblock128_t arg21 = simd128<4>::ifh(arg2, simd128<4>::constant<0>(), arg2);
2089        bitblock128_t arg22 = simd_and(simd128<4>::lomask(), arg21);
2090        return hsimd128<4>::packl(simd128<1>::ifh(simd128<4>::eq(arg12, arg11), arg12, simd128<4>::lomask()), simd128<1>::ifh(simd128<4>::eq(arg22, arg21), arg22, simd128<4>::lomask()));
2091}
2092
2093//The total number of operations is 23
2094template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packus(bitblock128_t arg1, bitblock128_t arg2)
2095{
2096        bitblock128_t arg11 = simd128<8>::ifh(arg1, simd128<8>::constant<0>(), arg1);
2097        bitblock128_t arg12 = simd_and(simd128<8>::lomask(), arg11);
2098        bitblock128_t arg21 = simd128<8>::ifh(arg2, simd128<8>::constant<0>(), arg2);
2099        bitblock128_t arg22 = simd_and(simd128<8>::lomask(), arg21);
2100        return hsimd128<8>::packl(simd128<1>::ifh(simd128<8>::eq(arg12, arg11), arg12, simd128<8>::lomask()), simd128<1>::ifh(simd128<8>::eq(arg22, arg21), arg22, simd128<8>::lomask()));
2101}
2102
2103//The total number of operations is 6
2104template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packus(bitblock128_t arg1, bitblock128_t arg2)
2105{
2106        bitblock128_t hiPart = hsimd128<16>::packh(arg1, arg2);
2107        return simd128<(8)>::ifh(hiPart, simd128<(8)>::constant<0>(), simd_or(simd128<(8)>::gt(hiPart, simd128<(8)>::constant<0>()), hsimd128<16>::packl(arg1, arg2)));
2108}
2109
2110//The total number of operations is 6
2111template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packus(bitblock128_t arg1, bitblock128_t arg2)
2112{
2113        bitblock128_t hiPart = hsimd128<32>::packh(arg1, arg2);
2114        return simd128<(16)>::ifh(hiPart, simd128<(16)>::constant<0>(), simd_or(simd128<(16)>::gt(hiPart, simd128<(16)>::constant<0>()), hsimd128<32>::packl(arg1, arg2)));
2115}
2116
2117//The total number of operations is 6
2118template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packus(bitblock128_t arg1, bitblock128_t arg2)
2119{
2120        bitblock128_t hiPart = hsimd128<64>::packh(arg1, arg2);
2121        return simd128<(32)>::ifh(hiPart, simd128<(32)>::constant<0>(), simd_or(simd128<(32)>::gt(hiPart, simd128<(32)>::constant<0>()), hsimd128<64>::packl(arg1, arg2)));
2122}
2123
2124//The total number of operations is 28
2125template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packus(bitblock128_t arg1, bitblock128_t arg2)
2126{
2127        bitblock128_t hiPart = hsimd128<128>::packh(arg1, arg2);
2128        return simd128<(64)>::ifh(hiPart, simd128<(64)>::constant<0>(), simd_or(simd128<(64)>::gt(hiPart, simd128<(64)>::constant<0>()), hsimd128<128>::packl(arg1, arg2)));
2129}
2130
2131//The total number of operations is 17
2132template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2133{
2134        return esimd128<(2)>::mergel(simd128<1>::ifh(simd128<(2)>::himask(), arg1, simd128<(2)>::srli<1>(arg2)), simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::slli<1>(arg1), arg2));
2135}
2136
2137//The total number of operations is 11
2138template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2139{
2140        return esimd128<(4)>::mergel(simd128<1>::ifh(simd128<(4)>::himask(), arg1, simd128<(4)>::srli<2>(arg2)), simd128<1>::ifh(simd128<(4)>::himask(), simd128<(4)>::slli<2>(arg1), arg2));
2141}
2142
2143//The total number of operations is 5
2144template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2145{
2146        return esimd128<(8)>::mergel(simd128<1>::ifh(simd128<(8)>::himask(), arg1, simd128<(8)>::srli<4>(arg2)), simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::slli<4>(arg1), arg2));
2147}
2148
2149//The total number of operations is 1
2150template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2151{
2152        return (bitblock128_t)(vzipq_u8((uint8x16_t)(arg2), (uint8x16_t)(arg1)).val[0]);
2153}
2154
2155//The total number of operations is 1
2156template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2157{
2158        return (bitblock128_t)(vzipq_u16((uint16x8_t)(arg2), (uint16x8_t)(arg1)).val[0]);
2159}
2160
2161//The total number of operations is 1
2162template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2163{
2164        return (bitblock128_t)(vzipq_u32((uint32x4_t)(arg2), (uint32x4_t)(arg1)).val[0]);
2165}
2166
2167//The total number of operations is 3
2168template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2169{
2170        return vcombine_u64((uint64x1_t)(vget_low_u64(arg2)), (uint64x1_t)(vget_low_u64(arg1)));
2171}
2172
2173//The total number of operations is 17
2174template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2175{
2176        return esimd128<(2)>::mergeh(simd128<1>::ifh(simd128<(2)>::himask(), arg1, simd128<(2)>::srli<1>(arg2)), simd128<1>::ifh(simd128<(2)>::himask(), simd128<(2)>::slli<1>(arg1), arg2));
2177}
2178
2179//The total number of operations is 11
2180template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2181{
2182        return esimd128<(4)>::mergeh(simd128<1>::ifh(simd128<(4)>::himask(), arg1, simd128<(4)>::srli<2>(arg2)), simd128<1>::ifh(simd128<(4)>::himask(), simd128<(4)>::slli<2>(arg1), arg2));
2183}
2184
2185//The total number of operations is 5
2186template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2187{
2188        return esimd128<(8)>::mergeh(simd128<1>::ifh(simd128<(8)>::himask(), arg1, simd128<(8)>::srli<4>(arg2)), simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::slli<4>(arg1), arg2));
2189}
2190
2191//The total number of operations is 1
2192template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2193{
2194        return (bitblock128_t)(vzipq_u8((uint8x16_t)(arg2), (uint8x16_t)(arg1)).val[1]);
2195}
2196
2197//The total number of operations is 1
2198template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2199{
2200        return (bitblock128_t)(vzipq_u16((uint16x8_t)(arg2), (uint16x8_t)(arg1)).val[1]);
2201}
2202
2203//The total number of operations is 1
2204template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2205{
2206        return (bitblock128_t)(vzipq_u32((uint32x4_t)(arg2), (uint32x4_t)(arg1)).val[1]);
2207}
2208
2209//The total number of operations is 3
2210template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2211{
2212        return vcombine_u64((uint64x1_t)(vget_high_u64(arg2)), (uint64x1_t)(vget_high_u64(arg1)));
2213}
2214
2215//The total number of operations is 14
2216template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::zeroextendh(bitblock128_t arg1)
2217{
2218        return esimd128<(2)>::mergeh(simd128<(2)>::srli<1>(arg1), simd_and(simd128<(2)>::lomask(), arg1));
2219}
2220
2221//The total number of operations is 8
2222template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::zeroextendh(bitblock128_t arg1)
2223{
2224        return esimd128<(4)>::mergeh(simd128<(4)>::srli<2>(arg1), simd_and(simd128<(4)>::lomask(), arg1));
2225}
2226
2227//The total number of operations is 3
2228template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::zeroextendh(bitblock128_t arg1)
2229{
2230        return esimd128<(8)>::mergeh(simd128<(8)>::srli<4>(arg1), simd_and(simd128<(8)>::lomask(), arg1));
2231}
2232
2233//The total number of operations is 3
2234template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::zeroextendh(bitblock128_t arg1)
2235{
2236        return esimd128<(16)>::mergeh(simd128<(16)>::srli<8>(arg1), simd_and(simd128<(16)>::lomask(), arg1));
2237}
2238
2239//The total number of operations is 3
2240template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::zeroextendh(bitblock128_t arg1)
2241{
2242        return esimd128<(32)>::mergeh(simd128<(32)>::srli<16>(arg1), simd_and(simd128<(32)>::lomask(), arg1));
2243}
2244
2245//The total number of operations is 5
2246template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::zeroextendh(bitblock128_t arg1)
2247{
2248        return esimd128<(64)>::mergeh(simd128<(64)>::srli<32>(arg1), simd_and(simd128<(64)>::lomask(), arg1));
2249}
2250
2251//The total number of operations is 5
2252template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::zeroextendh(bitblock128_t arg1)
2253{
2254        return simd128<(128)>::srli<64>(arg1);
2255}
2256
2257//The total number of operations is 14
2258template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::zeroextendl(bitblock128_t arg1)
2259{
2260        return esimd128<(2)>::mergel(simd128<(2)>::srli<1>(arg1), simd_and(simd128<(2)>::lomask(), arg1));
2261}
2262
2263//The total number of operations is 8
2264template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::zeroextendl(bitblock128_t arg1)
2265{
2266        return esimd128<(4)>::mergel(simd128<(4)>::srli<2>(arg1), simd_and(simd128<(4)>::lomask(), arg1));
2267}
2268
2269//The total number of operations is 3
2270template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::zeroextendl(bitblock128_t arg1)
2271{
2272        return esimd128<(8)>::mergel(simd128<(8)>::srli<4>(arg1), simd_and(simd128<(8)>::lomask(), arg1));
2273}
2274
2275//The total number of operations is 3
2276template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::zeroextendl(bitblock128_t arg1)
2277{
2278        return esimd128<(16)>::mergel(simd128<(16)>::srli<8>(arg1), simd_and(simd128<(16)>::lomask(), arg1));
2279}
2280
2281//The total number of operations is 3
2282template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::zeroextendl(bitblock128_t arg1)
2283{
2284        return esimd128<(32)>::mergel(simd128<(32)>::srli<16>(arg1), simd_and(simd128<(32)>::lomask(), arg1));
2285}
2286
2287//The total number of operations is 5
2288template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::zeroextendl(bitblock128_t arg1)
2289{
2290        return esimd128<(64)>::mergel(simd128<(64)>::srli<32>(arg1), simd_and(simd128<(64)>::lomask(), arg1));
2291}
2292
2293//The total number of operations is 1
2294template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::zeroextendl(bitblock128_t arg1)
2295{
2296        return simd_and(simd128<(128)>::lomask(), arg1);
2297}
2298
2299//The total number of operations is 21
2300template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::signextendh(bitblock128_t arg1)
2301{
2302        return esimd128<(2)>::mergeh(simd128<(2)>::srai<1>(arg1), simd128<(2)>::srai<1>(simd128<(2)>::slli<1>(arg1)));
2303}
2304
2305//The total number of operations is 23
2306template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::signextendh(bitblock128_t arg1)
2307{
2308        return esimd128<(4)>::mergeh(simd128<(4)>::srai<2>(arg1), simd128<(4)>::srai<2>(simd128<(4)>::slli<2>(arg1)));
2309}
2310
2311//The total number of operations is 4
2312template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::signextendh(bitblock128_t arg1)
2313{
2314        return esimd128<(8)>::mergeh(simd128<(8)>::srai<4>(arg1), simd128<(8)>::srai<4>(simd128<(8)>::slli<4>(arg1)));
2315}
2316
2317//The total number of operations is 4
2318template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::signextendh(bitblock128_t arg1)
2319{
2320        return esimd128<(16)>::mergeh(simd128<(16)>::srai<8>(arg1), simd128<(16)>::srai<8>(simd128<(16)>::slli<8>(arg1)));
2321}
2322
2323//The total number of operations is 4
2324template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::signextendh(bitblock128_t arg1)
2325{
2326        return esimd128<(32)>::mergeh(simd128<(32)>::srai<16>(arg1), simd128<(32)>::srai<16>(simd128<(32)>::slli<16>(arg1)));
2327}
2328
2329//The total number of operations is 6
2330template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::signextendh(bitblock128_t arg1)
2331{
2332        return esimd128<(64)>::mergeh(simd128<(64)>::srai<32>(arg1), simd128<(64)>::srai<32>(simd128<(64)>::slli<32>(arg1)));
2333}
2334
2335//The total number of operations is 9
2336template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::signextendh(bitblock128_t arg1)
2337{
2338        return simd128<(128)>::srai<64>(arg1);
2339}
2340
2341//The total number of operations is 21
2342template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::signextendl(bitblock128_t arg1)
2343{
2344        return esimd128<(2)>::mergel(simd128<(2)>::srai<1>(arg1), simd128<(2)>::srai<1>(simd128<(2)>::slli<1>(arg1)));
2345}
2346
2347//The total number of operations is 23
2348template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::signextendl(bitblock128_t arg1)
2349{
2350        return esimd128<(4)>::mergel(simd128<(4)>::srai<2>(arg1), simd128<(4)>::srai<2>(simd128<(4)>::slli<2>(arg1)));
2351}
2352
2353//The total number of operations is 4
2354template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::signextendl(bitblock128_t arg1)
2355{
2356        return esimd128<(8)>::mergel(simd128<(8)>::srai<4>(arg1), simd128<(8)>::srai<4>(simd128<(8)>::slli<4>(arg1)));
2357}
2358
2359//The total number of operations is 4
2360template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::signextendl(bitblock128_t arg1)
2361{
2362        return esimd128<(16)>::mergel(simd128<(16)>::srai<8>(arg1), simd128<(16)>::srai<8>(simd128<(16)>::slli<8>(arg1)));
2363}
2364
2365//The total number of operations is 4
2366template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::signextendl(bitblock128_t arg1)
2367{
2368        return esimd128<(32)>::mergel(simd128<(32)>::srai<16>(arg1), simd128<(32)>::srai<16>(simd128<(32)>::slli<16>(arg1)));
2369}
2370
2371//The total number of operations is 6
2372template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::signextendl(bitblock128_t arg1)
2373{
2374        return esimd128<(64)>::mergel(simd128<(64)>::srai<32>(arg1), simd128<(64)>::srai<32>(simd128<(64)>::slli<32>(arg1)));
2375}
2376
2377//The total number of operations is 14
2378template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::signextendl(bitblock128_t arg1)
2379{
2380        return simd128<(128)>::srai<64>(simd128<(128)>::slli<64>(arg1));
2381}
2382
2383//The total number of operations is 11
2384template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::dsrli(bitblock128_t arg1, bitblock128_t arg2)
2385{
2386        return simd_or(mvmd128<2>::srli<sh>(arg1), mvmd128<2>::slli<((64)-sh)>(arg2));
2387}
2388
2389//The total number of operations is 11
2390template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::dsrli(bitblock128_t arg1, bitblock128_t arg2)
2391{
2392        return simd_or(mvmd128<4>::srli<sh>(arg1), mvmd128<4>::slli<((32)-sh)>(arg2));
2393}
2394
2395//The total number of operations is 11
2396template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::dsrli(bitblock128_t arg1, bitblock128_t arg2)
2397{
2398        return simd_or(mvmd128<8>::srli<sh>(arg1), mvmd128<8>::slli<((16)-sh)>(arg2));
2399}
2400
2401//The total number of operations is 11
2402template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::dsrli(bitblock128_t arg1, bitblock128_t arg2)
2403{
2404        return simd_or(mvmd128<16>::srli<sh>(arg1), mvmd128<16>::slli<((8)-sh)>(arg2));
2405}
2406
2407//The total number of operations is 11
2408template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::dsrli(bitblock128_t arg1, bitblock128_t arg2)
2409{
2410        return simd_or(mvmd128<32>::srli<sh>(arg1), mvmd128<32>::slli<((4)-sh)>(arg2));
2411}
2412
2413//The total number of operations is 11
2414template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::dsrli(bitblock128_t arg1, bitblock128_t arg2)
2415{
2416        return simd_or(mvmd128<64>::srli<sh>(arg1), mvmd128<64>::slli<((2)-sh)>(arg2));
2417}
2418
2419//The total number of operations is 11
2420template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::dsrli(bitblock128_t arg1, bitblock128_t arg2)
2421{
2422        return simd_or(mvmd128<128>::srli<sh>(arg1), mvmd128<128>::slli<((1)-sh)>(arg2));
2423}
2424
2425//The total number of operations is 1
2426template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill(uint64_t val1)
2427{
2428        return mvmd128<32>::fill((-1*val1));
2429}
2430
2431//The total number of operations is 1
2432template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill(uint64_t val1)
2433{
2434        return mvmd128<(4)>::fill(((val1<<2)|val1));
2435}
2436
2437//The total number of operations is 1
2438template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill(uint64_t val1)
2439{
2440        return mvmd128<(8)>::fill(((val1<<4)|val1));
2441}
2442
2443//The total number of operations is 1
2444template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill(uint64_t val1)
2445{
2446        return (bitblock128_t)vdupq_n_u8((uint8_t)(val1));
2447}
2448
2449//The total number of operations is 1
2450template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill(uint64_t val1)
2451{
2452        return (bitblock128_t)vdupq_n_u16((uint16_t)(val1));
2453}
2454
2455//The total number of operations is 1
2456template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill(uint64_t val1)
2457{
2458        return (bitblock128_t)vdupq_n_u32((uint32_t)(val1));
2459}
2460
2461//The total number of operations is 1
2462template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::fill(uint64_t val1)
2463{
2464        return (bitblock128_t)vdupq_n_u64((uint64_t)(val1));
2465}
2466
2467//The total number of operations is 1
2468template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<1>::extract(bitblock128_t arg1)
2469{
2470        return (((pos%2) == 0) ? (mvmd128<(2)>::extract<(pos/2)>(arg1)&(1)) : (mvmd128<(2)>::extract<(pos/2)>(arg1)>>1));
2471}
2472
2473//The total number of operations is 1
2474template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<2>::extract(bitblock128_t arg1)
2475{
2476        return (((pos%2) == 0) ? (mvmd128<(4)>::extract<(pos/2)>(arg1)&(3)) : (mvmd128<(4)>::extract<(pos/2)>(arg1)>>2));
2477}
2478
2479//The total number of operations is 1
2480template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<4>::extract(bitblock128_t arg1)
2481{
2482        return (((pos%2) == 0) ? (mvmd128<(8)>::extract<(pos/2)>(arg1)&(15)) : (mvmd128<(8)>::extract<(pos/2)>(arg1)>>4));
2483}
2484
2485//The total number of operations is 1
2486template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<8>::extract(bitblock128_t arg1)
2487{
2488        return vgetq_lane_u8((uint8x16_t)(arg1), (int32_t)(pos));
2489}
2490
2491//The total number of operations is 1
2492template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<16>::extract(bitblock128_t arg1)
2493{
2494        return vgetq_lane_u16((uint16x8_t)(arg1), (int32_t)(pos));
2495}
2496
2497//The total number of operations is 1
2498template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<32>::extract(bitblock128_t arg1)
2499{
2500        return vgetq_lane_u32((uint32x4_t)(arg1), (int32_t)(pos));
2501}
2502
2503//The total number of operations is 1
2504template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<64>::extract(bitblock128_t arg1)
2505{
2506        return vgetq_lane_u64((uint64x2_t)(arg1), (int32_t)(pos));
2507}
2508
2509//The total number of operations is 2
2510template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::splat(bitblock128_t arg1)
2511{
2512        return mvmd128<1>::fill(mvmd128<1>::extract<pos>(arg1));
2513}
2514
2515//The total number of operations is 2
2516template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::splat(bitblock128_t arg1)
2517{
2518        return mvmd128<2>::fill(mvmd128<2>::extract<pos>(arg1));
2519}
2520
2521//The total number of operations is 2
2522template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::splat(bitblock128_t arg1)
2523{
2524        return mvmd128<4>::fill(mvmd128<4>::extract<pos>(arg1));
2525}
2526
2527//The total number of operations is 2
2528template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::splat(bitblock128_t arg1)
2529{
2530        return mvmd128<8>::fill(mvmd128<8>::extract<pos>(arg1));
2531}
2532
2533//The total number of operations is 2
2534template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::splat(bitblock128_t arg1)
2535{
2536        return mvmd128<16>::fill(mvmd128<16>::extract<pos>(arg1));
2537}
2538
2539//The total number of operations is 2
2540template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::splat(bitblock128_t arg1)
2541{
2542        return mvmd128<32>::fill(mvmd128<32>::extract<pos>(arg1));
2543}
2544
2545//The total number of operations is 2
2546template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::splat(bitblock128_t arg1)
2547{
2548        return mvmd128<64>::fill(mvmd128<64>::extract<pos>(arg1));
2549}
2550
2551//The total number of operations is 5
2552template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::splat(bitblock128_t arg1)
2553{
2554        return simd128<1>::ifh(simd128<128>::himask(), mvmd128<(64)>::splat<((2*pos)+1)>(arg1), mvmd128<(64)>::splat<(2*pos)>(arg1));
2555}
2556
2557//The total number of operations is 15
2558template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16)
2559{
2560        return simd128<1>::ifh(simd128<(16)>::himask(), mvmd128<1>::fill8(val1, val2, val3, val4, val5, val6, val7, val8), mvmd128<1>::fill8(val9, val10, val11, val12, val13, val14, val15, val16));
2561}
2562
2563//The total number of operations is 15
2564template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16)
2565{
2566        return simd128<1>::ifh(simd128<(32)>::himask(), mvmd128<2>::fill8(val1, val2, val3, val4, val5, val6, val7, val8), mvmd128<2>::fill8(val9, val10, val11, val12, val13, val14, val15, val16));
2567}
2568
2569//The total number of operations is 15
2570template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16)
2571{
2572        return simd128<1>::ifh(simd128<(64)>::himask(), mvmd128<4>::fill8(val1, val2, val3, val4, val5, val6, val7, val8), mvmd128<4>::fill8(val9, val10, val11, val12, val13, val14, val15, val16));
2573}
2574
2575//The total number of operations is 15
2576template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill16(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8, uint64_t val9, uint64_t val10, uint64_t val11, uint64_t val12, uint64_t val13, uint64_t val14, uint64_t val15, uint64_t val16)
2577{
2578        return simd128<1>::ifh(simd128<(128)>::himask(), mvmd128<8>::fill8(val1, val2, val3, val4, val5, val6, val7, val8), mvmd128<8>::fill8(val9, val10, val11, val12, val13, val14, val15, val16));
2579}
2580
2581//The total number of operations is 3
2582template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4)
2583{
2584        return simd128<1>::ifh(simd128<(4)>::himask(), mvmd128<1>::fill2(val1, val2), mvmd128<1>::fill2(val3, val4));
2585}
2586
2587//The total number of operations is 3
2588template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4)
2589{
2590        return simd128<1>::ifh(simd128<(8)>::himask(), mvmd128<2>::fill2(val1, val2), mvmd128<2>::fill2(val3, val4));
2591}
2592
2593//The total number of operations is 3
2594template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4)
2595{
2596        return simd128<1>::ifh(simd128<(16)>::himask(), mvmd128<4>::fill2(val1, val2), mvmd128<4>::fill2(val3, val4));
2597}
2598
2599//The total number of operations is 3
2600template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4)
2601{
2602        return simd128<1>::ifh(simd128<(32)>::himask(), mvmd128<8>::fill2(val1, val2), mvmd128<8>::fill2(val3, val4));
2603}
2604
2605//The total number of operations is 3
2606template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4)
2607{
2608        return simd128<1>::ifh(simd128<(64)>::himask(), mvmd128<16>::fill2(val1, val2), mvmd128<16>::fill2(val3, val4));
2609}
2610
2611//The total number of operations is 7
2612template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4)
2613{
2614        return simd128<1>::ifh(simd128<(128)>::himask(), mvmd128<32>::fill2(val1, val2), mvmd128<32>::fill2(val3, val4));
2615}
2616
2617//The total number of operations is 5
2618template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::srli(bitblock128_t arg1)
2619{
2620        return simd128<128>::srli<(sh*2)>(arg1);
2621}
2622
2623//The total number of operations is 5
2624template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1)
2625{
2626        return simd128<128>::srli<(sh*4)>(arg1);
2627}
2628
2629//The total number of operations is 5
2630template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::srli(bitblock128_t arg1)
2631{
2632        return simd128<128>::srli<(sh*8)>(arg1);
2633}
2634
2635//The total number of operations is 5
2636template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::srli(bitblock128_t arg1)
2637{
2638        return simd128<128>::srli<(sh*16)>(arg1);
2639}
2640
2641//The total number of operations is 5
2642template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1)
2643{
2644        return simd128<128>::srli<(sh*32)>(arg1);
2645}
2646
2647//The total number of operations is 5
2648template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::srli(bitblock128_t arg1)
2649{
2650        return simd128<128>::srli<(sh*64)>(arg1);
2651}
2652
2653//The total number of operations is 5
2654template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1)
2655{
2656        return simd128<128>::srli<(sh*128)>(arg1);
2657}
2658
2659//The total number of operations is 1
2660template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill2(uint64_t val1, uint64_t val2)
2661{
2662        return mvmd128<(2)>::fill(((val1<<1)|(val2&(1))));
2663}
2664
2665//The total number of operations is 1
2666template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill2(uint64_t val1, uint64_t val2)
2667{
2668        return mvmd128<(4)>::fill(((val1<<2)|(val2&(3))));
2669}
2670
2671//The total number of operations is 1
2672template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill2(uint64_t val1, uint64_t val2)
2673{
2674        return mvmd128<(8)>::fill(((val1<<4)|(val2&(15))));
2675}
2676
2677//The total number of operations is 1
2678template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill2(uint64_t val1, uint64_t val2)
2679{
2680        return mvmd128<(16)>::fill(((val1<<8)|(val2&(255))));
2681}
2682
2683//The total number of operations is 1
2684template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill2(uint64_t val1, uint64_t val2)
2685{
2686        return mvmd128<(32)>::fill(((val1<<16)|(val2&(65535))));
2687}
2688
2689//The total number of operations is 3
2690template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill2(uint64_t val1, uint64_t val2)
2691{
2692        return simd128<1>::ifh(simd128<(64)>::himask(), mvmd128<32>::fill(val1), mvmd128<32>::fill(val2));
2693}
2694
2695//The total number of operations is 3
2696template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::fill2(uint64_t val1, uint64_t val2)
2697{
2698        return simd128<1>::ifh(simd128<(128)>::himask(), mvmd128<64>::fill(val1), mvmd128<64>::fill(val2));
2699}
2700
2701//The total number of operations is 11
2702template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::dslli(bitblock128_t arg1, bitblock128_t arg2)
2703{
2704        return simd_or(mvmd128<2>::slli<sh>(arg1), mvmd128<2>::srli<((64)-sh)>(arg2));
2705}
2706
2707//The total number of operations is 11
2708template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::dslli(bitblock128_t arg1, bitblock128_t arg2)
2709{
2710        return simd_or(mvmd128<4>::slli<sh>(arg1), mvmd128<4>::srli<((32)-sh)>(arg2));
2711}
2712
2713//The total number of operations is 11
2714template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::dslli(bitblock128_t arg1, bitblock128_t arg2)
2715{
2716        return simd_or(mvmd128<8>::slli<sh>(arg1), mvmd128<8>::srli<((16)-sh)>(arg2));
2717}
2718
2719//The total number of operations is 11
2720template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::dslli(bitblock128_t arg1, bitblock128_t arg2)
2721{
2722        return simd_or(mvmd128<16>::slli<sh>(arg1), mvmd128<16>::srli<((8)-sh)>(arg2));
2723}
2724
2725//The total number of operations is 11
2726template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::dslli(bitblock128_t arg1, bitblock128_t arg2)
2727{
2728        return simd_or(mvmd128<32>::slli<sh>(arg1), mvmd128<32>::srli<((4)-sh)>(arg2));
2729}
2730
2731//The total number of operations is 11
2732template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::dslli(bitblock128_t arg1, bitblock128_t arg2)
2733{
2734        return simd_or(mvmd128<64>::slli<sh>(arg1), mvmd128<64>::srli<((2)-sh)>(arg2));
2735}
2736
2737//The total number of operations is 11
2738template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::dslli(bitblock128_t arg1, bitblock128_t arg2)
2739{
2740        return simd_or(mvmd128<128>::slli<sh>(arg1), mvmd128<128>::srli<((1)-sh)>(arg2));
2741}
2742
2743//The total number of operations is 5
2744template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::slli(bitblock128_t arg1)
2745{
2746        return simd128<128>::slli<(sh*2)>(arg1);
2747}
2748
2749//The total number of operations is 5
2750template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1)
2751{
2752        return mvmd128<(2)>::slli<(sh*2)>(arg1);
2753}
2754
2755//The total number of operations is 5
2756template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::slli(bitblock128_t arg1)
2757{
2758        return simd128<128>::slli<(sh*8)>(arg1);
2759}
2760
2761//The total number of operations is 5
2762template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1)
2763{
2764        return mvmd128<(8)>::slli<(sh*2)>(arg1);
2765}
2766
2767//The total number of operations is 5
2768template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::slli(bitblock128_t arg1)
2769{
2770        return simd128<128>::slli<(sh*32)>(arg1);
2771}
2772
2773//The total number of operations is 5
2774template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1)
2775{
2776        return mvmd128<(32)>::slli<(sh*2)>(arg1);
2777}
2778
2779//The total number of operations is 5
2780template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::slli(bitblock128_t arg1)
2781{
2782        return simd128<128>::slli<(sh*128)>(arg1);
2783}
2784
2785//The total number of operations is 7
2786template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8)
2787{
2788        return simd128<1>::ifh(simd128<(8)>::himask(), mvmd128<1>::fill4(val1, val2, val3, val4), mvmd128<1>::fill4(val5, val6, val7, val8));
2789}
2790
2791//The total number of operations is 7
2792template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8)
2793{
2794        return simd128<1>::ifh(simd128<(16)>::himask(), mvmd128<2>::fill4(val1, val2, val3, val4), mvmd128<2>::fill4(val5, val6, val7, val8));
2795}
2796
2797//The total number of operations is 7
2798template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8)
2799{
2800        return simd128<1>::ifh(simd128<(32)>::himask(), mvmd128<4>::fill4(val1, val2, val3, val4), mvmd128<4>::fill4(val5, val6, val7, val8));
2801}
2802
2803//The total number of operations is 7
2804template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8)
2805{
2806        return simd128<1>::ifh(simd128<(64)>::himask(), mvmd128<8>::fill4(val1, val2, val3, val4), mvmd128<8>::fill4(val5, val6, val7, val8));
2807}
2808
2809//The total number of operations is 7
2810template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill8(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4, uint64_t val5, uint64_t val6, uint64_t val7, uint64_t val8)
2811{
2812        return simd128<1>::ifh(simd128<(128)>::himask(), mvmd128<16>::fill4(val1, val2, val3, val4), mvmd128<16>::fill4(val5, val6, val7, val8));
2813}
2814
2815//The total number of operations is 1
2816IDISA_ALWAYS_INLINE bitblock128_t bitblock128::load_unaligned(uint64_t const* arg1)
2817{
2818        return vld1q_u64((uint64_t const*)(arg1));
2819}
2820
2821//The total number of operations is 5
2822template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t bitblock128::srli(bitblock128_t arg1)
2823{
2824        return simd128<128>::srli<sh>(arg1);
2825}
2826
2827//The total number of operations is 1
2828IDISA_ALWAYS_INLINE void bitblock128::store_aligned(uint64_t* arg1, bitblock128_t arg2)
2829{
2830        vst1q_u64((uint64_t*)(arg1), arg2);
2831}
2832
2833//The total number of operations is 18
2834IDISA_ALWAYS_INLINE uint64_t bitblock128::popcount(bitblock128_t arg1)
2835{
2836        return mvmd128<64>::extract<0>(simd128<128>::popcount(arg1));
2837}
2838
2839//The total number of operations is 5
2840IDISA_ALWAYS_INLINE bool bitblock128::all(bitblock128_t arg1)
2841{
2842        return hsimd128<32>::signmask(simd128<32>::eq(arg1, simd128<32>::constant<-1>())) == 15;
2843}
2844
2845//The total number of operations is 5
2846template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t bitblock128::slli(bitblock128_t arg1)
2847{
2848        return simd128<128>::slli<sh>(arg1);
2849}
2850
2851//The total number of operations is 5
2852IDISA_ALWAYS_INLINE bool bitblock128::any(bitblock128_t arg1)
2853{
2854        return hsimd128<32>::signmask(simd128<32>::eq(arg1, simd128<32>::constant<0>())) != 15;
2855}
2856
2857//The total number of operations is 1
2858IDISA_ALWAYS_INLINE bitblock128_t bitblock128::load_aligned(uint64_t const* arg1)
2859{
2860        return vld1q_u64((uint64_t const*)(arg1));
2861}
2862
2863//The total number of operations is 1
2864IDISA_ALWAYS_INLINE void bitblock128::store_unaligned(uint64_t* arg1, bitblock128_t arg2)
2865{
2866        vst1q_u64((uint64_t*)(arg1), arg2);
2867}
2868
2869#endif
Note: See TracBrowser for help on using the repository browser.