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

Last change on this file since 2546 was 2275, checked in by ksherdy, 7 years ago

Reverted previous del.

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