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

Last change on this file since 1807 was 1807, checked in by cameron, 7 years ago

New store/load op syntax

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