source: trunk/lib/idisa_cpp/idisa_sse3.cpp @ 1937

Last change on this file since 1937 was 1924, checked in by cameron, 8 years ago

Update simd<128>::srl/sll

File size: 151.5 KB
RevLine 
[1767]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
[1539]8#ifndef IDISA_SSE3_CPP
9#define IDISA_SSE3_CPP
[1548]10#include <stdint.h>
11#include "../config.hpp"
12
[1539]13#include "pmmintrin.h"
14
15typedef __m128i 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 umult(bitblock128_t arg1, bitblock128_t arg2);
24        static IDISA_ALWAYS_INLINE bitblock128_t ult(bitblock128_t arg1, bitblock128_t arg2);
25        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srli(bitblock128_t arg1);
26        static IDISA_ALWAYS_INLINE bitblock128_t ctz(bitblock128_t arg1);
27        static IDISA_ALWAYS_INLINE bitblock128_t sll(bitblock128_t arg1, bitblock128_t shift_mask);
28        static IDISA_ALWAYS_INLINE bitblock128_t eq(bitblock128_t arg1, bitblock128_t arg2);
29        static IDISA_ALWAYS_INLINE bitblock128_t popcount(bitblock128_t arg1);
30        static IDISA_ALWAYS_INLINE bitblock128_t neg(bitblock128_t arg1);
31        static IDISA_ALWAYS_INLINE bitblock128_t himask();
32        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t slli(bitblock128_t arg1);
33        static IDISA_ALWAYS_INLINE bitblock128_t ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
34        static IDISA_ALWAYS_INLINE bitblock128_t sub(bitblock128_t arg1, bitblock128_t arg2);
35        static IDISA_ALWAYS_INLINE bitblock128_t add_hl(bitblock128_t arg1);
36        static IDISA_ALWAYS_INLINE bitblock128_t srl(bitblock128_t arg1, bitblock128_t shift_mask);
[1580]37        static IDISA_ALWAYS_INLINE bitblock128_t lomask();
[1539]38        static IDISA_ALWAYS_INLINE bitblock128_t umin(bitblock128_t arg1, bitblock128_t arg2);
39        template <uint64_t val> static IDISA_ALWAYS_INLINE bitblock128_t constant();
40        static IDISA_ALWAYS_INLINE bitblock128_t min(bitblock128_t arg1, bitblock128_t arg2);
41        static IDISA_ALWAYS_INLINE bitblock128_t umax(bitblock128_t arg1, bitblock128_t arg2);
42        static IDISA_ALWAYS_INLINE bitblock128_t abs(bitblock128_t arg1);
43        static IDISA_ALWAYS_INLINE bitblock128_t xor_hl(bitblock128_t arg1);
44        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srai(bitblock128_t arg1);
45        static IDISA_ALWAYS_INLINE bitblock128_t lt(bitblock128_t arg1, bitblock128_t arg2);
46        static IDISA_ALWAYS_INLINE bitblock128_t add(bitblock128_t arg1, bitblock128_t arg2);
47        static IDISA_ALWAYS_INLINE bitblock128_t ugt(bitblock128_t arg1, bitblock128_t arg2);
48};
49
50template <uint32_t fw>
51class hsimd128
52{
53public:
54        static IDISA_ALWAYS_INLINE bitblock128_t umin_hl(bitblock128_t arg1, bitblock128_t arg2);
55        static IDISA_ALWAYS_INLINE bitblock128_t add_hl(bitblock128_t arg1, bitblock128_t arg2);
56        static IDISA_ALWAYS_INLINE bitblock128_t packss(bitblock128_t arg1, bitblock128_t arg2);
[1556]57        static IDISA_ALWAYS_INLINE bitblock128_t packh(bitblock128_t arg1, bitblock128_t arg2);
[1539]58        static IDISA_ALWAYS_INLINE uint64_t signmask(bitblock128_t arg1);
59        static IDISA_ALWAYS_INLINE bitblock128_t packl(bitblock128_t arg1, bitblock128_t arg2);
60        static IDISA_ALWAYS_INLINE bitblock128_t min_hl(bitblock128_t arg1, bitblock128_t arg2);
61        static IDISA_ALWAYS_INLINE bitblock128_t packus(bitblock128_t arg1, bitblock128_t arg2);
62};
63
64template <uint32_t fw>
65class esimd128
66{
67public:
68        static IDISA_ALWAYS_INLINE bitblock128_t mergel(bitblock128_t arg1, bitblock128_t arg2);
[1570]69        static IDISA_ALWAYS_INLINE bitblock128_t signextendh(bitblock128_t arg1);
[1539]70        static IDISA_ALWAYS_INLINE bitblock128_t mergeh(bitblock128_t arg1, bitblock128_t arg2);
71        static IDISA_ALWAYS_INLINE bitblock128_t zeroextendh(bitblock128_t arg1);
72        static IDISA_ALWAYS_INLINE bitblock128_t zeroextendl(bitblock128_t arg1);
73        static IDISA_ALWAYS_INLINE bitblock128_t signextendl(bitblock128_t arg1);
74};
75
76template <uint32_t fw>
77class mvmd128
78{
79public:
80        template <uint64_t msk> static IDISA_ALWAYS_INLINE bitblock128_t shufflei(bitblock128_t arg1);
81        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t dsrli(bitblock128_t arg1, bitblock128_t arg2);
82        static IDISA_ALWAYS_INLINE bitblock128_t fill(uint64_t val1);
83        template <uint64_t pos> static IDISA_ALWAYS_INLINE uint64_t extract(bitblock128_t arg1);
84        template <uint64_t pos> static IDISA_ALWAYS_INLINE bitblock128_t splat(bitblock128_t arg1);
85        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t slli(bitblock128_t arg1);
86        static IDISA_ALWAYS_INLINE bitblock128_t fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
87        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srli(bitblock128_t arg1);
88        static IDISA_ALWAYS_INLINE bitblock128_t fill2(uint64_t val1, uint64_t val2);
89        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t dslli(bitblock128_t arg1, bitblock128_t arg2);
90        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);
91        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);
92};
93
94class bitblock128
95{
96public:
[1580]97        static IDISA_ALWAYS_INLINE bitblock128_t sll(bitblock128_t arg1, bitblock128_t arg2);
[1807]98        static IDISA_ALWAYS_INLINE bitblock128_t load_unaligned(const bitblock128_t* arg1);
[1580]99        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t srli(bitblock128_t arg1);
100        static IDISA_ALWAYS_INLINE bitblock128_t srl(bitblock128_t arg1, bitblock128_t arg2);
[1807]101        static IDISA_ALWAYS_INLINE void store_aligned(bitblock128_t arg1, bitblock128_t* arg2);
[1539]102        static IDISA_ALWAYS_INLINE bool all(bitblock128_t arg1);
103        static IDISA_ALWAYS_INLINE bool any(bitblock128_t arg1);
[1556]104        static IDISA_ALWAYS_INLINE uint64_t popcount(bitblock128_t arg1);
[1580]105        template <uint64_t sh> static IDISA_ALWAYS_INLINE bitblock128_t slli(bitblock128_t arg1);
[1807]106        static IDISA_ALWAYS_INLINE bitblock128_t load_aligned(const bitblock128_t* arg1);
107        static IDISA_ALWAYS_INLINE void store_unaligned(bitblock128_t arg1, bitblock128_t* arg2);
[1539]108};
109
110//Declaration Part
111IDISA_ALWAYS_INLINE bitblock128_t simd_nor(bitblock128_t arg1, bitblock128_t arg2);
112IDISA_ALWAYS_INLINE bitblock128_t simd_not(bitblock128_t arg1);
113IDISA_ALWAYS_INLINE bitblock128_t simd_andc(bitblock128_t arg1, bitblock128_t arg2);
114IDISA_ALWAYS_INLINE bitblock128_t simd_or(bitblock128_t arg1, bitblock128_t arg2);
[1740]115IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2);
[1661]116IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2);
[1539]117template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::max(bitblock128_t arg1, bitblock128_t arg2);
118template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::max(bitblock128_t arg1, bitblock128_t arg2);
119template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::max(bitblock128_t arg1, bitblock128_t arg2);
120template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::max(bitblock128_t arg1, bitblock128_t arg2);
121template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::max(bitblock128_t arg1, bitblock128_t arg2);
122template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::max(bitblock128_t arg1, bitblock128_t arg2);
123template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::max(bitblock128_t arg1, bitblock128_t arg2);
124template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::max(bitblock128_t arg1, bitblock128_t arg2);
125template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::mult(bitblock128_t arg1, bitblock128_t arg2);
126template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::mult(bitblock128_t arg1, bitblock128_t arg2);
127template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::mult(bitblock128_t arg1, bitblock128_t arg2);
128template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::mult(bitblock128_t arg1, bitblock128_t arg2);
129template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::mult(bitblock128_t arg1, bitblock128_t arg2);
130template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::mult(bitblock128_t arg1, bitblock128_t arg2);
131template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::mult(bitblock128_t arg1, bitblock128_t arg2);
132template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::mult(bitblock128_t arg1, bitblock128_t arg2);
133template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2);
134template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::gt(bitblock128_t arg1, bitblock128_t arg2);
135template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::gt(bitblock128_t arg1, bitblock128_t arg2);
136template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::gt(bitblock128_t arg1, bitblock128_t arg2);
137template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::gt(bitblock128_t arg1, bitblock128_t arg2);
138template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::gt(bitblock128_t arg1, bitblock128_t arg2);
139template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::gt(bitblock128_t arg1, bitblock128_t arg2);
140template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::gt(bitblock128_t arg1, bitblock128_t arg2);
141template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umult(bitblock128_t arg1, bitblock128_t arg2);
142template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umult(bitblock128_t arg1, bitblock128_t arg2);
143template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umult(bitblock128_t arg1, bitblock128_t arg2);
144template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umult(bitblock128_t arg1, bitblock128_t arg2);
145template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umult(bitblock128_t arg1, bitblock128_t arg2);
146template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umult(bitblock128_t arg1, bitblock128_t arg2);
147template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umult(bitblock128_t arg1, bitblock128_t arg2);
148template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2);
149template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ult(bitblock128_t arg1, bitblock128_t arg2);
150template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2);
151template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ult(bitblock128_t arg1, bitblock128_t arg2);
152template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ult(bitblock128_t arg1, bitblock128_t arg2);
153template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ult(bitblock128_t arg1, bitblock128_t arg2);
154template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ult(bitblock128_t arg1, bitblock128_t arg2);
155template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ult(bitblock128_t arg1, bitblock128_t arg2);
156template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2);
157template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::lt(bitblock128_t arg1, bitblock128_t arg2);
158template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::lt(bitblock128_t arg1, bitblock128_t arg2);
159template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::lt(bitblock128_t arg1, bitblock128_t arg2);
160template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::lt(bitblock128_t arg1, bitblock128_t arg2);
161template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::lt(bitblock128_t arg1, bitblock128_t arg2);
162template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::lt(bitblock128_t arg1, bitblock128_t arg2);
163template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::lt(bitblock128_t arg1, bitblock128_t arg2);
164template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::srli(bitblock128_t arg1);
165template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::srli(bitblock128_t arg1);
166template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::srli(bitblock128_t arg1);
167template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::srli(bitblock128_t arg1);
168template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::srli(bitblock128_t arg1);
169template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srli(bitblock128_t arg1);
170template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srli(bitblock128_t arg1);
171template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ctz(bitblock128_t arg1);
172template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ctz(bitblock128_t arg1);
173template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ctz(bitblock128_t arg1);
174template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ctz(bitblock128_t arg1);
175template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ctz(bitblock128_t arg1);
176template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ctz(bitblock128_t arg1);
177template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ctz(bitblock128_t arg1);
178template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ctz(bitblock128_t arg1);
179template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::sll(bitblock128_t arg1, bitblock128_t shift_mask);
180template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sll(bitblock128_t arg1, bitblock128_t shift_mask);
181template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2);
182template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ugt(bitblock128_t arg1, bitblock128_t arg2);
183template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2);
184template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ugt(bitblock128_t arg1, bitblock128_t arg2);
185template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ugt(bitblock128_t arg1, bitblock128_t arg2);
186template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ugt(bitblock128_t arg1, bitblock128_t arg2);
187template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ugt(bitblock128_t arg1, bitblock128_t arg2);
188template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ugt(bitblock128_t arg1, bitblock128_t arg2);
189template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::xor_hl(bitblock128_t arg1);
190template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::xor_hl(bitblock128_t arg1);
191template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::xor_hl(bitblock128_t arg1);
192template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::xor_hl(bitblock128_t arg1);
193template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::xor_hl(bitblock128_t arg1);
194template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::xor_hl(bitblock128_t arg1);
195template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::xor_hl(bitblock128_t arg1);
196template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::popcount(bitblock128_t arg1);
197template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::popcount(bitblock128_t arg1);
198template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::popcount(bitblock128_t arg1);
199template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::popcount(bitblock128_t arg1);
200template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::popcount(bitblock128_t arg1);
201template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::popcount(bitblock128_t arg1);
202template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::popcount(bitblock128_t arg1);
203template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::popcount(bitblock128_t arg1);
204template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::neg(bitblock128_t arg1);
205template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::neg(bitblock128_t arg1);
206template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::neg(bitblock128_t arg1);
207template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::neg(bitblock128_t arg1);
208template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::neg(bitblock128_t arg1);
209template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::neg(bitblock128_t arg1);
210template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::neg(bitblock128_t arg1);
211template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::slli(bitblock128_t arg1);
212template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::slli(bitblock128_t arg1);
213template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::slli(bitblock128_t arg1);
214template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::slli(bitblock128_t arg1);
215template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::slli(bitblock128_t arg1);
216template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::slli(bitblock128_t arg1);
217template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::slli(bitblock128_t arg1);
218template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
219template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
220template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
221template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
222template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
223template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
224template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
225template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3);
226template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::sub(bitblock128_t arg1, bitblock128_t arg2);
227template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::sub(bitblock128_t arg1, bitblock128_t arg2);
228template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::sub(bitblock128_t arg1, bitblock128_t arg2);
229template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::sub(bitblock128_t arg1, bitblock128_t arg2);
230template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::sub(bitblock128_t arg1, bitblock128_t arg2);
231template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::sub(bitblock128_t arg1, bitblock128_t arg2);
232template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::sub(bitblock128_t arg1, bitblock128_t arg2);
233template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sub(bitblock128_t arg1, bitblock128_t arg2);
234template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::add_hl(bitblock128_t arg1);
235template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::add_hl(bitblock128_t arg1);
236template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::add_hl(bitblock128_t arg1);
237template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::add_hl(bitblock128_t arg1);
238template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::add_hl(bitblock128_t arg1);
239template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::add_hl(bitblock128_t arg1);
240template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::add_hl(bitblock128_t arg1);
241template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srl(bitblock128_t arg1, bitblock128_t shift_mask);
242template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srl(bitblock128_t arg1, bitblock128_t shift_mask);
243template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::constant();
244template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::constant();
245template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::constant();
246template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::constant();
247template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::constant();
248template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::constant();
249template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::constant();
250template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::constant();
251template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::min(bitblock128_t arg1, bitblock128_t arg2);
252template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::min(bitblock128_t arg1, bitblock128_t arg2);
253template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::min(bitblock128_t arg1, bitblock128_t arg2);
254template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::min(bitblock128_t arg1, bitblock128_t arg2);
255template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::min(bitblock128_t arg1, bitblock128_t arg2);
256template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::min(bitblock128_t arg1, bitblock128_t arg2);
257template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::min(bitblock128_t arg1, bitblock128_t arg2);
258template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::min(bitblock128_t arg1, bitblock128_t arg2);
[1580]259template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::lomask();
260template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::lomask();
261template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::lomask();
262template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::lomask();
263template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::lomask();
264template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::lomask();
265template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::lomask();
[1539]266template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umin(bitblock128_t arg1, bitblock128_t arg2);
267template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umin(bitblock128_t arg1, bitblock128_t arg2);
268template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umin(bitblock128_t arg1, bitblock128_t arg2);
269template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umin(bitblock128_t arg1, bitblock128_t arg2);
270template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umin(bitblock128_t arg1, bitblock128_t arg2);
271template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umin(bitblock128_t arg1, bitblock128_t arg2);
272template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umin(bitblock128_t arg1, bitblock128_t arg2);
273template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::umin(bitblock128_t arg1, bitblock128_t arg2);
[1580]274template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::abs(bitblock128_t arg1);
275template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::abs(bitblock128_t arg1);
276template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::abs(bitblock128_t arg1);
277template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::abs(bitblock128_t arg1);
278template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::abs(bitblock128_t arg1);
279template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::abs(bitblock128_t arg1);
280template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::abs(bitblock128_t arg1);
[1539]281template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::eq(bitblock128_t arg1, bitblock128_t arg2);
282template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::eq(bitblock128_t arg1, bitblock128_t arg2);
283template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::eq(bitblock128_t arg1, bitblock128_t arg2);
284template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::eq(bitblock128_t arg1, bitblock128_t arg2);
285template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::eq(bitblock128_t arg1, bitblock128_t arg2);
286template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::eq(bitblock128_t arg1, bitblock128_t arg2);
287template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::eq(bitblock128_t arg1, bitblock128_t arg2);
288template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::eq(bitblock128_t arg1, bitblock128_t arg2);
289template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::srai(bitblock128_t arg1);
290template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::srai(bitblock128_t arg1);
291template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::srai(bitblock128_t arg1);
292template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::srai(bitblock128_t arg1);
293template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::srai(bitblock128_t arg1);
294template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srai(bitblock128_t arg1);
295template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srai(bitblock128_t arg1);
296template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::himask();
297template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::himask();
298template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::himask();
299template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::himask();
300template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::himask();
301template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::himask();
302template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::himask();
303template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::add(bitblock128_t arg1, bitblock128_t arg2);
304template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::add(bitblock128_t arg1, bitblock128_t arg2);
305template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::add(bitblock128_t arg1, bitblock128_t arg2);
306template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::add(bitblock128_t arg1, bitblock128_t arg2);
307template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::add(bitblock128_t arg1, bitblock128_t arg2);
308template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::add(bitblock128_t arg1, bitblock128_t arg2);
309template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::add(bitblock128_t arg1, bitblock128_t arg2);
310template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::add(bitblock128_t arg1, bitblock128_t arg2);
[1580]311template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umax(bitblock128_t arg1, bitblock128_t arg2);
312template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umax(bitblock128_t arg1, bitblock128_t arg2);
313template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umax(bitblock128_t arg1, bitblock128_t arg2);
314template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umax(bitblock128_t arg1, bitblock128_t arg2);
315template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umax(bitblock128_t arg1, bitblock128_t arg2);
316template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umax(bitblock128_t arg1, bitblock128_t arg2);
317template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umax(bitblock128_t arg1, bitblock128_t arg2);
318template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::umax(bitblock128_t arg1, bitblock128_t arg2);
[1539]319template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
320template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
321template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
322template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
323template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
324template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
325template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::umin_hl(bitblock128_t arg1, bitblock128_t arg2);
326template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
327template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
328template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
329template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
330template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
331template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
332template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::add_hl(bitblock128_t arg1, bitblock128_t arg2);
333template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packss(bitblock128_t arg1, bitblock128_t arg2);
334template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packss(bitblock128_t arg1, bitblock128_t arg2);
335template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packss(bitblock128_t arg1, bitblock128_t arg2);
336template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packss(bitblock128_t arg1, bitblock128_t arg2);
337template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packss(bitblock128_t arg1, bitblock128_t arg2);
338template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packss(bitblock128_t arg1, bitblock128_t arg2);
339template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packss(bitblock128_t arg1, bitblock128_t arg2);
340template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<4>::signmask(bitblock128_t arg1);
341template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<8>::signmask(bitblock128_t arg1);
342template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<16>::signmask(bitblock128_t arg1);
343template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<32>::signmask(bitblock128_t arg1);
344template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<64>::signmask(bitblock128_t arg1);
345template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<128>::signmask(bitblock128_t arg1);
346template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packl(bitblock128_t arg1, bitblock128_t arg2);
347template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packl(bitblock128_t arg1, bitblock128_t arg2);
348template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packl(bitblock128_t arg1, bitblock128_t arg2);
349template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packl(bitblock128_t arg1, bitblock128_t arg2);
350template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packl(bitblock128_t arg1, bitblock128_t arg2);
351template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packl(bitblock128_t arg1, bitblock128_t arg2);
352template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packl(bitblock128_t arg1, bitblock128_t arg2);
353template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packh(bitblock128_t arg1, bitblock128_t arg2);
354template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packh(bitblock128_t arg1, bitblock128_t arg2);
355template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packh(bitblock128_t arg1, bitblock128_t arg2);
356template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packh(bitblock128_t arg1, bitblock128_t arg2);
357template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packh(bitblock128_t arg1, bitblock128_t arg2);
358template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packh(bitblock128_t arg1, bitblock128_t arg2);
359template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packh(bitblock128_t arg1, bitblock128_t arg2);
360template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
361template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
362template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
363template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
364template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
365template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
366template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::min_hl(bitblock128_t arg1, bitblock128_t arg2);
367template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packus(bitblock128_t arg1, bitblock128_t arg2);
368template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packus(bitblock128_t arg1, bitblock128_t arg2);
369template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packus(bitblock128_t arg1, bitblock128_t arg2);
370template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packus(bitblock128_t arg1, bitblock128_t arg2);
371template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packus(bitblock128_t arg1, bitblock128_t arg2);
372template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packus(bitblock128_t arg1, bitblock128_t arg2);
373template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packus(bitblock128_t arg1, bitblock128_t arg2);
374template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::mergel(bitblock128_t arg1, bitblock128_t arg2);
375template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::mergel(bitblock128_t arg1, bitblock128_t arg2);
376template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::mergel(bitblock128_t arg1, bitblock128_t arg2);
377template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::mergel(bitblock128_t arg1, bitblock128_t arg2);
378template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::mergel(bitblock128_t arg1, bitblock128_t arg2);
379template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::mergel(bitblock128_t arg1, bitblock128_t arg2);
380template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::mergel(bitblock128_t arg1, bitblock128_t arg2);
381template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
382template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
383template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
384template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
385template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
386template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
387template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::mergeh(bitblock128_t arg1, bitblock128_t arg2);
388template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::zeroextendh(bitblock128_t arg1);
389template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::zeroextendh(bitblock128_t arg1);
390template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::zeroextendh(bitblock128_t arg1);
391template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::zeroextendh(bitblock128_t arg1);
392template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::zeroextendh(bitblock128_t arg1);
393template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::zeroextendh(bitblock128_t arg1);
394template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::zeroextendh(bitblock128_t arg1);
395template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::zeroextendl(bitblock128_t arg1);
396template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::zeroextendl(bitblock128_t arg1);
397template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::zeroextendl(bitblock128_t arg1);
398template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::zeroextendl(bitblock128_t arg1);
399template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::zeroextendl(bitblock128_t arg1);
400template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::zeroextendl(bitblock128_t arg1);
401template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::zeroextendl(bitblock128_t arg1);
402template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::signextendh(bitblock128_t arg1);
403template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::signextendh(bitblock128_t arg1);
404template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::signextendh(bitblock128_t arg1);
405template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::signextendh(bitblock128_t arg1);
406template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::signextendh(bitblock128_t arg1);
407template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::signextendh(bitblock128_t arg1);
408template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::signextendh(bitblock128_t arg1);
409template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::signextendl(bitblock128_t arg1);
410template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::signextendl(bitblock128_t arg1);
411template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::signextendl(bitblock128_t arg1);
412template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::signextendl(bitblock128_t arg1);
413template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::signextendl(bitblock128_t arg1);
414template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::signextendl(bitblock128_t arg1);
415template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::signextendl(bitblock128_t arg1);
416template <> template <uint64_t msk> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::shufflei(bitblock128_t arg1);
417template <> template <uint64_t msk> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::shufflei(bitblock128_t arg1);
418template <> template <uint64_t msk> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::shufflei(bitblock128_t arg1);
419template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
420template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
421template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
422template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
423template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
424template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
425template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::dsrli(bitblock128_t arg1, bitblock128_t arg2);
426template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill(uint64_t val1);
427template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill(uint64_t val1);
428template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill(uint64_t val1);
429template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill(uint64_t val1);
430template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill(uint64_t val1);
431template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill(uint64_t val1);
432template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::fill(uint64_t val1);
433template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::fill(uint64_t val1);
434template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<1>::extract(bitblock128_t arg1);
435template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<2>::extract(bitblock128_t arg1);
436template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<4>::extract(bitblock128_t arg1);
437template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<8>::extract(bitblock128_t arg1);
438template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<16>::extract(bitblock128_t arg1);
439template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<32>::extract(bitblock128_t arg1);
440template <> template <uint64_t pos> IDISA_ALWAYS_INLINE uint64_t mvmd128<64>::extract(bitblock128_t arg1);
441template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::splat(bitblock128_t arg1);
442template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::splat(bitblock128_t arg1);
443template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::splat(bitblock128_t arg1);
444template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::splat(bitblock128_t arg1);
445template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::splat(bitblock128_t arg1);
446template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::splat(bitblock128_t arg1);
447template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::splat(bitblock128_t arg1);
448template <> template <uint64_t pos> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::splat(bitblock128_t arg1);
449template <> 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);
450template <> 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);
451template <> 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);
452template <> 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);
453template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
454template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
455template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
456template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
457template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
458template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill4(uint64_t val1, uint64_t val2, uint64_t val3, uint64_t val4);
459template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::srli(bitblock128_t arg1);
460template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::srli(bitblock128_t arg1);
461template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::srli(bitblock128_t arg1);
462template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::srli(bitblock128_t arg1);
463template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::srli(bitblock128_t arg1);
464template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::srli(bitblock128_t arg1);
465template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::srli(bitblock128_t arg1);
466template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<1>::fill2(uint64_t val1, uint64_t val2);
467template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::fill2(uint64_t val1, uint64_t val2);
468template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::fill2(uint64_t val1, uint64_t val2);
469template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::fill2(uint64_t val1, uint64_t val2);
470template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::fill2(uint64_t val1, uint64_t val2);
471template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::fill2(uint64_t val1, uint64_t val2);
472template <> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::fill2(uint64_t val1, uint64_t val2);
473template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::dslli(bitblock128_t arg1, bitblock128_t arg2);
474template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::dslli(bitblock128_t arg1, bitblock128_t arg2);
475template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::dslli(bitblock128_t arg1, bitblock128_t arg2);
476template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::dslli(bitblock128_t arg1, bitblock128_t arg2);
477template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::dslli(bitblock128_t arg1, bitblock128_t arg2);
478template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::dslli(bitblock128_t arg1, bitblock128_t arg2);
479template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::dslli(bitblock128_t arg1, bitblock128_t arg2);
[1580]480template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<2>::slli(bitblock128_t arg1);
481template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<4>::slli(bitblock128_t arg1);
482template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<8>::slli(bitblock128_t arg1);
483template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<16>::slli(bitblock128_t arg1);
484template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<32>::slli(bitblock128_t arg1);
485template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<64>::slli(bitblock128_t arg1);
486template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t mvmd128<128>::slli(bitblock128_t arg1);
[1539]487template <> 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);
488template <> 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);
489template <> 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);
490template <> 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);
491template <> 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);
492
493//Implementation Part
494
495#define shufflemask4(s1, s2, s3, s4) \
496        ((s1<<6) | (s2<<4) | (s3<<2) | s4)
497
498#define shufflemask4_from_shufflemask2(msk) \
499        (msk==3 ? 238 : (msk==2 ? 228 : (msk==1 ? 78 : 68)))
500
501#define shufflemask8_to_shufflemask4(msk) \
502        ((msk&3) | (((msk>>3)&3)<<2) | (((msk>>6)&3)<<4) | (((msk>>9)&3)<<6) | (((msk>>12)&3)<<8) | (((msk>>15)&3)<<10) | (((msk>>18)&3)<<12) | (((msk>>21)&3)<<14))
[1767]503//The total number of operations is 2.0
[1539]504IDISA_ALWAYS_INLINE bitblock128_t simd_nor(bitblock128_t arg1, bitblock128_t arg2)
505{
506        return simd_not(simd_or(arg1, arg2));
507}
508
[1767]509//The total number of operations is 1.0
[1539]510IDISA_ALWAYS_INLINE bitblock128_t simd_not(bitblock128_t arg1)
511{
512        return simd_xor(arg1, simd128<32>::constant<-1>());
513}
514
[1767]515//The total number of operations is 1.0
[1539]516IDISA_ALWAYS_INLINE bitblock128_t simd_andc(bitblock128_t arg1, bitblock128_t arg2)
517{
518        return _mm_andnot_si128(arg2, arg1);
519}
520
[1767]521//The total number of operations is 1.0
[1539]522IDISA_ALWAYS_INLINE bitblock128_t simd_or(bitblock128_t arg1, bitblock128_t arg2)
523{
524        return _mm_or_si128(arg1, arg2);
525}
526
[1767]527//The total number of operations is 1.0
[1740]528IDISA_ALWAYS_INLINE bitblock128_t simd_and(bitblock128_t arg1, bitblock128_t arg2)
[1539]529{
[1740]530        return _mm_and_si128(arg1, arg2);
[1539]531}
532
[1767]533//The total number of operations is 1.0
[1740]534IDISA_ALWAYS_INLINE bitblock128_t simd_xor(bitblock128_t arg1, bitblock128_t arg2)
[1539]535{
[1740]536        return _mm_xor_si128(arg1, arg2);
[1539]537}
538
[1767]539//The total number of operations is 1.0
[1539]540template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::max(bitblock128_t arg1, bitblock128_t arg2)
541{
[1573]542        return simd_and(arg1, arg2);
[1539]543}
544
[1767]545//The total number of operations is 15.6666666667
[1539]546template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::max(bitblock128_t arg1, bitblock128_t arg2)
547{
[1767]548        return simd128<1>::ifh(simd128<2>::himask(), simd_and(arg1, arg2), simd_or(simd_and(arg2, simd128<128>::srli<1>(simd_or(arg1, simd_not(arg2)))), simd_and(arg1, simd128<128>::srli<1>(simd_or(simd_not(arg1), arg2)))));
[1539]549}
550
[1767]551//The total number of operations is 9.0
[1539]552template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::max(bitblock128_t arg1, bitblock128_t arg2)
553{
554        bitblock128_t high_bit = simd128<4>::constant<(8)>();
555        return simd_xor(simd128<4>::umax(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
556}
557
[1767]558//The total number of operations is 4.0
[1539]559template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::max(bitblock128_t arg1, bitblock128_t arg2)
560{
561        return simd128<1>::ifh(simd128<8>::gt(arg1, arg2), arg1, arg2);
562}
563
[1767]564//The total number of operations is 1.0
[1539]565template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::max(bitblock128_t arg1, bitblock128_t arg2)
566{
567        return _mm_max_epi16(arg1, arg2);
568}
569
[1767]570//The total number of operations is 4.0
[1539]571template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::max(bitblock128_t arg1, bitblock128_t arg2)
572{
573        return simd128<1>::ifh(simd128<32>::gt(arg1, arg2), arg1, arg2);
574}
575
[1767]576//The total number of operations is 17.5
[1539]577template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::max(bitblock128_t arg1, bitblock128_t arg2)
578{
579        return simd128<1>::ifh(simd128<64>::gt(arg1, arg2), arg1, arg2);
580}
581
[1767]582//The total number of operations is 54.75
[1539]583template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::max(bitblock128_t arg1, bitblock128_t arg2)
584{
[1740]585        return simd128<1>::ifh(simd128<128>::gt(arg1, arg2), arg1, arg2);
[1539]586}
587
[1767]588//The total number of operations is 1.0
[1539]589template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::mult(bitblock128_t arg1, bitblock128_t arg2)
590{
[1573]591        return simd_and(arg1, arg2);
[1539]592}
593
[1767]594//The total number of operations is 19.6666666667
[1539]595template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::mult(bitblock128_t arg1, bitblock128_t arg2)
596{
597        bitblock128_t tmp1 = simd128<128>::slli<1>(arg1);
598        bitblock128_t tmp2 = simd128<128>::slli<1>(arg2);
599        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));
600}
601
[1767]602//The total number of operations is 31.0
[1539]603template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::mult(bitblock128_t arg1, bitblock128_t arg2)
604{
605        bitblock128_t loMask = simd128<(8)>::lomask();
606        bitblock128_t tmpAns1 = simd128<(8)>::mult(simd_and(loMask, arg1), simd_and(loMask, arg2));
607        bitblock128_t tmpAns2 = simd128<(8)>::mult(simd128<(8)>::srli<4>(arg1), simd128<(8)>::srli<4>(arg2));
608        return simd128<1>::ifh(loMask, tmpAns1, simd128<(8)>::slli<4>(tmpAns2));
609}
610
[1767]611//The total number of operations is 10.0
[1539]612template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::mult(bitblock128_t arg1, bitblock128_t arg2)
613{
614        bitblock128_t loMask = simd128<(16)>::lomask();
615        bitblock128_t tmpAns1 = simd128<(16)>::mult(simd_and(loMask, arg1), simd_and(loMask, arg2));
616        bitblock128_t tmpAns2 = simd128<(16)>::mult(simd128<(16)>::srli<8>(arg1), simd128<(16)>::srli<8>(arg2));
617        return simd128<1>::ifh(loMask, tmpAns1, simd128<(16)>::slli<8>(tmpAns2));
618}
619
[1767]620//The total number of operations is 1.0
[1539]621template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::mult(bitblock128_t arg1, bitblock128_t arg2)
622{
623        return _mm_mullo_epi16(arg1, arg2);
624}
625
[1767]626//The total number of operations is 30.0
[1539]627template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::mult(bitblock128_t arg1, bitblock128_t arg2)
628{
629        bitblock128_t loMask = simd128<(64)>::lomask();
630        bitblock128_t tmpAns1 = simd128<(64)>::mult(simd_and(loMask, arg1), simd_and(loMask, arg2));
631        bitblock128_t tmpAns2 = simd128<(64)>::mult(simd128<(64)>::srli<32>(arg1), simd128<(64)>::srli<32>(arg2));
632        return simd128<1>::ifh(loMask, tmpAns1, simd128<(64)>::slli<32>(tmpAns2));
633}
634
[1767]635//The total number of operations is 11.0
[1539]636template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::mult(bitblock128_t arg1, bitblock128_t arg2)
637{
638        bitblock128_t loMask = simd128<64>::lomask();
639        bitblock128_t arg1_low = simd_and(arg1, loMask);
640        bitblock128_t arg1_high = simd128<64>::srli<(32)>(arg1);
641        bitblock128_t arg2_low = simd_and(arg2, loMask);
642        bitblock128_t arg2_high = simd128<64>::srli<(32)>(arg2);
643        bitblock128_t tmpAns1 = simd128<(32)>::umult(arg1_low, arg2_low);
644        bitblock128_t tmpAns2 = simd128<64>::slli<(32)>(simd128<(32)>::umult(arg1_low, arg2_high));
645        bitblock128_t tmpAns3 = simd128<64>::slli<(32)>(simd128<(32)>::umult(arg1_high, arg2_low));
646        return simd128<64>::add(tmpAns1, simd128<64>::add(tmpAns2, tmpAns3));
647}
648
[1767]649//The total number of operations is 165.0
[1539]650template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::mult(bitblock128_t arg1, bitblock128_t arg2)
651{
652        bitblock128_t loMask = simd128<128>::lomask();
653        bitblock128_t arg1_low = simd_and(arg1, loMask);
654        bitblock128_t arg1_high = simd128<128>::srli<(64)>(arg1);
655        bitblock128_t arg2_low = simd_and(arg2, loMask);
656        bitblock128_t arg2_high = simd128<128>::srli<(64)>(arg2);
657        bitblock128_t tmpAns1 = simd128<(64)>::umult(arg1_low, arg2_low);
658        bitblock128_t tmpAns2 = simd128<128>::slli<(64)>(simd128<(64)>::umult(arg1_low, arg2_high));
659        bitblock128_t tmpAns3 = simd128<128>::slli<(64)>(simd128<(64)>::umult(arg1_high, arg2_low));
660        return simd128<128>::add(tmpAns1, simd128<128>::add(tmpAns2, tmpAns3));
661}
662
[1767]663//The total number of operations is 1.0
[1539]664template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::gt(bitblock128_t arg1, bitblock128_t arg2)
665{
[1573]666        return simd_andc(arg2, arg1);
[1539]667}
668
[1767]669//The total number of operations is 14.6666666667
[1539]670template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::gt(bitblock128_t arg1, bitblock128_t arg2)
671{
[1767]672        bitblock128_t tmp = simd_not(arg1);
673        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)));
674        return simd128<1>::ifh(simd128<2>::himask(), tmpAns, simd128<128>::srli<1>(tmpAns));
[1539]675}
676
[1767]677//The total number of operations is 10.0
[1539]678template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::gt(bitblock128_t arg1, bitblock128_t arg2)
679{
680        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)));
681}
682
[1767]683//The total number of operations is 1.0
[1539]684template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::gt(bitblock128_t arg1, bitblock128_t arg2)
685{
686        return _mm_cmpgt_epi8(arg1, arg2);
687}
688
[1767]689//The total number of operations is 1.0
[1539]690template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::gt(bitblock128_t arg1, bitblock128_t arg2)
691{
692        return _mm_cmpgt_epi16(arg1, arg2);
693}
694
[1767]695//The total number of operations is 1.0
[1539]696template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::gt(bitblock128_t arg1, bitblock128_t arg2)
697{
698        return _mm_cmpgt_epi32(arg1, arg2);
699}
700
[1767]701//The total number of operations is 14.5
[1539]702template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::gt(bitblock128_t arg1, bitblock128_t arg2)
703{
704        bitblock128_t hiAns = simd128<(32)>::gt(arg1, arg2);
705        bitblock128_t loAns = simd128<(32)>::ugt(arg1, arg2);
706        bitblock128_t mask = simd_and(loAns, simd128<64>::srli<(32)>(simd128<(32)>::eq(arg1, arg2)));
707        mask = simd_or(mask, simd128<64>::slli<(32)>(mask));
708        return simd_or(simd128<64>::srai<(32)>(hiAns), mask);
709}
710
[1767]711//The total number of operations is 51.75
[1539]712template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::gt(bitblock128_t arg1, bitblock128_t arg2)
713{
714        bitblock128_t hiAns = simd128<(64)>::gt(arg1, arg2);
715        bitblock128_t loAns = simd128<(64)>::ugt(arg1, arg2);
716        bitblock128_t mask = simd_and(loAns, simd128<128>::srli<(64)>(simd128<(64)>::eq(arg1, arg2)));
717        mask = simd_or(mask, simd128<128>::slli<(64)>(mask));
718        return simd_or(simd128<128>::srai<(64)>(hiAns), mask);
719}
720
[1767]721//The total number of operations is 289.0
[1539]722template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umult(bitblock128_t arg1, bitblock128_t arg2)
723{
724        bitblock128_t loMask = simd128<(2)>::lomask();
725        bitblock128_t tmpAns1 = simd128<(2)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
726        bitblock128_t tmpAns2 = simd128<(2)>::umult(simd_and(loMask, simd128<(4)>::srli<(2)>(arg1)), simd_and(loMask, simd128<(4)>::srli<(2)>(arg2)));
727        return simd_or(tmpAns1, simd128<(4)>::slli<(2)>(tmpAns2));
728}
729
[1767]730//The total number of operations is 139.0
[1539]731template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umult(bitblock128_t arg1, bitblock128_t arg2)
732{
733        bitblock128_t loMask = simd128<(4)>::lomask();
734        bitblock128_t tmpAns1 = simd128<(4)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
735        bitblock128_t tmpAns2 = simd128<(4)>::umult(simd_and(loMask, simd128<(8)>::srli<(4)>(arg1)), simd_and(loMask, simd128<(8)>::srli<(4)>(arg2)));
736        return simd_or(tmpAns1, simd128<(8)>::slli<(4)>(tmpAns2));
737}
738
[1767]739//The total number of operations is 64.0
[1539]740template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umult(bitblock128_t arg1, bitblock128_t arg2)
741{
742        bitblock128_t loMask = simd128<(8)>::lomask();
743        bitblock128_t tmpAns1 = simd128<(8)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
744        bitblock128_t tmpAns2 = simd128<(8)>::umult(simd_and(loMask, simd128<(16)>::srli<(8)>(arg1)), simd_and(loMask, simd128<(16)>::srli<(8)>(arg2)));
745        return simd_or(tmpAns1, simd128<(16)>::slli<(8)>(tmpAns2));
746}
747
[1767]748//The total number of operations is 28.0
[1539]749template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umult(bitblock128_t arg1, bitblock128_t arg2)
750{
751        bitblock128_t loMask = simd128<(16)>::lomask();
752        bitblock128_t tmpAns1 = simd128<(16)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
753        bitblock128_t tmpAns2 = simd128<(16)>::umult(simd_and(loMask, simd128<(32)>::srli<(16)>(arg1)), simd_and(loMask, simd128<(32)>::srli<(16)>(arg2)));
754        return simd_or(tmpAns1, simd128<(32)>::slli<(16)>(tmpAns2));
755}
756
[1767]757//The total number of operations is 10.0
[1539]758template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umult(bitblock128_t arg1, bitblock128_t arg2)
759{
760        bitblock128_t loMask = simd128<(32)>::lomask();
761        bitblock128_t tmpAns1 = simd128<(32)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
762        bitblock128_t tmpAns2 = simd128<(32)>::umult(simd_and(loMask, simd128<(64)>::srli<(32)>(arg1)), simd_and(loMask, simd128<(64)>::srli<(32)>(arg2)));
763        return simd_or(tmpAns1, simd128<(64)>::slli<(32)>(tmpAns2));
764}
765
[1767]766//The total number of operations is 1.0
[1539]767template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umult(bitblock128_t arg1, bitblock128_t arg2)
768{
769        return _mm_mul_epu32(arg1, arg2);
770}
771
[1767]772//The total number of operations is 45.0
[1539]773template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umult(bitblock128_t arg1, bitblock128_t arg2)
774{
775        bitblock128_t loMask1 = simd128<(128)>::lomask();
776        bitblock128_t arg11 = simd_and(arg1, loMask1);
777        bitblock128_t arg22 = simd_and(arg2, loMask1);
778        bitblock128_t loMask2 = simd128<64>::lomask();
779        bitblock128_t arg1_low = simd_and(arg11, loMask2);
780        bitblock128_t arg1_high = simd128<64>::srli<(32)>(arg11);
781        bitblock128_t arg2_low = simd_and(arg22, loMask2);
782        bitblock128_t arg2_high = simd128<64>::srli<(32)>(arg22);
783        bitblock128_t tmpAns1 = simd128<(32)>::umult(arg1_low, arg2_low);
784        bitblock128_t tmpAns2 = simd128<(128)>::slli<(32)>(simd128<(32)>::umult(arg1_low, arg2_high));
785        bitblock128_t tmpAns3 = simd128<(128)>::slli<(32)>(simd128<(32)>::umult(arg1_high, arg2_low));
786        bitblock128_t tmpAns4 = simd128<(128)>::slli<64>(simd128<(32)>::umult(arg1_high, arg2_high));
787        return simd128<(128)>::add(tmpAns1, simd128<(128)>::add(tmpAns2, simd128<(128)>::add(tmpAns3, tmpAns4)));
788}
789
[1767]790//The total number of operations is 1.0
[1539]791template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ult(bitblock128_t arg1, bitblock128_t arg2)
792{
[1573]793        return simd_andc(arg2, arg1);
[1539]794}
795
[1767]796//The total number of operations is 13.6666666667
[1539]797template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ult(bitblock128_t arg1, bitblock128_t arg2)
798{
[1767]799        bitblock128_t tmp = simd_not(arg1);
800        bitblock128_t tmpAns = simd_or(simd_and(tmp, arg2), simd_and(simd128<128>::slli<1>(simd_and(tmp, arg2)), simd_or(tmp, arg2)));
801        return simd128<1>::ifh(simd128<2>::himask(), tmpAns, simd128<128>::srli<1>(tmpAns));
[1539]802}
803
[1767]804//The total number of operations is 20.0
[1539]805template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ult(bitblock128_t arg1, bitblock128_t arg2)
806{
[1557]807        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ult(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::ult(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
[1539]808}
809
[1767]810//The total number of operations is 7.0
[1539]811template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ult(bitblock128_t arg1, bitblock128_t arg2)
812{
813        bitblock128_t high_bit = simd128<8>::constant<(128)>();
814        return simd128<8>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
815}
816
[1767]817//The total number of operations is 7.0
[1539]818template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ult(bitblock128_t arg1, bitblock128_t arg2)
819{
820        bitblock128_t high_bit = simd128<16>::constant<(32768)>();
821        return simd128<16>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
822}
823
[1767]824//The total number of operations is 7.0
[1539]825template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ult(bitblock128_t arg1, bitblock128_t arg2)
826{
[1740]827        bitblock128_t high_bit = simd128<32>::constant<(2147483648ULL)>();
[1539]828        return simd128<32>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
829}
830
[1767]831//The total number of operations is 17.5
[1539]832template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ult(bitblock128_t arg1, bitblock128_t arg2)
833{
834        bitblock128_t tmpAns = simd128<(32)>::ult(arg1, arg2);
835        bitblock128_t mask = simd_and(tmpAns, simd128<64>::srli<(32)>(simd128<(32)>::eq(arg1, arg2)));
836        mask = simd_or(mask, simd128<64>::slli<(32)>(mask));
837        return simd_or(simd128<64>::srai<(32)>(tmpAns), mask);
838}
839
[1767]840//The total number of operations is 40.0833333333
[1539]841template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ult(bitblock128_t arg1, bitblock128_t arg2)
842{
843        return simd_and(simd128<128>::srai<(127)>(simd_or(simd_and(simd_not(arg1), arg2), simd_and(simd_not(simd_xor(arg1, arg2)), simd128<128>::sub(arg1, arg2)))), simd_not(simd128<128>::eq(arg1, arg2)));
844}
845
[1767]846//The total number of operations is 1.0
[1539]847template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::lt(bitblock128_t arg1, bitblock128_t arg2)
848{
[1573]849        return simd_andc(arg1, arg2);
[1539]850}
851
[1767]852//The total number of operations is 14.6666666667
[1539]853template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::lt(bitblock128_t arg1, bitblock128_t arg2)
854{
[1767]855        bitblock128_t tmp = simd_not(arg2);
856        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)));
857        return simd128<1>::ifh(simd128<2>::himask(), tmpAns, simd128<128>::srli<1>(tmpAns));
[1539]858}
859
[1767]860//The total number of operations is 18.0
[1539]861template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::lt(bitblock128_t arg1, bitblock128_t arg2)
862{
863        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)));
864}
865
[1767]866//The total number of operations is 5.0
[1539]867template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::lt(bitblock128_t arg1, bitblock128_t arg2)
868{
869        return simd_and(simd_not(simd128<8>::gt(arg1, arg2)), simd_not(simd128<8>::eq(arg1, arg2)));
870}
871
[1767]872//The total number of operations is 5.0
[1539]873template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::lt(bitblock128_t arg1, bitblock128_t arg2)
874{
875        return simd_and(simd_not(simd128<16>::gt(arg1, arg2)), simd_not(simd128<16>::eq(arg1, arg2)));
876}
877
[1767]878//The total number of operations is 5.0
[1539]879template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::lt(bitblock128_t arg1, bitblock128_t arg2)
880{
881        return simd_and(simd_not(simd128<32>::gt(arg1, arg2)), simd_not(simd128<32>::eq(arg1, arg2)));
882}
883
[1767]884//The total number of operations is 19.5
[1539]885template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::lt(bitblock128_t arg1, bitblock128_t arg2)
886{
[1740]887        bitblock128_t high_bit = simd128<64>::constant<(9223372036854775808ULL)>();
[1539]888        return simd128<64>::ult(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
889}
890
[1767]891//The total number of operations is 60.75
[1539]892template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::lt(bitblock128_t arg1, bitblock128_t arg2)
893{
894        bitblock128_t hiAns = simd128<(64)>::lt(arg1, arg2);
895        bitblock128_t loAns = simd128<(64)>::ult(arg1, arg2);
896        bitblock128_t mask = simd_and(loAns, simd128<128>::srli<(64)>(simd128<(64)>::eq(arg1, arg2)));
897        mask = simd_or(mask, simd128<128>::slli<(64)>(mask));
898        return simd_or(simd128<128>::srai<(64)>(hiAns), mask);
899}
900
[1767]901//The total number of operations is 2.0
[1539]902template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::srli(bitblock128_t arg1)
903{
904        return simd_and(simd128<32>::srli<sh>(arg1), simd128<2>::constant<((3)>>sh)>());
905}
906
[1767]907//The total number of operations is 2.0
[1539]908template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::srli(bitblock128_t arg1)
909{
910        return simd_and(simd128<32>::srli<sh>(arg1), simd128<4>::constant<((15)>>sh)>());
911}
912
[1767]913//The total number of operations is 2.0
[1539]914template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::srli(bitblock128_t arg1)
915{
916        return simd_and(simd128<32>::srli<sh>(arg1), simd128<8>::constant<((255)>>sh)>());
917}
918
[1767]919//The total number of operations is 1.0
[1539]920template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::srli(bitblock128_t arg1)
921{
922        return _mm_srli_epi16(arg1, (int32_t)(sh));
923}
924
[1767]925//The total number of operations is 1.0
[1539]926template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::srli(bitblock128_t arg1)
927{
928        return _mm_srli_epi32(arg1, (int32_t)(sh));
929}
930
[1767]931//The total number of operations is 1.0
[1539]932template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srli(bitblock128_t arg1)
933{
934        return _mm_srli_epi64(arg1, (int32_t)(sh));
935}
936
[1767]937//The total number of operations is 2.33333333333
[1539]938template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srli(bitblock128_t arg1)
939{
940        return (((sh%8) == 0) ? _mm_srli_si128(arg1, (int32_t)((sh/8))) : ((sh >= 64) ? simd128<64>::srli<(sh-64)>(_mm_srli_si128(arg1, (int32_t)(8))) : simd_or(simd128<64>::srli<sh>(arg1), _mm_srli_si128(simd128<64>::slli<(64-sh)>(arg1), (int32_t)(8)))));
941}
942
[1767]943//The total number of operations is 1.0
[1539]944template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ctz(bitblock128_t arg1)
945{
946        return simd_not(arg1);
947}
948
[1767]949//The total number of operations is 10.6666666667
[1539]950template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ctz(bitblock128_t arg1)
951{
952        bitblock128_t tmp = simd_not(arg1);
953        return simd128<1>::ifh(simd128<2>::himask(), simd_and(tmp, simd128<128>::slli<1>(tmp)), simd_and(simd128<128>::srli<1>(arg1), tmp));
954}
955
[1767]956//The total number of operations is 14.0
[1539]957template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ctz(bitblock128_t arg1)
958{
959        return simd128<4>::popcount(simd_andc(simd128<4>::sub(arg1, simd128<4>::constant<1>()), arg1));
960}
961
[1767]962//The total number of operations is 13.0
[1539]963template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ctz(bitblock128_t arg1)
964{
965        return simd128<8>::popcount(simd_andc(simd128<8>::sub(arg1, simd128<8>::constant<1>()), arg1));
966}
967
[1767]968//The total number of operations is 16.0
[1539]969template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ctz(bitblock128_t arg1)
970{
971        return simd128<16>::popcount(simd_andc(simd128<16>::sub(arg1, simd128<16>::constant<1>()), arg1));
972}
973
[1767]974//The total number of operations is 19.0
[1539]975template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ctz(bitblock128_t arg1)
976{
977        return simd128<32>::popcount(simd_andc(simd128<32>::sub(arg1, simd128<32>::constant<1>()), arg1));
978}
979
[1767]980//The total number of operations is 14.0
[1539]981template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ctz(bitblock128_t arg1)
982{
983        return simd128<64>::popcount(simd_andc(simd128<64>::sub(arg1, simd128<64>::constant<1>()), arg1));
984}
985
[1767]986//The total number of operations is 26.6666666667
[1539]987template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ctz(bitblock128_t arg1)
988{
989        return simd128<128>::popcount(simd_andc(simd128<128>::sub(arg1, simd128<128>::constant<1>()), arg1));
990}
991
[1923]992//The total number of operations is 10.0
[1539]993template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::sll(bitblock128_t arg1, bitblock128_t shift_mask)
994{
[1923]995        return simd128<1>::ifh(simd128<128>::himask(), _mm_sll_epi64(arg1, simd_and(_mm_srli_si128(shift_mask, (int32_t)(8)), _mm_cvtsi32_si128((int32_t)(63)))), _mm_sll_epi64(arg1, simd_and(shift_mask, _mm_cvtsi32_si128((int32_t)(63)))));
[1539]996}
997
[1924]998//The total number of operations is 13.0
[1539]999template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sll(bitblock128_t arg1, bitblock128_t shift_mask)
1000{
[1924]1001        bitblock128_t shift = simd_and(shift_mask, _mm_cvtsi32_si128((int32_t)(127)));
1002        return simd_or(_mm_sll_epi64(arg1, shift), simd_or(_mm_slli_si128(_mm_sll_epi64(arg1, simd128<32>::sub(shift, _mm_cvtsi32_si128((int32_t)(64)))), (int32_t)(8)), _mm_slli_si128(_mm_srl_epi64(arg1, simd128<32>::sub(_mm_cvtsi32_si128((int32_t)(64)), shift)), (int32_t)(8))));
[1539]1003}
1004
[1767]1005//The total number of operations is 1.0
[1539]1006template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ugt(bitblock128_t arg1, bitblock128_t arg2)
1007{
[1573]1008        return simd_andc(arg1, arg2);
[1539]1009}
1010
[1767]1011//The total number of operations is 13.6666666667
[1539]1012template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ugt(bitblock128_t arg1, bitblock128_t arg2)
1013{
[1767]1014        bitblock128_t tmp = simd_not(arg2);
1015        bitblock128_t tmpAns = simd_or(simd_and(arg1, tmp), simd_and(simd128<128>::slli<1>(simd_and(arg1, tmp)), simd_or(arg1, tmp)));
1016        return simd128<1>::ifh(simd128<2>::himask(), tmpAns, simd128<128>::srli<1>(tmpAns));
[1539]1017}
1018
[1767]1019//The total number of operations is 12.0
[1539]1020template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ugt(bitblock128_t arg1, bitblock128_t arg2)
1021{
[1557]1022        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::ugt(simd_and(simd128<(8)>::himask(), arg1), arg2), simd128<(8)>::ugt(simd_andc(arg1, simd128<(8)>::himask()), simd_andc(arg2, simd128<(8)>::himask())));
[1539]1023}
1024
[1767]1025//The total number of operations is 3.0
[1539]1026template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ugt(bitblock128_t arg1, bitblock128_t arg2)
1027{
1028        bitblock128_t high_bit = simd128<8>::constant<(128)>();
1029        return simd128<8>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
1030}
1031
[1767]1032//The total number of operations is 3.0
[1539]1033template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ugt(bitblock128_t arg1, bitblock128_t arg2)
1034{
1035        bitblock128_t high_bit = simd128<16>::constant<(32768)>();
1036        return simd128<16>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
1037}
1038
[1767]1039//The total number of operations is 3.0
[1539]1040template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ugt(bitblock128_t arg1, bitblock128_t arg2)
1041{
[1740]1042        bitblock128_t high_bit = simd128<32>::constant<(2147483648ULL)>();
[1539]1043        return simd128<32>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
1044}
1045
[1767]1046//The total number of operations is 13.5
[1539]1047template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ugt(bitblock128_t arg1, bitblock128_t arg2)
1048{
1049        bitblock128_t tmpAns = simd128<(32)>::ugt(arg1, arg2);
1050        bitblock128_t mask = simd_and(tmpAns, simd128<64>::srli<(32)>(simd128<(32)>::eq(arg1, arg2)));
1051        mask = simd_or(mask, simd128<64>::slli<(32)>(mask));
1052        return simd_or(simd128<64>::srai<(32)>(tmpAns), mask);
1053}
1054
[1767]1055//The total number of operations is 37.25
[1539]1056template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ugt(bitblock128_t arg1, bitblock128_t arg2)
1057{
1058        bitblock128_t tmpAns = simd128<(64)>::ugt(arg1, arg2);
1059        bitblock128_t mask = simd_and(tmpAns, simd128<128>::srli<(64)>(simd128<(64)>::eq(arg1, arg2)));
1060        mask = simd_or(mask, simd128<128>::slli<(64)>(mask));
1061        return simd_or(simd128<128>::srai<(64)>(tmpAns), mask);
1062}
1063
[1767]1064//The total number of operations is 4.0
[1539]1065template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::xor_hl(bitblock128_t arg1)
1066{
1067        return simd_xor(simd128<2>::srli<(1)>(arg1), simd_and(arg1, simd128<2>::lomask()));
1068}
1069
[1767]1070//The total number of operations is 4.0
[1539]1071template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::xor_hl(bitblock128_t arg1)
1072{
1073        return simd_xor(simd128<4>::srli<(2)>(arg1), simd_and(arg1, simd128<4>::lomask()));
1074}
1075
[1767]1076//The total number of operations is 4.0
[1539]1077template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::xor_hl(bitblock128_t arg1)
1078{
1079        return simd_xor(simd128<8>::srli<(4)>(arg1), simd_and(arg1, simd128<8>::lomask()));
1080}
1081
[1767]1082//The total number of operations is 3.0
[1539]1083template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::xor_hl(bitblock128_t arg1)
1084{
1085        return simd_xor(simd128<16>::srli<(8)>(arg1), simd_and(arg1, simd128<16>::lomask()));
1086}
1087
[1767]1088//The total number of operations is 3.0
[1539]1089template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::xor_hl(bitblock128_t arg1)
1090{
1091        return simd_xor(simd128<32>::srli<(16)>(arg1), simd_and(arg1, simd128<32>::lomask()));
1092}
1093
[1767]1094//The total number of operations is 3.0
[1539]1095template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::xor_hl(bitblock128_t arg1)
1096{
1097        return simd_xor(simd128<64>::srli<(32)>(arg1), simd_and(arg1, simd128<64>::lomask()));
1098}
1099
[1767]1100//The total number of operations is 4.33333333333
[1539]1101template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::xor_hl(bitblock128_t arg1)
1102{
1103        return simd_xor(simd128<128>::srli<(64)>(arg1), simd_and(arg1, simd128<128>::lomask()));
1104}
1105
1106//The total number of operations is 0
1107template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::popcount(bitblock128_t arg1)
1108{
1109        return arg1;
1110}
1111
[1767]1112//The total number of operations is 3.0
[1539]1113template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::popcount(bitblock128_t arg1)
1114{
1115        return simd128<2>::add_hl(simd128<(1)>::popcount(arg1));
1116}
1117
[1767]1118//The total number of operations is 7.0
[1539]1119template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::popcount(bitblock128_t arg1)
1120{
1121        return simd128<4>::add_hl(simd128<(2)>::popcount(arg1));
1122}
1123
[1767]1124//The total number of operations is 11.0
[1539]1125template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::popcount(bitblock128_t arg1)
1126{
1127        return simd128<8>::add_hl(simd128<(4)>::popcount(arg1));
1128}
1129
[1767]1130//The total number of operations is 14.0
[1539]1131template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::popcount(bitblock128_t arg1)
1132{
1133        return simd128<16>::add_hl(simd128<(8)>::popcount(arg1));
1134}
1135
[1767]1136//The total number of operations is 17.0
[1539]1137template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::popcount(bitblock128_t arg1)
1138{
1139        return simd128<32>::add_hl(simd128<(16)>::popcount(arg1));
1140}
1141
[1767]1142//The total number of operations is 12.0
[1539]1143template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::popcount(bitblock128_t arg1)
1144{
1145        return _mm_sad_epu8(simd128<8>::popcount(arg1), simd128<8>::constant<0>());
1146}
1147
[1767]1148//The total number of operations is 16.3333333333
[1539]1149template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::popcount(bitblock128_t arg1)
1150{
1151        bitblock128_t tmpAns = simd128<(64)>::popcount(arg1);
1152        return simd128<(64)>::add(simd_and(tmpAns, simd128<128>::lomask()), simd128<128>::srli<(64)>(tmpAns));
1153}
1154
[1767]1155//The total number of operations is 6.33333333333
[1539]1156template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::neg(bitblock128_t arg1)
1157{
1158        return simd128<1>::ifh(simd128<2>::himask(), simd_xor(arg1, simd128<128>::slli<1>(arg1)), arg1);
1159}
1160
[1767]1161//The total number of operations is 6.0
[1539]1162template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::neg(bitblock128_t arg1)
1163{
1164        return simd128<4>::sub(simd128<4>::constant<0>(), arg1);
1165}
1166
[1767]1167//The total number of operations is 1.0
[1539]1168template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::neg(bitblock128_t arg1)
1169{
1170        return simd128<8>::sub(simd128<8>::constant<0>(), arg1);
1171}
1172
[1767]1173//The total number of operations is 1.0
[1539]1174template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::neg(bitblock128_t arg1)
1175{
1176        return simd128<16>::sub(simd128<16>::constant<0>(), arg1);
1177}
1178
[1767]1179//The total number of operations is 1.0
[1539]1180template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::neg(bitblock128_t arg1)
1181{
1182        return simd128<32>::sub(simd128<32>::constant<0>(), arg1);
1183}
1184
[1767]1185//The total number of operations is 1.0
[1539]1186template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::neg(bitblock128_t arg1)
1187{
1188        return simd128<64>::sub(simd128<64>::constant<0>(), arg1);
1189}
1190
[1767]1191//The total number of operations is 9.33333333333
[1539]1192template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::neg(bitblock128_t arg1)
1193{
1194        return simd128<128>::sub(simd128<128>::constant<0>(), arg1);
1195}
1196
[1767]1197//The total number of operations is 2.0
[1539]1198template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::slli(bitblock128_t arg1)
1199{
1200        return simd_and(simd128<32>::slli<sh>(arg1), simd128<2>::constant<(((3)<<sh)&(3))>());
1201}
1202
[1767]1203//The total number of operations is 2.0
[1539]1204template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::slli(bitblock128_t arg1)
1205{
1206        return simd_and(simd128<32>::slli<sh>(arg1), simd128<4>::constant<(((15)<<sh)&(15))>());
1207}
1208
[1767]1209//The total number of operations is 2.0
[1539]1210template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::slli(bitblock128_t arg1)
1211{
1212        return simd_and(simd128<32>::slli<sh>(arg1), simd128<8>::constant<(((255)<<sh)&(255))>());
1213}
1214
[1767]1215//The total number of operations is 1.0
[1539]1216template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::slli(bitblock128_t arg1)
1217{
1218        return _mm_slli_epi16(arg1, (int32_t)(sh));
1219}
1220
[1767]1221//The total number of operations is 1.0
[1539]1222template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::slli(bitblock128_t arg1)
1223{
1224        return _mm_slli_epi32(arg1, (int32_t)(sh));
1225}
1226
[1767]1227//The total number of operations is 1.0
[1539]1228template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::slli(bitblock128_t arg1)
1229{
1230        return _mm_slli_epi64(arg1, (int32_t)(sh));
1231}
1232
[1767]1233//The total number of operations is 2.33333333333
[1539]1234template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::slli(bitblock128_t arg1)
1235{
1236        return (((sh%8) == 0) ? _mm_slli_si128(arg1, (int32_t)((sh/8))) : ((sh >= 64) ? simd128<64>::slli<(sh-64)>(_mm_slli_si128(arg1, (int32_t)(8))) : simd_or(simd128<64>::slli<sh>(arg1), _mm_slli_si128(simd128<64>::srli<(64-sh)>(arg1), (int32_t)(8)))));
1237}
1238
[1767]1239//The total number of operations is 3.0
[1539]1240template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1241{
1242        return simd_or(simd_and(arg2, arg1), simd_andc(arg3, arg1));
1243}
1244
[1767]1245//The total number of operations is 8.0
[1539]1246template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1247{
1248        return simd128<(1)>::ifh(simd128<1>::ifh(simd128<2>::himask(), arg1, simd128<2>::srli<(1)>(arg1)), arg2, arg3);
1249}
1250
[1767]1251//The total number of operations is 13.0
[1539]1252template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1253{
1254        return simd128<1>::ifh(simd128<4>::gt(simd128<4>::constant<0>(), arg1), arg2, arg3);
1255}
1256
[1767]1257//The total number of operations is 4.0
[1539]1258template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1259{
1260        return simd128<1>::ifh(simd128<8>::gt(simd128<8>::constant<0>(), arg1), arg2, arg3);
1261}
1262
[1767]1263//The total number of operations is 4.0
[1539]1264template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1265{
1266        return simd128<1>::ifh(simd128<16>::gt(simd128<16>::constant<0>(), arg1), arg2, arg3);
1267}
1268
[1767]1269//The total number of operations is 4.0
[1539]1270template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1271{
1272        return simd128<1>::ifh(simd128<32>::gt(simd128<32>::constant<0>(), arg1), arg2, arg3);
1273}
1274
[1767]1275//The total number of operations is 8.0
[1539]1276template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1277{
1278        return simd128<(32)>::ifh(simd128<1>::ifh(simd128<64>::himask(), arg1, simd128<64>::srli<(32)>(arg1)), arg2, arg3);
1279}
1280
[1767]1281//The total number of operations is 13.3333333333
[1539]1282template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::ifh(bitblock128_t arg1, bitblock128_t arg2, bitblock128_t arg3)
1283{
1284        return simd128<(64)>::ifh(simd128<1>::ifh(simd128<128>::himask(), arg1, simd128<128>::srli<(64)>(arg1)), arg2, arg3);
1285}
1286
[1767]1287//The total number of operations is 1.0
[1539]1288template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::sub(bitblock128_t arg1, bitblock128_t arg2)
1289{
[1570]1290        return simd_xor(arg1, arg2);
[1539]1291}
1292
[1767]1293//The total number of operations is 9.33333333333
[1539]1294template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::sub(bitblock128_t arg1, bitblock128_t arg2)
1295{
1296        bitblock128_t tmp = simd_xor(arg1, arg2);
1297        return simd128<1>::ifh(simd128<2>::himask(), simd_xor(tmp, simd128<128>::slli<1>(simd_and(simd_not(arg1), arg2))), tmp);
1298}
1299
[1767]1300//The total number of operations is 6.0
[1539]1301template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::sub(bitblock128_t arg1, bitblock128_t arg2)
1302{
1303        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::sub(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::sub(arg1, arg2));
1304}
1305
[1767]1306//The total number of operations is 1.0
[1539]1307template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::sub(bitblock128_t arg1, bitblock128_t arg2)
1308{
1309        return _mm_sub_epi8(arg1, arg2);
1310}
1311
[1767]1312//The total number of operations is 1.0
[1539]1313template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::sub(bitblock128_t arg1, bitblock128_t arg2)
1314{
1315        return _mm_sub_epi16(arg1, arg2);
1316}
1317
[1767]1318//The total number of operations is 1.0
[1539]1319template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::sub(bitblock128_t arg1, bitblock128_t arg2)
1320{
1321        return _mm_sub_epi32(arg1, arg2);
1322}
1323
[1767]1324//The total number of operations is 1.0
[1539]1325template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::sub(bitblock128_t arg1, bitblock128_t arg2)
1326{
1327        return _mm_sub_epi64(arg1, arg2);
1328}
1329
[1767]1330//The total number of operations is 9.33333333333
[1539]1331template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::sub(bitblock128_t arg1, bitblock128_t arg2)
1332{
1333        bitblock128_t partial = simd128<(64)>::sub(arg1, arg2);
1334        bitblock128_t borrowMask = simd_or(simd_andc(arg2, arg1), simd_andc(partial, simd_xor(arg1, arg2)));
1335        bitblock128_t borrow = simd128<128>::slli<(64)>(simd128<(64)>::srli<(63)>(borrowMask));
1336        return simd128<(64)>::sub(partial, borrow);
1337}
1338
[1767]1339//The total number of operations is 3.0
[1539]1340template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::add_hl(bitblock128_t arg1)
1341{
1342        return simd128<16>::sub(arg1, simd_and(simd128<2>::lomask(), simd128<16>::srli<1>(arg1)));
1343}
1344
[1767]1345//The total number of operations is 4.0
[1539]1346template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::add_hl(bitblock128_t arg1)
1347{
1348        return simd128<(8)>::add(simd128<4>::srli<(2)>(arg1), simd_and(arg1, simd128<4>::lomask()));
1349}
1350
[1767]1351//The total number of operations is 4.0
[1539]1352template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::add_hl(bitblock128_t arg1)
1353{
1354        return simd128<(16)>::add(simd128<8>::srli<(4)>(arg1), simd_and(arg1, simd128<8>::lomask()));
1355}
1356
[1767]1357//The total number of operations is 3.0
[1539]1358template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::add_hl(bitblock128_t arg1)
1359{
1360        return simd128<(32)>::add(simd128<16>::srli<(8)>(arg1), simd_and(arg1, simd128<16>::lomask()));
1361}
1362
[1767]1363//The total number of operations is 3.0
[1539]1364template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::add_hl(bitblock128_t arg1)
1365{
1366        return simd128<(64)>::add(simd128<32>::srli<(16)>(arg1), simd_and(arg1, simd128<32>::lomask()));
1367}
1368
[1767]1369//The total number of operations is 3.0
[1539]1370template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::add_hl(bitblock128_t arg1)
1371{
1372        return simd128<64>::add(simd128<64>::srli<(32)>(arg1), simd_and(arg1, simd128<64>::lomask()));
1373}
1374
[1767]1375//The total number of operations is 12.6666666667
[1539]1376template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::add_hl(bitblock128_t arg1)
1377{
1378        return simd128<128>::add(simd128<128>::srli<(64)>(arg1), simd_and(arg1, simd128<128>::lomask()));
1379}
1380
[1923]1381//The total number of operations is 10.0
[1539]1382template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srl(bitblock128_t arg1, bitblock128_t shift_mask)
1383{
[1923]1384        return simd128<1>::ifh(simd128<128>::himask(), _mm_srl_epi64(arg1, simd_and(_mm_srli_si128(shift_mask, (int32_t)(8)), _mm_cvtsi32_si128((int32_t)(63)))), _mm_srl_epi64(arg1, simd_and(shift_mask, _mm_cvtsi32_si128((int32_t)(63)))));
[1539]1385}
1386
[1924]1387//The total number of operations is 13.0
[1539]1388template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srl(bitblock128_t arg1, bitblock128_t shift_mask)
1389{
[1924]1390        bitblock128_t shift = simd_and(shift_mask, _mm_cvtsi32_si128((int32_t)(127)));
1391        return simd_or(_mm_srl_epi64(arg1, shift), simd_or(_mm_srli_si128(_mm_srl_epi64(arg1, simd128<32>::sub(shift, _mm_cvtsi32_si128((int32_t)(64)))), (int32_t)(8)), _mm_srli_si128(_mm_sll_epi64(arg1, simd128<32>::sub(_mm_cvtsi32_si128((int32_t)(64)), shift)), (int32_t)(8))));
[1539]1392}
1393
1394//The total number of operations is 0
1395template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::constant()
1396{
1397        return simd128<32>::constant<(-1*val)>();
1398}
1399
1400//The total number of operations is 0
1401template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::constant()
1402{
1403        return ((val < 0) ? simd128<(4)>::constant<((val<<2)|(val^(-4)))>() : simd128<(4)>::constant<((val<<2)|val)>());
1404}
1405
1406//The total number of operations is 0
1407template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::constant()
1408{
1409        return ((val < 0) ? simd128<(8)>::constant<((val<<4)|(val^(-16)))>() : simd128<(8)>::constant<((val<<4)|val)>());
1410}
1411
1412//The total number of operations is 0
1413template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::constant()
1414{
1415        return _mm_set1_epi8((int32_t)(val));
1416}
1417
1418//The total number of operations is 0
1419template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::constant()
1420{
1421        return _mm_set1_epi16((int32_t)(val));
1422}
1423
1424//The total number of operations is 0
1425template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::constant()
1426{
1427        return _mm_set1_epi32((int32_t)(val));
1428}
1429
1430//The total number of operations is 0
1431template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::constant()
1432{
1433        return _mm_set_epi32((int32_t)((val>>32)), (int32_t)(val), (int32_t)((val>>32)), (int32_t)(val));
1434}
1435
1436//The total number of operations is 0
1437template <> template <uint64_t val> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::constant()
1438{
1439        return _mm_set_epi32((int32_t)(0), (int32_t)(0), (int32_t)((val>>32)), (int32_t)(val));
1440}
1441
[1767]1442//The total number of operations is 1.0
[1539]1443template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::min(bitblock128_t arg1, bitblock128_t arg2)
1444{
[1573]1445        return simd_or(arg1, arg2);
[1539]1446}
1447
[1767]1448//The total number of operations is 16.6666666667
[1539]1449template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::min(bitblock128_t arg1, bitblock128_t arg2)
1450{
[1767]1451        bitblock128_t tmp1 = simd128<128>::srli<1>(arg1);
1452        bitblock128_t tmp2 = simd128<128>::srli<1>(arg2);
1453        return simd128<1>::ifh(simd128<2>::himask(), simd_or(arg1, arg2), simd_or(simd_and(arg1, simd_and(tmp1, simd_not(tmp2))), simd_and(arg2, simd_or(simd_and(simd_not(tmp1), tmp2), arg1))));
[1539]1454}
1455
[1767]1456//The total number of operations is 9.0
[1539]1457template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::min(bitblock128_t arg1, bitblock128_t arg2)
1458{
1459        bitblock128_t high_bit = simd128<4>::constant<(8)>();
1460        return simd_xor(simd128<4>::umin(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1461}
1462
[1767]1463//The total number of operations is 4.0
[1539]1464template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::min(bitblock128_t arg1, bitblock128_t arg2)
1465{
1466        return simd128<1>::ifh(simd128<8>::gt(arg1, arg2), arg2, arg1);
1467}
1468
[1767]1469//The total number of operations is 1.0
[1539]1470template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::min(bitblock128_t arg1, bitblock128_t arg2)
1471{
1472        return _mm_min_epi16(arg1, arg2);
1473}
1474
[1767]1475//The total number of operations is 4.0
[1539]1476template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::min(bitblock128_t arg1, bitblock128_t arg2)
1477{
1478        return simd128<1>::ifh(simd128<32>::gt(arg1, arg2), arg2, arg1);
1479}
1480
[1767]1481//The total number of operations is 17.5
[1539]1482template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::min(bitblock128_t arg1, bitblock128_t arg2)
1483{
1484        return simd128<1>::ifh(simd128<64>::gt(arg1, arg2), arg2, arg1);
1485}
1486
[1767]1487//The total number of operations is 54.75
[1539]1488template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::min(bitblock128_t arg1, bitblock128_t arg2)
1489{
[1740]1490        return simd128<1>::ifh(simd128<128>::gt(arg1, arg2), arg2, arg1);
[1539]1491}
1492
[1580]1493//The total number of operations is 0
1494template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::lomask()
1495{
1496        return simd128<2>::constant<(1)>();
1497}
1498
1499//The total number of operations is 0
1500template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::lomask()
1501{
1502        return simd128<4>::constant<(3)>();
1503}
1504
1505//The total number of operations is 0
1506template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::lomask()
1507{
1508        return simd128<8>::constant<(15)>();
1509}
1510
1511//The total number of operations is 0
1512template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::lomask()
1513{
1514        return simd128<16>::constant<(255)>();
1515}
1516
1517//The total number of operations is 0
1518template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::lomask()
1519{
1520        return simd128<32>::constant<(65535)>();
1521}
1522
1523//The total number of operations is 0
1524template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::lomask()
1525{
1526        return _mm_set_epi32((int32_t)(0), (int32_t)(-1), (int32_t)(0), (int32_t)(-1));
1527}
1528
1529//The total number of operations is 0
1530template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::lomask()
1531{
1532        return _mm_set_epi32((int32_t)(0), (int32_t)(0), (int32_t)(-1), (int32_t)(-1));
1533}
1534
[1767]1535//The total number of operations is 1.0
[1539]1536template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umin(bitblock128_t arg1, bitblock128_t arg2)
1537{
[1573]1538        return simd_and(arg1, arg2);
[1539]1539}
1540
[1767]1541//The total number of operations is 16.0
[1539]1542template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umin(bitblock128_t arg1, bitblock128_t arg2)
1543{
1544        return simd_or(simd_and(simd128<(4)>::himask(), simd128<(4)>::umin(arg1, arg2)), simd128<(4)>::umin(simd_and(simd128<(4)>::lomask(), arg1), simd_and(simd128<(4)>::lomask(), arg2)));
1545}
1546
[1767]1547//The total number of operations is 6.0
[1539]1548template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umin(bitblock128_t arg1, bitblock128_t arg2)
1549{
1550        return simd_or(simd_and(simd128<(8)>::himask(), simd128<(8)>::umin(arg1, arg2)), simd128<(8)>::umin(simd_and(simd128<(8)>::lomask(), arg1), simd_and(simd128<(8)>::lomask(), arg2)));
1551}
1552
[1767]1553//The total number of operations is 1.0
[1539]1554template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umin(bitblock128_t arg1, bitblock128_t arg2)
1555{
1556        return _mm_min_epu8(arg1, arg2);
1557}
1558
[1767]1559//The total number of operations is 4.0
[1539]1560template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umin(bitblock128_t arg1, bitblock128_t arg2)
1561{
1562        bitblock128_t high_bit = simd128<16>::constant<(32768)>();
1563        return simd_xor(simd128<16>::min(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1564}
1565
[1767]1566//The total number of operations is 7.0
[1539]1567template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umin(bitblock128_t arg1, bitblock128_t arg2)
1568{
[1740]1569        bitblock128_t high_bit = simd128<32>::constant<(2147483648ULL)>();
[1539]1570        return simd_xor(simd128<32>::min(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1571}
1572
[1767]1573//The total number of operations is 20.0
[1539]1574template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umin(bitblock128_t arg1, bitblock128_t arg2)
1575{
1576        bitblock128_t tmpAns = simd128<(32)>::umin(arg1, arg2);
1577        bitblock128_t eqMask1 = simd128<64>::srli<(32)>(simd128<(32)>::eq(tmpAns, arg1));
1578        bitblock128_t eqMask2 = simd128<64>::srli<(32)>(simd128<(32)>::eq(tmpAns, arg2));
1579        return simd128<1>::ifh(simd128<64>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1580}
1581
[1767]1582//The total number of operations is 43.6666666667
[1539]1583template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::umin(bitblock128_t arg1, bitblock128_t arg2)
1584{
1585        bitblock128_t tmpAns = simd128<(64)>::umin(arg1, arg2);
1586        bitblock128_t eqMask1 = simd128<128>::srli<(64)>(simd128<(64)>::eq(tmpAns, arg1));
1587        bitblock128_t eqMask2 = simd128<128>::srli<(64)>(simd128<(64)>::eq(tmpAns, arg2));
1588        return simd128<1>::ifh(simd128<128>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1589}
1590
[1767]1591//The total number of operations is 7.33333333333
[1580]1592template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::abs(bitblock128_t arg1)
[1539]1593{
[1580]1594        return simd128<1>::ifh(simd128<2>::himask(), simd_and(arg1, simd128<128>::slli<1>(simd_not(arg1))), arg1);
[1539]1595}
1596
[1767]1597//The total number of operations is 19.0
[1580]1598template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::abs(bitblock128_t arg1)
[1539]1599{
[1580]1600        bitblock128_t gtMask = simd128<4>::gt(arg1, simd128<4>::constant<0>());
1601        return simd128<1>::ifh(gtMask, arg1, simd128<4>::sub(gtMask, arg1));
[1539]1602}
1603
[1767]1604//The total number of operations is 5.0
[1580]1605template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::abs(bitblock128_t arg1)
[1539]1606{
[1580]1607        bitblock128_t gtMask = simd128<8>::gt(arg1, simd128<8>::constant<0>());
1608        return simd128<1>::ifh(gtMask, arg1, simd128<8>::sub(gtMask, arg1));
[1539]1609}
1610
[1767]1611//The total number of operations is 5.0
[1580]1612template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::abs(bitblock128_t arg1)
[1539]1613{
[1580]1614        bitblock128_t gtMask = simd128<16>::gt(arg1, simd128<16>::constant<0>());
1615        return simd128<1>::ifh(gtMask, arg1, simd128<16>::sub(gtMask, arg1));
[1539]1616}
1617
[1767]1618//The total number of operations is 5.0
[1580]1619template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::abs(bitblock128_t arg1)
[1539]1620{
[1580]1621        bitblock128_t gtMask = simd128<32>::gt(arg1, simd128<32>::constant<0>());
1622        return simd128<1>::ifh(gtMask, arg1, simd128<32>::sub(gtMask, arg1));
[1539]1623}
1624
[1767]1625//The total number of operations is 17.0
[1580]1626template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::abs(bitblock128_t arg1)
[1539]1627{
[1580]1628        bitblock128_t eqMask = simd128<64>::eq(simd128<1>::ifh(simd128<64>::himask(), simd128<(32)>::abs(arg1), arg1), arg1);
1629        return simd128<1>::ifh(eqMask, arg1, simd128<64>::sub(eqMask, arg1));
[1539]1630}
1631
[1767]1632//The total number of operations is 44.0
[1580]1633template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::abs(bitblock128_t arg1)
[1539]1634{
[1580]1635        bitblock128_t eqMask = simd128<128>::eq(simd128<1>::ifh(simd128<128>::himask(), simd128<(64)>::abs(arg1), arg1), arg1);
1636        return simd128<1>::ifh(eqMask, arg1, simd128<128>::sub(eqMask, arg1));
[1539]1637}
1638
[1767]1639//The total number of operations is 2.0
[1539]1640template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::eq(bitblock128_t arg1, bitblock128_t arg2)
1641{
[1573]1642        return simd_not(simd_xor(arg1, arg2));
[1539]1643}
1644
[1767]1645//The total number of operations is 8.0
[1539]1646template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::eq(bitblock128_t arg1, bitblock128_t arg2)
1647{
[1573]1648        bitblock128_t tmpAns = simd128<(1)>::eq(arg1, arg2);
1649        bitblock128_t loMask = simd_and(tmpAns, simd128<2>::srli<(1)>(tmpAns));
1650        bitblock128_t hiMask = simd128<2>::slli<(1)>(loMask);
1651        return simd_or(loMask, hiMask);
[1539]1652}
1653
[1767]1654//The total number of operations is 9.0
[1539]1655template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::eq(bitblock128_t arg1, bitblock128_t arg2)
1656{
1657        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))));
1658}
1659
[1767]1660//The total number of operations is 1.0
[1539]1661template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::eq(bitblock128_t arg1, bitblock128_t arg2)
1662{
1663        return _mm_cmpeq_epi8(arg1, arg2);
1664}
1665
[1767]1666//The total number of operations is 1.0
[1539]1667template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::eq(bitblock128_t arg1, bitblock128_t arg2)
1668{
1669        return _mm_cmpeq_epi16(arg1, arg2);
1670}
1671
[1767]1672//The total number of operations is 1.0
[1539]1673template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::eq(bitblock128_t arg1, bitblock128_t arg2)
1674{
1675        return _mm_cmpeq_epi32(arg1, arg2);
1676}
1677
[1767]1678//The total number of operations is 5.0
[1539]1679template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::eq(bitblock128_t arg1, bitblock128_t arg2)
1680{
1681        bitblock128_t tmpAns = simd128<(32)>::eq(arg1, arg2);
1682        bitblock128_t loMask = simd_and(tmpAns, simd128<64>::srli<(32)>(tmpAns));
1683        bitblock128_t hiMask = simd128<64>::slli<(32)>(loMask);
1684        return simd_or(loMask, hiMask);
1685}
1686
[1767]1687//The total number of operations is 11.6666666667
[1539]1688template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::eq(bitblock128_t arg1, bitblock128_t arg2)
1689{
1690        bitblock128_t tmpAns = simd128<(64)>::eq(arg1, arg2);
1691        bitblock128_t loMask = simd_and(tmpAns, simd128<128>::srli<(64)>(tmpAns));
1692        bitblock128_t hiMask = simd128<128>::slli<(64)>(loMask);
1693        return simd_or(loMask, hiMask);
1694}
1695
[1767]1696//The total number of operations is 4.0
[1539]1697template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::srai(bitblock128_t arg1)
1698{
1699        return ((sh == 0) ? arg1 : simd_or(simd_and(simd128<2>::himask(), arg1), simd128<2>::srli<1>(arg1)));
1700}
1701
[1767]1702//The total number of operations is 10.0
[1539]1703template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::srai(bitblock128_t arg1)
1704{
1705        bitblock128_t tmp = simd128<4>::srli<((sh >= 4) ? (3) : ((sh < 0) ? 0 : sh))>(arg1);
1706        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)));
1707}
1708
[1767]1709//The total number of operations is 5.0
[1539]1710template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::srai(bitblock128_t arg1)
1711{
1712        bitblock128_t tmp = simd128<8>::srli<((sh >= 8) ? (7) : ((sh < 0) ? 0 : sh))>(arg1);
1713        return simd_or(tmp, simd128<8>::sub(simd128<8>::constant<0>(), simd_and(simd128<8>::constant<(1<<((8-((sh >= 8) ? (7) : ((sh < 0) ? 0 : sh)))-1))>(), tmp)));
1714}
1715
[1767]1716//The total number of operations is 1.0
[1539]1717template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::srai(bitblock128_t arg1)
1718{
1719        return _mm_srai_epi16(arg1, (int32_t)(sh));
1720}
1721
[1767]1722//The total number of operations is 1.0
[1539]1723template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::srai(bitblock128_t arg1)
1724{
1725        return _mm_srai_epi32(arg1, (int32_t)(sh));
1726}
1727
[1767]1728//The total number of operations is 4.5
[1539]1729template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::srai(bitblock128_t arg1)
1730{
[1740]1731        return simd_or(simd_and(simd128<64>::himask(), simd128<(32)>::srai<((sh < (32)) ? sh : (32))>(arg1)), ((sh <= (32)) ? simd128<64>::srli<sh>(arg1) : simd128<(32)>::srai<(sh-(32))>(simd128<64>::srli<(32)>(arg1))));
[1539]1732}
1733
[1767]1734//The total number of operations is 11.0833333333
[1539]1735template <> template <uint64_t sh> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::srai(bitblock128_t arg1)
1736{
[1740]1737        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))));
[1539]1738}
1739
1740//The total number of operations is 0
1741template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::himask()
1742{
1743        return simd128<2>::constant<(2)>();
1744}
1745
1746//The total number of operations is 0
1747template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::himask()
1748{
1749        return simd128<4>::constant<(12)>();
1750}
1751
1752//The total number of operations is 0
1753template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::himask()
1754{
1755        return simd128<8>::constant<(240)>();
1756}
1757
1758//The total number of operations is 0
1759template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::himask()
1760{
1761        return simd128<16>::constant<(65280)>();
1762}
1763
1764//The total number of operations is 0
1765template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::himask()
1766{
1767        return simd128<32>::constant<-65536>();
1768}
1769
1770//The total number of operations is 0
1771template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::himask()
1772{
1773        return _mm_set_epi32((int32_t)(-1), (int32_t)(0), (int32_t)(-1), (int32_t)(0));
1774}
1775
1776//The total number of operations is 0
1777template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::himask()
1778{
1779        return _mm_set_epi32((int32_t)(-1), (int32_t)(-1), (int32_t)(0), (int32_t)(0));
1780}
1781
[1767]1782//The total number of operations is 1.0
[1539]1783template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::add(bitblock128_t arg1, bitblock128_t arg2)
1784{
[1570]1785        return simd_xor(arg1, arg2);
[1539]1786}
1787
[1767]1788//The total number of operations is 8.33333333333
[1539]1789template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::add(bitblock128_t arg1, bitblock128_t arg2)
1790{
1791        bitblock128_t tmp = simd_xor(arg1, arg2);
1792        return simd128<1>::ifh(simd128<2>::himask(), simd_xor(tmp, simd128<128>::slli<1>(simd_and(arg1, arg2))), tmp);
1793}
1794
[1767]1795//The total number of operations is 6.0
[1539]1796template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::add(bitblock128_t arg1, bitblock128_t arg2)
1797{
1798        return simd128<1>::ifh(simd128<(8)>::himask(), simd128<(8)>::add(arg1, simd_and(simd128<(8)>::himask(), arg2)), simd128<(8)>::add(arg1, arg2));
1799}
1800
[1767]1801//The total number of operations is 1.0
[1539]1802template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::add(bitblock128_t arg1, bitblock128_t arg2)
1803{
1804        return _mm_add_epi8(arg1, arg2);
1805}
1806
[1767]1807//The total number of operations is 1.0
[1539]1808template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::add(bitblock128_t arg1, bitblock128_t arg2)
1809{
1810        return _mm_add_epi16(arg1, arg2);
1811}
1812
[1767]1813//The total number of operations is 1.0
[1539]1814template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::add(bitblock128_t arg1, bitblock128_t arg2)
1815{
1816        return _mm_add_epi32(arg1, arg2);
1817}
1818
[1767]1819//The total number of operations is 1.0
[1539]1820template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::add(bitblock128_t arg1, bitblock128_t arg2)
1821{
1822        return _mm_add_epi64(arg1, arg2);
1823}
1824
[1767]1825//The total number of operations is 9.33333333333
[1539]1826template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::add(bitblock128_t arg1, bitblock128_t arg2)
1827{
1828        bitblock128_t partial = simd128<(64)>::add(arg1, arg2);
1829        bitblock128_t carryMask = simd_or(simd_and(arg1, arg2), simd_andc(simd_xor(arg1, arg2), partial));
1830        bitblock128_t carry = simd128<128>::slli<(64)>(simd128<(64)>::srli<(63)>(carryMask));
1831        return simd128<(64)>::add(partial, carry);
1832}
1833
[1767]1834//The total number of operations is 1.0
[1580]1835template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<1>::umax(bitblock128_t arg1, bitblock128_t arg2)
[1539]1836{
[1580]1837        return simd_or(arg1, arg2);
[1539]1838}
1839
[1767]1840//The total number of operations is 15.6666666667
[1580]1841template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<2>::umax(bitblock128_t arg1, bitblock128_t arg2)
[1539]1842{
[1767]1843        return simd128<1>::ifh(simd128<2>::himask(), simd_or(arg1, arg2), simd_or(simd_and(arg2, simd128<128>::srli<1>(simd_or(simd_not(arg1), arg2))), simd_and(arg1, simd128<128>::srli<1>(simd_or(arg1, simd_not(arg2))))));
[1539]1844}
1845
[1767]1846//The total number of operations is 6.0
[1580]1847template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<4>::umax(bitblock128_t arg1, bitblock128_t arg2)
[1539]1848{
[1580]1849        return simd_or(simd_and(simd128<(8)>::himask(), simd128<(8)>::umax(arg1, arg2)), simd128<(8)>::umax(simd_and(simd128<(8)>::lomask(), arg1), simd_and(simd128<(8)>::lomask(), arg2)));
[1539]1850}
1851
[1767]1852//The total number of operations is 1.0
[1580]1853template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<8>::umax(bitblock128_t arg1, bitblock128_t arg2)
[1539]1854{
[1580]1855        return _mm_max_epu8(arg1, arg2);
[1539]1856}
1857
[1767]1858//The total number of operations is 4.0
[1580]1859template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<16>::umax(bitblock128_t arg1, bitblock128_t arg2)
[1539]1860{
[1580]1861        bitblock128_t high_bit = simd128<16>::constant<(32768)>();
1862        return simd_xor(simd128<16>::max(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
[1539]1863}
1864
[1767]1865//The total number of operations is 7.0
[1580]1866template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<32>::umax(bitblock128_t arg1, bitblock128_t arg2)
[1539]1867{
[1740]1868        bitblock128_t high_bit = simd128<32>::constant<(2147483648ULL)>();
[1580]1869        return simd_xor(simd128<32>::max(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
[1539]1870}
1871
[1767]1872//The total number of operations is 20.0
[1580]1873template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<64>::umax(bitblock128_t arg1, bitblock128_t arg2)
[1539]1874{
[1580]1875        bitblock128_t tmpAns = simd128<(32)>::umax(arg1, arg2);
1876        bitblock128_t eqMask1 = simd128<64>::srli<(32)>(simd128<(32)>::eq(tmpAns, arg1));
1877        bitblock128_t eqMask2 = simd128<64>::srli<(32)>(simd128<(32)>::eq(tmpAns, arg2));
1878        return simd128<1>::ifh(simd128<64>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
[1539]1879}
1880
[1767]1881//The total number of operations is 43.6666666667
[1580]1882template <> IDISA_ALWAYS_INLINE bitblock128_t simd128<128>::umax(bitblock128_t arg1, bitblock128_t arg2)
1883{
1884        bitblock128_t tmpAns = simd128<(64)>::umax(arg1, arg2);
1885        bitblock128_t eqMask1 = simd128<128>::srli<(64)>(simd128<(64)>::eq(tmpAns, arg1));
1886        bitblock128_t eqMask2 = simd128<128>::srli<(64)>(simd128<(64)>::eq(tmpAns, arg2));
1887        return simd128<1>::ifh(simd128<128>::himask(), tmpAns, simd128<1>::ifh(eqMask1, simd128<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1888}
1889
[1767]1890//The total number of operations is 73.0
[1539]1891template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1892{
1893        return simd128<(1)>::umin(hsimd128<2>::packh(arg1, arg2), hsimd128<2>::packl(arg1, arg2));
1894}
1895
[1767]1896//The total number of operations is 66.6666666667
[1539]1897template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1898{
1899        return simd128<(2)>::umin(hsimd128<4>::packh(arg1, arg2), hsimd128<4>::packl(arg1, arg2));
1900}
1901
[1767]1902//The total number of operations is 35.3333333333
[1539]1903template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1904{
1905        return simd128<(4)>::umin(hsimd128<8>::packh(arg1, arg2), hsimd128<8>::packl(arg1, arg2));
1906}
1907
[1767]1908//The total number of operations is 7.0
[1539]1909template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1910{
1911        return simd128<(8)>::umin(hsimd128<16>::packh(arg1, arg2), hsimd128<16>::packl(arg1, arg2));
1912}
1913
[1767]1914//The total number of operations is 37.3333333333
[1539]1915template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1916{
1917        return simd128<(16)>::umin(hsimd128<32>::packh(arg1, arg2), hsimd128<32>::packl(arg1, arg2));
1918}
1919
[1767]1920//The total number of operations is 19.0
[1539]1921template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1922{
1923        return simd128<(32)>::umin(hsimd128<64>::packh(arg1, arg2), hsimd128<64>::packl(arg1, arg2));
1924}
1925
[1767]1926//The total number of operations is 30.6666666667
[1539]1927template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::umin_hl(bitblock128_t arg1, bitblock128_t arg2)
1928{
1929        return simd128<(64)>::umin(hsimd128<128>::packh(arg1, arg2), hsimd128<128>::packl(arg1, arg2));
1930}
1931
[1767]1932//The total number of operations is 73.0
[1539]1933template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1934{
1935        return simd128<(1)>::add(hsimd128<2>::packh(arg1, arg2), hsimd128<2>::packl(arg1, arg2));
1936}
1937
[1767]1938//The total number of operations is 59.0
[1539]1939template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1940{
1941        return simd128<(2)>::add(hsimd128<4>::packh(arg1, arg2), hsimd128<4>::packl(arg1, arg2));
1942}
1943
[1767]1944//The total number of operations is 35.3333333333
[1539]1945template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1946{
1947        return simd128<(4)>::add(hsimd128<8>::packh(arg1, arg2), hsimd128<8>::packl(arg1, arg2));
1948}
1949
[1767]1950//The total number of operations is 7.0
[1539]1951template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1952{
1953        return simd128<(8)>::add(hsimd128<16>::packh(arg1, arg2), hsimd128<16>::packl(arg1, arg2));
1954}
1955
[1767]1956//The total number of operations is 34.3333333333
[1539]1957template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1958{
1959        return simd128<(16)>::add(hsimd128<32>::packh(arg1, arg2), hsimd128<32>::packl(arg1, arg2));
1960}
1961
[1767]1962//The total number of operations is 13.0
[1539]1963template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1964{
1965        return simd128<(32)>::add(hsimd128<64>::packh(arg1, arg2), hsimd128<64>::packl(arg1, arg2));
1966}
1967
[1767]1968//The total number of operations is 11.6666666667
[1539]1969template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::add_hl(bitblock128_t arg1, bitblock128_t arg2)
1970{
1971        return simd128<(64)>::add(hsimd128<128>::packh(arg1, arg2), hsimd128<128>::packl(arg1, arg2));
1972}
1973
[1767]1974//The total number of operations is 108.666666667
[1539]1975template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packss(bitblock128_t arg1, bitblock128_t arg2)
1976{
1977        bitblock128_t hiBound = simd128<2>::srli<1>(simd128<2>::lomask());
1978        bitblock128_t loBound = simd_not(hiBound);
1979        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)));
1980}
1981
[1767]1982//The total number of operations is 79.3333333333
[1539]1983template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packss(bitblock128_t arg1, bitblock128_t arg2)
1984{
1985        bitblock128_t hiBound = simd128<4>::srli<1>(simd128<4>::lomask());
1986        bitblock128_t loBound = simd_not(hiBound);
1987        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)));
1988}
1989
[1767]1990//The total number of operations is 32.6666666667
[1539]1991template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packss(bitblock128_t arg1, bitblock128_t arg2)
1992{
1993        bitblock128_t hiBound = simd128<8>::srli<1>(simd128<8>::lomask());
1994        bitblock128_t loBound = simd_not(hiBound);
1995        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)));
1996}
1997
[1767]1998//The total number of operations is 1.0
[1539]1999template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packss(bitblock128_t arg1, bitblock128_t arg2)
2000{
2001        return _mm_packs_epi16(arg2, arg1);
2002}
2003
[1767]2004//The total number of operations is 1.0
[1539]2005template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packss(bitblock128_t arg1, bitblock128_t arg2)
2006{
2007        return _mm_packs_epi32(arg2, arg1);
2008}
2009
[1767]2010//The total number of operations is 77.0
[1539]2011template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packss(bitblock128_t arg1, bitblock128_t arg2)
2012{
2013        bitblock128_t hiBound = simd128<64>::srli<1>(simd128<64>::lomask());
2014        bitblock128_t loBound = simd_not(hiBound);
2015        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)));
2016}
2017
[1767]2018//The total number of operations is 227.666666667
[1539]2019template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packss(bitblock128_t arg1, bitblock128_t arg2)
2020{
2021        bitblock128_t hiBound = simd128<128>::srli<1>(simd128<128>::lomask());
2022        bitblock128_t loBound = simd_not(hiBound);
2023        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)));
2024}
2025
[1767]2026//The total number of operations is 24.0
[1539]2027template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<4>::signmask(bitblock128_t arg1)
2028{
2029        uint64_t tmpAns1 = hsimd128<(8)>::signmask(esimd128<4>::mergeh(arg1, simd128<4>::constant<0>()));
2030        uint64_t tmpAns2 = hsimd128<(8)>::signmask(esimd128<4>::mergel(arg1, simd128<4>::constant<0>()));
2031        return ((tmpAns1<<(16))+tmpAns2);
2032}
2033
[1767]2034//The total number of operations is 1.0
[1539]2035template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<8>::signmask(bitblock128_t arg1)
2036{
2037        return _mm_movemask_epi8(arg1);
2038}
2039
[1872]2040//The total number of operations is 2.0
[1539]2041template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<16>::signmask(bitblock128_t arg1)
2042{
[1872]2043        return hsimd128<(8)>::signmask(hsimd128<16>::packss(simd128<16>::constant<0>(), arg1));
[1539]2044}
2045
[1872]2046//The total number of operations is 3.0
[1539]2047template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<32>::signmask(bitblock128_t arg1)
2048{
[1872]2049        return hsimd128<(16)>::signmask(hsimd128<32>::packss(simd128<32>::constant<0>(), arg1));
[1539]2050}
2051
[1870]2052//The total number of operations is 1.0
[1539]2053template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<64>::signmask(bitblock128_t arg1)
2054{
[1897]2055        return _mm_movemask_pd(_mm_castsi128_pd(arg1));
[1539]2056}
2057
[1870]2058//The total number of operations is 6.33333333333
[1539]2059template <> IDISA_ALWAYS_INLINE uint64_t hsimd128<128>::signmask(bitblock128_t arg1)
2060{
2061        return hsimd128<(64)>::signmask(hsimd128<128>::packh(simd128<128>::constant<0>(), arg1));
2062}
2063
[1767]2064//The total number of operations is 35.0
[1539]2065template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packl(bitblock128_t arg1, bitblock128_t arg2)
2066{
2067        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));
2068}
2069
[1767]2070//The total number of operations is 24.3333333333
[1539]2071template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packl(bitblock128_t arg1, bitblock128_t arg2)
2072{
2073        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));
2074}
2075
[1767]2076//The total number of operations is 13.6666666667
[1539]2077template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packl(bitblock128_t arg1, bitblock128_t arg2)
2078{
2079        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));
2080}
2081
[1767]2082//The total number of operations is 3.0
[1539]2083template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packl(bitblock128_t arg1, bitblock128_t arg2)
2084{
2085        return hsimd128<16>::packus(simd_and(arg1, simd128<16>::lomask()), simd_and(arg2, simd128<16>::lomask()));
2086}
2087
[1767]2088//The total number of operations is 15.6666666667
[1539]2089template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packl(bitblock128_t arg1, bitblock128_t arg2)
2090{
2091        return hsimd128<(64)>::packl(simd128<1>::ifh(simd128<32>::himask(), simd128<128>::srli<(16)>(arg1), arg1), simd128<1>::ifh(simd128<32>::himask(), simd128<128>::srli<(16)>(arg2), arg2));
2092}
2093
[1767]2094//The total number of operations is 5.0
[1539]2095template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packl(bitblock128_t arg1, bitblock128_t arg2)
2096{
2097        return simd_or(mvmd128<32>::shufflei<shufflemask4(2, 0, 3, 3)>(simd_andc(arg1, simd128<64>::himask())), mvmd128<32>::shufflei<shufflemask4(3, 3, 2, 0)>(simd_andc(arg2, simd128<64>::himask())));
2098}
2099
[1767]2100//The total number of operations is 5.33333333333
[1539]2101template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packl(bitblock128_t arg1, bitblock128_t arg2)
2102{
2103        return simd128<1>::ifh(simd128<128>::himask(), simd128<128>::slli<(64)>(arg1), arg2);
2104}
2105
[1767]2106//The total number of operations is 37.0
[1539]2107template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packh(bitblock128_t arg1, bitblock128_t arg2)
2108{
2109        return hsimd128<2>::packl(simd128<64>::srli<(1)>(arg1), simd128<64>::srli<(1)>(arg2));
2110}
2111
[1767]2112//The total number of operations is 26.3333333333
[1539]2113template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packh(bitblock128_t arg1, bitblock128_t arg2)
2114{
2115        return hsimd128<4>::packl(simd128<64>::srli<(2)>(arg1), simd128<64>::srli<(2)>(arg2));
2116}
2117
[1767]2118//The total number of operations is 15.6666666667
[1539]2119template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packh(bitblock128_t arg1, bitblock128_t arg2)
2120{
2121        return hsimd128<8>::packl(simd128<64>::srli<(4)>(arg1), simd128<64>::srli<(4)>(arg2));
2122}
2123
[1767]2124//The total number of operations is 3.0
[1539]2125template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packh(bitblock128_t arg1, bitblock128_t arg2)
2126{
2127        return hsimd128<16>::packus(simd128<16>::srli<(8)>(arg1), simd128<16>::srli<(8)>(arg2));
2128}
2129
[1767]2130//The total number of operations is 17.6666666667
[1539]2131template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packh(bitblock128_t arg1, bitblock128_t arg2)
2132{
2133        return hsimd128<32>::packl(simd128<64>::srli<(16)>(arg1), simd128<64>::srli<(16)>(arg2));
2134}
2135
[1767]2136//The total number of operations is 7.0
[1539]2137template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packh(bitblock128_t arg1, bitblock128_t arg2)
2138{
2139        return hsimd128<64>::packl(simd128<64>::srli<(32)>(arg1), simd128<64>::srli<(32)>(arg2));
2140}
2141
[1767]2142//The total number of operations is 5.33333333333
[1539]2143template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packh(bitblock128_t arg1, bitblock128_t arg2)
2144{
2145        return simd128<1>::ifh(simd128<128>::himask(), arg1, simd128<128>::srli<(64)>(arg2));
2146}
2147
[1767]2148//The total number of operations is 73.0
[1539]2149template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2150{
2151        return simd128<(1)>::min(hsimd128<2>::packh(arg1, arg2), hsimd128<2>::packl(arg1, arg2));
2152}
2153
[1767]2154//The total number of operations is 67.3333333333
[1539]2155template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2156{
2157        return simd128<(2)>::min(hsimd128<4>::packh(arg1, arg2), hsimd128<4>::packl(arg1, arg2));
2158}
2159
[1767]2160//The total number of operations is 38.3333333333
[1539]2161template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2162{
2163        return simd128<(4)>::min(hsimd128<8>::packh(arg1, arg2), hsimd128<8>::packl(arg1, arg2));
2164}
2165
[1767]2166//The total number of operations is 10.0
[1539]2167template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2168{
2169        return simd128<(8)>::min(hsimd128<16>::packh(arg1, arg2), hsimd128<16>::packl(arg1, arg2));
2170}
2171
[1767]2172//The total number of operations is 34.3333333333
[1539]2173template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2174{
2175        return simd128<(16)>::min(hsimd128<32>::packh(arg1, arg2), hsimd128<32>::packl(arg1, arg2));
2176}
2177
[1767]2178//The total number of operations is 16.0
[1539]2179template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2180{
2181        return simd128<(32)>::min(hsimd128<64>::packh(arg1, arg2), hsimd128<64>::packl(arg1, arg2));
2182}
2183
[1767]2184//The total number of operations is 28.1666666667
[1539]2185template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::min_hl(bitblock128_t arg1, bitblock128_t arg2)
2186{
2187        return simd128<(64)>::min(hsimd128<128>::packh(arg1, arg2), hsimd128<128>::packl(arg1, arg2));
2188}
2189
[1767]2190//The total number of operations is 75.0
[1539]2191template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<2>::packus(bitblock128_t arg1, bitblock128_t arg2)
2192{
2193        bitblock128_t arg11 = simd128<2>::ifh(arg1, simd128<2>::constant<0>(), arg1);
2194        bitblock128_t arg12 = simd_and(simd128<2>::lomask(), arg11);
2195        bitblock128_t arg21 = simd128<2>::ifh(arg2, simd128<2>::constant<0>(), arg2);
2196        bitblock128_t arg22 = simd_and(simd128<2>::lomask(), arg21);
2197        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()));
2198}
2199
[1767]2200//The total number of operations is 74.3333333333
[1539]2201template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<4>::packus(bitblock128_t arg1, bitblock128_t arg2)
2202{
[1767]2203        bitblock128_t hiPart = hsimd128<4>::packh(arg1, arg2);
2204        return simd128<(2)>::ifh(hiPart, simd128<(2)>::constant<0>(), simd_or(simd128<(2)>::gt(hiPart, simd128<(2)>::constant<0>()), hsimd128<4>::packl(arg1, arg2)));
[1539]2205}
2206
[1767]2207//The total number of operations is 31.6666666667
[1539]2208template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<8>::packus(bitblock128_t arg1, bitblock128_t arg2)
2209{
2210        bitblock128_t arg11 = simd128<8>::ifh(arg1, simd128<8>::constant<0>(), arg1);
2211        bitblock128_t arg12 = simd_and(simd128<8>::lomask(), arg11);
2212        bitblock128_t arg21 = simd128<8>::ifh(arg2, simd128<8>::constant<0>(), arg2);
2213        bitblock128_t arg22 = simd_and(simd128<8>::lomask(), arg21);
2214        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()));
2215}
2216
[1767]2217//The total number of operations is 1.0
[1539]2218template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<16>::packus(bitblock128_t arg1, bitblock128_t arg2)
2219{
2220        return _mm_packus_epi16(arg2, arg1);
2221}
2222
[1767]2223//The total number of operations is 33.6666666667
[1539]2224template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<32>::packus(bitblock128_t arg1, bitblock128_t arg2)
2225{
2226        bitblock128_t arg11 = simd128<32>::ifh(arg1, simd128<32>::constant<0>(), arg1);
2227        bitblock128_t arg12 = simd_and(simd128<32>::lomask(), arg11);
2228        bitblock128_t arg21 = simd128<32>::ifh(arg2, simd128<32>::constant<0>(), arg2);
2229        bitblock128_t arg22 = simd_and(simd128<32>::lomask(), arg21);
2230        return hsimd128<32>::packl(simd128<1>::ifh(simd128<32>::eq(arg12, arg11), arg12, simd128<32>::lomask()), simd128<1>::ifh(simd128<32>::eq(arg22, arg21), arg22, simd128<32>::lomask()));
2231}
2232
[1767]2233//The total number of operations is 18.0
[1539]2234template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<64>::packus(bitblock128_t arg1, bitblock128_t arg2)
2235{
2236        bitblock128_t hiPart = hsimd128<64>::packh(arg1, arg2);
2237        return simd128<(32)>::ifh(hiPart, simd128<(32)>::constant<0>(), simd_or(simd128<(32)>::gt(hiPart, simd128<(32)>::constant<0>()), hsimd128<64>::packl(arg1, arg2)));
2238}
2239
[1767]2240//The total number of operations is 34.1666666667
[1539]2241template <> IDISA_ALWAYS_INLINE bitblock128_t hsimd128<128>::packus(bitblock128_t arg1, bitblock128_t arg2)
2242{
2243        bitblock128_t hiPart = hsimd128<128>::packh(arg1, arg2);
2244        return simd128<(64)>::ifh(hiPart, simd128<(64)>::constant<0>(), simd_or(simd128<(64)>::gt(hiPart, simd128<(64)>::constant<0>()), hsimd128<128>::packl(arg1, arg2)));
2245}
2246
[1767]2247//The total number of operations is 31.0
[1539]2248template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2249{
2250        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));
2251}
2252
[1767]2253//The total number of operations is 21.0
[1539]2254template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2255{
2256        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));
2257}
2258
[1767]2259//The total number of operations is 11.0
[1539]2260template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2261{
2262        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));
2263}
2264
[1767]2265//The total number of operations is 1.0
[1539]2266template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2267{
2268        return _mm_unpacklo_epi8(arg2, arg1);
2269}
2270
[1767]2271//The total number of operations is 1.0
[1539]2272template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2273{
2274        return _mm_unpacklo_epi16(arg2, arg1);
2275}
2276
[1767]2277//The total number of operations is 1.0
[1539]2278template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2279{
2280        return _mm_unpacklo_epi32(arg2, arg1);
2281}
2282
[1767]2283//The total number of operations is 1.0
[1539]2284template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::mergel(bitblock128_t arg1, bitblock128_t arg2)
2285{
2286        return _mm_unpacklo_epi64(arg2, arg1);
2287}
2288
[1767]2289//The total number of operations is 31.0
[1539]2290template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2291{
2292        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));
2293}
2294
[1767]2295//The total number of operations is 21.0
[1539]2296template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2297{
2298        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));
2299}
2300
[1767]2301//The total number of operations is 11.0
[1539]2302template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2303{
2304        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));
2305}
2306
[1767]2307//The total number of operations is 1.0
[1539]2308template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2309{
2310        return _mm_unpackhi_epi8(arg2, arg1);
2311}
2312
[1767]2313//The total number of operations is 1.0
[1539]2314template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2315{
2316        return _mm_unpackhi_epi16(arg2, arg1);
2317}
2318
[1767]2319//The total number of operations is 1.0
[1539]2320template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2321{
2322        return _mm_unpackhi_epi32(arg2, arg1);
2323}
2324
[1767]2325//The total number of operations is 1.0
[1539]2326template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::mergeh(bitblock128_t arg1, bitblock128_t arg2)
2327{
2328        return _mm_unpackhi_epi64(arg2, arg1);
2329}
2330
[1767]2331//The total number of operations is 24.0
[1539]2332template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::zeroextendh(bitblock128_t arg1)
2333{
2334        return esimd128<(2)>::mergeh(simd128<(2)>::srli<1>(arg1), simd_and(simd128<(2)>::lomask(), arg1));
2335}
2336
[1767]2337//The total number of operations is 14.0
[1539]2338template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::zeroextendh(bitblock128_t arg1)
2339{
2340        return esimd128<(4)>::mergeh(simd128<(4)>::srli<2>(arg1), simd_and(simd128<(4)>::lomask(), arg1));
2341}
2342
[1767]2343//The total number of operations is 4.0
[1539]2344template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::zeroextendh(bitblock128_t arg1)
2345{
2346        return esimd128<(8)>::mergeh(simd128<(8)>::srli<4>(arg1), simd_and(simd128<(8)>::lomask(), arg1));
2347}
2348
[1767]2349//The total number of operations is 3.0
[1539]2350template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::zeroextendh(bitblock128_t arg1)
2351{
2352        return esimd128<(16)>::mergeh(simd128<(16)>::srli<8>(arg1), simd_and(simd128<(16)>::lomask(), arg1));
2353}
2354
[1767]2355//The total number of operations is 3.0
[1539]2356template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::zeroextendh(bitblock128_t arg1)
2357{
2358        return esimd128<(32)>::mergeh(simd128<(32)>::srli<16>(arg1), simd_and(simd128<(32)>::lomask(), arg1));
2359}
2360
[1767]2361//The total number of operations is 3.0
[1539]2362template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::zeroextendh(bitblock128_t arg1)
2363{
2364        return esimd128<(64)>::mergeh(simd128<(64)>::srli<32>(arg1), simd_and(simd128<(64)>::lomask(), arg1));
2365}
2366
[1767]2367//The total number of operations is 2.33333333333
[1539]2368template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::zeroextendh(bitblock128_t arg1)
2369{
2370        return simd128<(128)>::srli<64>(arg1);
2371}
2372
[1767]2373//The total number of operations is 24.0
[1539]2374template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::zeroextendl(bitblock128_t arg1)
2375{
2376        return esimd128<(2)>::mergel(simd128<(2)>::srli<1>(arg1), simd_and(simd128<(2)>::lomask(), arg1));
2377}
2378
[1767]2379//The total number of operations is 14.0
[1539]2380template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::zeroextendl(bitblock128_t arg1)
2381{
2382        return esimd128<(4)>::mergel(simd128<(4)>::srli<2>(arg1), simd_and(simd128<(4)>::lomask(), arg1));
2383}
2384
[1767]2385//The total number of operations is 4.0
[1539]2386template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::zeroextendl(bitblock128_t arg1)
2387{
2388        return esimd128<(8)>::mergel(simd128<(8)>::srli<4>(arg1), simd_and(simd128<(8)>::lomask(), arg1));
2389}
2390
[1767]2391//The total number of operations is 3.0
[1539]2392template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::zeroextendl(bitblock128_t arg1)
2393{
2394        return esimd128<(16)>::mergel(simd128<(16)>::srli<8>(arg1), simd_and(simd128<(16)>::lomask(), arg1));
2395}
2396
[1767]2397//The total number of operations is 3.0
[1539]2398template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::zeroextendl(bitblock128_t arg1)
2399{
2400        return esimd128<(32)>::mergel(simd128<(32)>::srli<16>(arg1), simd_and(simd128<(32)>::lomask(), arg1));
2401}
2402
[1767]2403//The total number of operations is 3.0
[1539]2404template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::zeroextendl(bitblock128_t arg1)
2405{
2406        return esimd128<(64)>::mergel(simd128<(64)>::srli<32>(arg1), simd_and(simd128<(64)>::lomask(), arg1));
2407}
2408
[1767]2409//The total number of operations is 1.0
[1539]2410template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::zeroextendl(bitblock128_t arg1)
2411{
2412        return simd_and(simd128<(128)>::lomask(), arg1);
2413}
2414
[1767]2415//The total number of operations is 31.0
[1539]2416template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::signextendh(bitblock128_t arg1)
2417{
2418        return esimd128<(2)>::mergeh(simd128<(2)>::srai<1>(arg1), simd128<(2)>::srai<1>(simd128<(2)>::slli<1>(arg1)));
2419}
2420
[1767]2421//The total number of operations is 33.0
[1539]2422template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::signextendh(bitblock128_t arg1)
2423{
2424        return esimd128<(4)>::mergeh(simd128<(4)>::srai<2>(arg1), simd128<(4)>::srai<2>(simd128<(4)>::slli<2>(arg1)));
2425}
2426
[1767]2427//The total number of operations is 13.0
[1539]2428template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::signextendh(bitblock128_t arg1)
2429{
2430        return esimd128<(8)>::mergeh(simd128<(8)>::srai<4>(arg1), simd128<(8)>::srai<4>(simd128<(8)>::slli<4>(arg1)));
2431}
2432
[1767]2433//The total number of operations is 4.0
[1539]2434template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::signextendh(bitblock128_t arg1)
2435{
2436        return esimd128<(16)>::mergeh(simd128<(16)>::srai<8>(arg1), simd128<(16)>::srai<8>(simd128<(16)>::slli<8>(arg1)));
2437}
2438
[1767]2439//The total number of operations is 4.0
[1539]2440template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::signextendh(bitblock128_t arg1)
2441{
2442        return esimd128<(32)>::mergeh(simd128<(32)>::srai<16>(arg1), simd128<(32)>::srai<16>(simd128<(32)>::slli<16>(arg1)));
2443}
2444
[1767]2445//The total number of operations is 11.0
[1539]2446template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<32>::signextendh(bitblock128_t arg1)
2447{
2448        return esimd128<(64)>::mergeh(simd128<(64)>::srai<32>(arg1), simd128<(64)>::srai<32>(simd128<(64)>::slli<32>(arg1)));
2449}
2450
[1767]2451//The total number of operations is 11.0833333333
[1539]2452template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<64>::signextendh(bitblock128_t arg1)
2453{
2454        return simd128<(128)>::srai<64>(arg1);
2455}
2456
[1767]2457//The total number of operations is 31.0
[1539]2458template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<1>::signextendl(bitblock128_t arg1)
2459{
2460        return esimd128<(2)>::mergel(simd128<(2)>::srai<1>(arg1), simd128<(2)>::srai<1>(simd128<(2)>::slli<1>(arg1)));
2461}
2462
[1767]2463//The total number of operations is 33.0
[1539]2464template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<2>::signextendl(bitblock128_t arg1)
2465{
2466        return esimd128<(4)>::mergel(simd128<(4)>::srai<2>(arg1), simd128<(4)>::srai<2>(simd128<(4)>::slli<2>(arg1)));
2467}
2468
[1767]2469//The total number of operations is 13.0
[1539]2470template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<4>::signextendl(bitblock128_t arg1)
2471{
2472        return esimd128<(8)>::mergel(simd128<(8)>::srai<4>(arg1), simd128<(8)>::srai<4>(simd128<(8)>::slli<4>(arg1)));
2473}
2474
[1767]2475//The total number of operations is 4.0
[1539]2476template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<8>::signextendl(bitblock128_t arg1)
2477{
2478        return esimd128<(16)>::mergel(simd128<(16)>::srai<8>(arg1), simd128<(16)>::srai<8>(simd128<(16)>::slli<8>(arg1)));
2479}
2480
[1767]2481//The total number of operations is 4.0
[1539]2482template <> IDISA_ALWAYS_INLINE bitblock128_t esimd128<16>::signextendl(bitblock128_t arg1)
2483{
2484        return esimd128<(32)>::mergel(simd128<(32)>::srai<16>(arg1), simd128<(32)>::srai<16>(simd128<(32)>::slli<16>(arg1)));
2485}
2486
[1767]2487//The total number of operations is 11.0
[1539]2488template <> IDISA_ALWAYS_INLINE bitblock128_t esimd