source: trunk/lib/idisa_cpp/idisa_avx2.cpp

Last change on this file was 4905, checked in by cameron, 3 years ago

Fix compilation issue

File size: 189.5 KB
Line 
1
2/* Copyright (c) 2011, Hua Huang and Robert D. Cameron.
3   Licensed under the Academic Free License 3.0.
4   This file is generated by the IDISA+ generator;
5   modifications should be made only by changing the
6   generator configuration and data files. */
7
8#ifndef IDISA_AVX2_CPP
9#define IDISA_AVX2_CPP
10#include <stdint.h>
11#include "../config.hpp"
12
13#include "immintrin.h"
14
15#include "emmintrin.h"
16
17typedef __m256i bitblock256_t;
18               
19#ifndef FIELD_TYPE
20#define FIELD_TYPE     
21template <uint32_t fw> struct FieldType {
22   typedef int T;  //default for FieldType::T is int
23};
24
25template <> struct FieldType<1> {typedef uint8_t T;};
26template <> struct FieldType<2> {typedef uint8_t T;};
27template <> struct FieldType<4> {typedef uint8_t T;};
28template <> struct FieldType<8> {typedef uint8_t T;};
29template <> struct FieldType<16> {typedef uint16_t T;};
30template <> struct FieldType<32> {typedef uint32_t T;};
31template <> struct FieldType<64> {typedef uint64_t T;};
32template <> struct FieldType<128> {typedef uint64_t T;};
33template <> struct FieldType<256> {typedef uint64_t T;};
34#endif
35
36template <uint32_t fw>
37class simd256
38{
39public:
40        static IDISA_ALWAYS_INLINE bitblock256_t max(bitblock256_t arg1, bitblock256_t arg2);
41        static IDISA_ALWAYS_INLINE bitblock256_t mult(bitblock256_t arg1, bitblock256_t arg2);
42        static IDISA_ALWAYS_INLINE bitblock256_t gt(bitblock256_t arg1, bitblock256_t arg2);
43        static IDISA_ALWAYS_INLINE bitblock256_t umult(bitblock256_t arg1, bitblock256_t arg2);
44        static IDISA_ALWAYS_INLINE bitblock256_t ult(bitblock256_t arg1, bitblock256_t arg2);
45        static IDISA_ALWAYS_INLINE bitblock256_t all(bitblock256_t arg1);
46        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t srli(bitblock256_t arg1);
47        static IDISA_ALWAYS_INLINE bitblock256_t ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
48        static IDISA_ALWAYS_INLINE bitblock256_t ctz(bitblock256_t arg1);
49        static IDISA_ALWAYS_INLINE bitblock256_t sll(bitblock256_t arg1, bitblock256_t shift_mask);
50        static IDISA_ALWAYS_INLINE bitblock256_t eq(bitblock256_t arg1, bitblock256_t arg2);
51        static IDISA_ALWAYS_INLINE bitblock256_t popcount(bitblock256_t arg1);
52        static IDISA_ALWAYS_INLINE bitblock256_t sra(bitblock256_t arg1, bitblock256_t shift_mask);
53        static IDISA_ALWAYS_INLINE bitblock256_t neg(bitblock256_t arg1);
54        static IDISA_ALWAYS_INLINE bitblock256_t himask();
55        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t slli(bitblock256_t arg1);
56        static IDISA_ALWAYS_INLINE bitblock256_t sub(bitblock256_t arg1, bitblock256_t arg2);
57        static IDISA_ALWAYS_INLINE bitblock256_t add_hl(bitblock256_t arg1);
58        static IDISA_ALWAYS_INLINE bitblock256_t srl(bitblock256_t arg1, bitblock256_t shift_mask);
59        static IDISA_ALWAYS_INLINE bitblock256_t lomask();
60        static IDISA_ALWAYS_INLINE bitblock256_t lt(bitblock256_t arg1, bitblock256_t arg2);
61        static IDISA_ALWAYS_INLINE bitblock256_t umin(bitblock256_t arg1, bitblock256_t arg2);
62        template <typename FieldType<fw>::T val> static IDISA_ALWAYS_INLINE bitblock256_t constant();
63        static IDISA_ALWAYS_INLINE bitblock256_t min(bitblock256_t arg1, bitblock256_t arg2);
64        static IDISA_ALWAYS_INLINE bitblock256_t umax(bitblock256_t arg1, bitblock256_t arg2);
65        static IDISA_ALWAYS_INLINE bitblock256_t abs(bitblock256_t arg1);
66        static IDISA_ALWAYS_INLINE bitblock256_t xor_hl(bitblock256_t arg1);
67        static IDISA_ALWAYS_INLINE bitblock256_t any(bitblock256_t arg1);
68        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t srai(bitblock256_t arg1);
69        static IDISA_ALWAYS_INLINE bitblock256_t add(bitblock256_t arg1, bitblock256_t arg2);
70        static IDISA_ALWAYS_INLINE bitblock256_t ugt(bitblock256_t arg1, bitblock256_t arg2);
71};
72
73template <uint32_t fw>
74class hsimd256
75{
76public:
77        static IDISA_ALWAYS_INLINE bitblock256_t umin_hl(bitblock256_t arg1, bitblock256_t arg2);
78        static IDISA_ALWAYS_INLINE bitblock256_t add_hl(bitblock256_t arg1, bitblock256_t arg2);
79        static IDISA_ALWAYS_INLINE bitblock256_t packss(bitblock256_t arg1, bitblock256_t arg2);
80        static IDISA_ALWAYS_INLINE bitblock256_t packh(bitblock256_t arg1, bitblock256_t arg2);
81        static IDISA_ALWAYS_INLINE typename FieldType<256/fw>::T signmask(bitblock256_t arg1);
82        static IDISA_ALWAYS_INLINE bitblock256_t packl(bitblock256_t arg1, bitblock256_t arg2);
83        static IDISA_ALWAYS_INLINE bitblock256_t min_hl(bitblock256_t arg1, bitblock256_t arg2);
84        static IDISA_ALWAYS_INLINE bitblock256_t packus(bitblock256_t arg1, bitblock256_t arg2);
85};
86
87template <uint32_t fw>
88class esimd256
89{
90public:
91        static IDISA_ALWAYS_INLINE bitblock256_t mergel(bitblock256_t arg1, bitblock256_t arg2);
92        static IDISA_ALWAYS_INLINE bitblock256_t signextendh(bitblock256_t arg1);
93        static IDISA_ALWAYS_INLINE bitblock256_t mergeh(bitblock256_t arg1, bitblock256_t arg2);
94        static IDISA_ALWAYS_INLINE bitblock256_t zeroextendh(bitblock256_t arg1);
95        static IDISA_ALWAYS_INLINE bitblock256_t zeroextendl(bitblock256_t arg1);
96        static IDISA_ALWAYS_INLINE bitblock256_t signextendl(bitblock256_t arg1);
97};
98
99template <uint32_t fw>
100class mvmd256
101{
102public:
103        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t dsrli(bitblock256_t arg1, bitblock256_t arg2);
104        static IDISA_ALWAYS_INLINE bitblock256_t fill(typename FieldType<fw>::T val1);
105        template <uint16_t pos> static IDISA_ALWAYS_INLINE typename FieldType<fw>::T extract(bitblock256_t arg1);
106        template <uint16_t pos> static IDISA_ALWAYS_INLINE bitblock256_t splat(bitblock256_t arg1);
107        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t slli(bitblock256_t arg1);
108        static IDISA_ALWAYS_INLINE bitblock256_t fill4(typename FieldType<fw>::T val1, typename FieldType<fw>::T val2, typename FieldType<fw>::T val3, typename FieldType<fw>::T val4);
109        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t srli(bitblock256_t arg1);
110        static IDISA_ALWAYS_INLINE bitblock256_t fill2(typename FieldType<fw>::T val1, typename FieldType<fw>::T val2);
111        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t dslli(bitblock256_t arg1, bitblock256_t arg2);
112        static IDISA_ALWAYS_INLINE bitblock256_t fill8(typename FieldType<fw>::T val1, typename FieldType<fw>::T val2, typename FieldType<fw>::T val3, typename FieldType<fw>::T val4, typename FieldType<fw>::T val5, typename FieldType<fw>::T val6, typename FieldType<fw>::T val7, typename FieldType<fw>::T val8);
113        static IDISA_ALWAYS_INLINE bitblock256_t fill16(typename FieldType<fw>::T val1, typename FieldType<fw>::T val2, typename FieldType<fw>::T val3, typename FieldType<fw>::T val4, typename FieldType<fw>::T val5, typename FieldType<fw>::T val6, typename FieldType<fw>::T val7, typename FieldType<fw>::T val8, typename FieldType<fw>::T val9, typename FieldType<fw>::T val10, typename FieldType<fw>::T val11, typename FieldType<fw>::T val12, typename FieldType<fw>::T val13, typename FieldType<fw>::T val14, typename FieldType<fw>::T val15, typename FieldType<fw>::T val16);
114        template <uint16_t pos> static IDISA_ALWAYS_INLINE bitblock256_t insert(bitblock256_t arg1, typename FieldType<fw>::T arg2);
115};
116
117class bitblock256
118{
119public:
120        static IDISA_ALWAYS_INLINE bitblock256_t sll(bitblock256_t arg1, bitblock256_t arg2);
121        static IDISA_ALWAYS_INLINE bitblock256_t load_unaligned(const bitblock256_t* arg1);
122        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t srli(bitblock256_t arg1);
123        static IDISA_ALWAYS_INLINE bitblock256_t srl(bitblock256_t arg1, bitblock256_t arg2);
124        static IDISA_ALWAYS_INLINE bool all(bitblock256_t arg1);
125        static IDISA_ALWAYS_INLINE bool any(bitblock256_t arg1);
126        static IDISA_ALWAYS_INLINE uint16_t popcount(bitblock256_t arg1);
127        template <uint16_t sh> static IDISA_ALWAYS_INLINE bitblock256_t slli(bitblock256_t arg1);
128        static IDISA_ALWAYS_INLINE bitblock256_t load_aligned(const bitblock256_t* arg1);
129        static IDISA_ALWAYS_INLINE void store_aligned(bitblock256_t arg1, bitblock256_t* arg2);
130        static IDISA_ALWAYS_INLINE void store_unaligned(bitblock256_t arg1, bitblock256_t* arg2);
131};
132
133//Declaration Part
134IDISA_ALWAYS_INLINE bitblock256_t simd_nor(bitblock256_t arg1, bitblock256_t arg2);
135IDISA_ALWAYS_INLINE bitblock256_t simd_not(bitblock256_t arg1);
136IDISA_ALWAYS_INLINE bitblock256_t simd_andc(bitblock256_t arg1, bitblock256_t arg2);
137IDISA_ALWAYS_INLINE bitblock256_t simd_or(bitblock256_t arg1, bitblock256_t arg2);
138IDISA_ALWAYS_INLINE bitblock256_t simd_and(bitblock256_t arg1, bitblock256_t arg2);
139IDISA_ALWAYS_INLINE bitblock256_t simd_xor(bitblock256_t arg1, bitblock256_t arg2);
140template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::max(bitblock256_t arg1, bitblock256_t arg2);
141template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::max(bitblock256_t arg1, bitblock256_t arg2);
142template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::max(bitblock256_t arg1, bitblock256_t arg2);
143template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::max(bitblock256_t arg1, bitblock256_t arg2);
144template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::max(bitblock256_t arg1, bitblock256_t arg2);
145template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::max(bitblock256_t arg1, bitblock256_t arg2);
146template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::max(bitblock256_t arg1, bitblock256_t arg2);
147template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::max(bitblock256_t arg1, bitblock256_t arg2);
148template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::max(bitblock256_t arg1, bitblock256_t arg2);
149template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::mult(bitblock256_t arg1, bitblock256_t arg2);
150template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::mult(bitblock256_t arg1, bitblock256_t arg2);
151template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::mult(bitblock256_t arg1, bitblock256_t arg2);
152template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::mult(bitblock256_t arg1, bitblock256_t arg2);
153template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::mult(bitblock256_t arg1, bitblock256_t arg2);
154template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::mult(bitblock256_t arg1, bitblock256_t arg2);
155template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::mult(bitblock256_t arg1, bitblock256_t arg2);
156template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::mult(bitblock256_t arg1, bitblock256_t arg2);
157template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::mult(bitblock256_t arg1, bitblock256_t arg2);
158template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::gt(bitblock256_t arg1, bitblock256_t arg2);
159template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::gt(bitblock256_t arg1, bitblock256_t arg2);
160template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::gt(bitblock256_t arg1, bitblock256_t arg2);
161template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::gt(bitblock256_t arg1, bitblock256_t arg2);
162template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::gt(bitblock256_t arg1, bitblock256_t arg2);
163template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::gt(bitblock256_t arg1, bitblock256_t arg2);
164template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::gt(bitblock256_t arg1, bitblock256_t arg2);
165template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::gt(bitblock256_t arg1, bitblock256_t arg2);
166template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::gt(bitblock256_t arg1, bitblock256_t arg2);
167template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::umult(bitblock256_t arg1, bitblock256_t arg2);
168template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::umult(bitblock256_t arg1, bitblock256_t arg2);
169template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::umult(bitblock256_t arg1, bitblock256_t arg2);
170template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::umult(bitblock256_t arg1, bitblock256_t arg2);
171template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::umult(bitblock256_t arg1, bitblock256_t arg2);
172template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::umult(bitblock256_t arg1, bitblock256_t arg2);
173template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::umult(bitblock256_t arg1, bitblock256_t arg2);
174template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::umult(bitblock256_t arg1, bitblock256_t arg2);
175template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ult(bitblock256_t arg1, bitblock256_t arg2);
176template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ult(bitblock256_t arg1, bitblock256_t arg2);
177template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ult(bitblock256_t arg1, bitblock256_t arg2);
178template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::ult(bitblock256_t arg1, bitblock256_t arg2);
179template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::ult(bitblock256_t arg1, bitblock256_t arg2);
180template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::ult(bitblock256_t arg1, bitblock256_t arg2);
181template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::ult(bitblock256_t arg1, bitblock256_t arg2);
182template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::ult(bitblock256_t arg1, bitblock256_t arg2);
183template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::ult(bitblock256_t arg1, bitblock256_t arg2);
184template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::all(bitblock256_t arg1);
185template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::all(bitblock256_t arg1);
186template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::all(bitblock256_t arg1);
187template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::all(bitblock256_t arg1);
188template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::all(bitblock256_t arg1);
189template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::all(bitblock256_t arg1);
190template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::all(bitblock256_t arg1);
191template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::all(bitblock256_t arg1);
192template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::srli(bitblock256_t arg1);
193template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::srli(bitblock256_t arg1);
194template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::srli(bitblock256_t arg1);
195template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::srli(bitblock256_t arg1);
196template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::srli(bitblock256_t arg1);
197template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::srli(bitblock256_t arg1);
198template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::srli(bitblock256_t arg1);
199template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::srli(bitblock256_t arg1);
200template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ctz(bitblock256_t arg1);
201template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ctz(bitblock256_t arg1);
202template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ctz(bitblock256_t arg1);
203template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::ctz(bitblock256_t arg1);
204template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::ctz(bitblock256_t arg1);
205template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::ctz(bitblock256_t arg1);
206template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::ctz(bitblock256_t arg1);
207template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::ctz(bitblock256_t arg1);
208template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::ctz(bitblock256_t arg1);
209template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::sll(bitblock256_t arg1, bitblock256_t shift_mask);
210template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::sll(bitblock256_t arg1, bitblock256_t shift_mask);
211template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::sll(bitblock256_t arg1, bitblock256_t shift_mask);
212template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::sll(bitblock256_t arg1, bitblock256_t shift_mask);
213template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::sub(bitblock256_t arg1, bitblock256_t arg2);
214template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::sub(bitblock256_t arg1, bitblock256_t arg2);
215template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::sub(bitblock256_t arg1, bitblock256_t arg2);
216template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::sub(bitblock256_t arg1, bitblock256_t arg2);
217template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::sub(bitblock256_t arg1, bitblock256_t arg2);
218template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::sub(bitblock256_t arg1, bitblock256_t arg2);
219template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::sub(bitblock256_t arg1, bitblock256_t arg2);
220template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::sub(bitblock256_t arg1, bitblock256_t arg2);
221template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::sub(bitblock256_t arg1, bitblock256_t arg2);
222template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ugt(bitblock256_t arg1, bitblock256_t arg2);
223template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ugt(bitblock256_t arg1, bitblock256_t arg2);
224template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ugt(bitblock256_t arg1, bitblock256_t arg2);
225template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::ugt(bitblock256_t arg1, bitblock256_t arg2);
226template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::ugt(bitblock256_t arg1, bitblock256_t arg2);
227template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::ugt(bitblock256_t arg1, bitblock256_t arg2);
228template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::ugt(bitblock256_t arg1, bitblock256_t arg2);
229template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::ugt(bitblock256_t arg1, bitblock256_t arg2);
230template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::ugt(bitblock256_t arg1, bitblock256_t arg2);
231template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::xor_hl(bitblock256_t arg1);
232template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::xor_hl(bitblock256_t arg1);
233template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::xor_hl(bitblock256_t arg1);
234template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::xor_hl(bitblock256_t arg1);
235template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::xor_hl(bitblock256_t arg1);
236template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::xor_hl(bitblock256_t arg1);
237template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::xor_hl(bitblock256_t arg1);
238template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::xor_hl(bitblock256_t arg1);
239template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::popcount(bitblock256_t arg1);
240template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::popcount(bitblock256_t arg1);
241template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::popcount(bitblock256_t arg1);
242template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::popcount(bitblock256_t arg1);
243template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::popcount(bitblock256_t arg1);
244template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::popcount(bitblock256_t arg1);
245template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::popcount(bitblock256_t arg1);
246template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::popcount(bitblock256_t arg1);
247template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::popcount(bitblock256_t arg1);
248template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::any(bitblock256_t arg1);
249template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::any(bitblock256_t arg1);
250template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::any(bitblock256_t arg1);
251template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::any(bitblock256_t arg1);
252template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::any(bitblock256_t arg1);
253template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::any(bitblock256_t arg1);
254template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::any(bitblock256_t arg1);
255template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::any(bitblock256_t arg1);
256template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::sra(bitblock256_t arg1, bitblock256_t shift_mask);
257template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::sra(bitblock256_t arg1, bitblock256_t shift_mask);
258template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::neg(bitblock256_t arg1);
259template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::neg(bitblock256_t arg1);
260template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::neg(bitblock256_t arg1);
261template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::neg(bitblock256_t arg1);
262template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::neg(bitblock256_t arg1);
263template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::neg(bitblock256_t arg1);
264template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::neg(bitblock256_t arg1);
265template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::neg(bitblock256_t arg1);
266template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::slli(bitblock256_t arg1);
267template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::slli(bitblock256_t arg1);
268template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::slli(bitblock256_t arg1);
269template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::slli(bitblock256_t arg1);
270template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::slli(bitblock256_t arg1);
271template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::slli(bitblock256_t arg1);
272template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::slli(bitblock256_t arg1);
273template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::slli(bitblock256_t arg1);
274template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
275template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
276template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
277template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
278template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
279template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
280template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
281template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
282template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3);
283template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::add_hl(bitblock256_t arg1);
284template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::add_hl(bitblock256_t arg1);
285template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::add_hl(bitblock256_t arg1);
286template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::add_hl(bitblock256_t arg1);
287template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::add_hl(bitblock256_t arg1);
288template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::add_hl(bitblock256_t arg1);
289template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::add_hl(bitblock256_t arg1);
290template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::add_hl(bitblock256_t arg1);
291template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::srl(bitblock256_t arg1, bitblock256_t shift_mask);
292template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::srl(bitblock256_t arg1, bitblock256_t shift_mask);
293template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::srl(bitblock256_t arg1, bitblock256_t shift_mask);
294template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::srl(bitblock256_t arg1, bitblock256_t shift_mask);
295template <> template <FieldType<1>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::constant();
296template <> template <FieldType<2>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::constant();
297template <> template <FieldType<4>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::constant();
298template <> template <FieldType<8>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::constant();
299template <> template <FieldType<16>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::constant();
300template <> template <FieldType<32>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::constant();
301template <> template <FieldType<64>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::constant();
302template <> template <FieldType<128>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::constant();
303template <> template <FieldType<256>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::constant();
304template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::min(bitblock256_t arg1, bitblock256_t arg2);
305template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::min(bitblock256_t arg1, bitblock256_t arg2);
306template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::min(bitblock256_t arg1, bitblock256_t arg2);
307template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::min(bitblock256_t arg1, bitblock256_t arg2);
308template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::min(bitblock256_t arg1, bitblock256_t arg2);
309template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::min(bitblock256_t arg1, bitblock256_t arg2);
310template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::min(bitblock256_t arg1, bitblock256_t arg2);
311template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::min(bitblock256_t arg1, bitblock256_t arg2);
312template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::min(bitblock256_t arg1, bitblock256_t arg2);
313template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::lomask();
314template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::lomask();
315template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::lomask();
316template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::lomask();
317template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::lomask();
318template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::lomask();
319template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::lomask();
320template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::lomask();
321template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::umin(bitblock256_t arg1, bitblock256_t arg2);
322template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::umin(bitblock256_t arg1, bitblock256_t arg2);
323template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::umin(bitblock256_t arg1, bitblock256_t arg2);
324template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::umin(bitblock256_t arg1, bitblock256_t arg2);
325template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::umin(bitblock256_t arg1, bitblock256_t arg2);
326template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::umin(bitblock256_t arg1, bitblock256_t arg2);
327template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::umin(bitblock256_t arg1, bitblock256_t arg2);
328template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::umin(bitblock256_t arg1, bitblock256_t arg2);
329template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::umin(bitblock256_t arg1, bitblock256_t arg2);
330template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::abs(bitblock256_t arg1);
331template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::abs(bitblock256_t arg1);
332template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::abs(bitblock256_t arg1);
333template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::abs(bitblock256_t arg1);
334template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::abs(bitblock256_t arg1);
335template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::abs(bitblock256_t arg1);
336template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::abs(bitblock256_t arg1);
337template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::abs(bitblock256_t arg1);
338template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::eq(bitblock256_t arg1, bitblock256_t arg2);
339template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::eq(bitblock256_t arg1, bitblock256_t arg2);
340template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::eq(bitblock256_t arg1, bitblock256_t arg2);
341template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::eq(bitblock256_t arg1, bitblock256_t arg2);
342template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::eq(bitblock256_t arg1, bitblock256_t arg2);
343template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::eq(bitblock256_t arg1, bitblock256_t arg2);
344template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::eq(bitblock256_t arg1, bitblock256_t arg2);
345template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::eq(bitblock256_t arg1, bitblock256_t arg2);
346template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::eq(bitblock256_t arg1, bitblock256_t arg2);
347template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::srai(bitblock256_t arg1);
348template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::srai(bitblock256_t arg1);
349template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::srai(bitblock256_t arg1);
350template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::srai(bitblock256_t arg1);
351template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::srai(bitblock256_t arg1);
352template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::srai(bitblock256_t arg1);
353template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::srai(bitblock256_t arg1);
354template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::srai(bitblock256_t arg1);
355template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::lt(bitblock256_t arg1, bitblock256_t arg2);
356template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::lt(bitblock256_t arg1, bitblock256_t arg2);
357template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::lt(bitblock256_t arg1, bitblock256_t arg2);
358template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::lt(bitblock256_t arg1, bitblock256_t arg2);
359template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::lt(bitblock256_t arg1, bitblock256_t arg2);
360template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::lt(bitblock256_t arg1, bitblock256_t arg2);
361template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::lt(bitblock256_t arg1, bitblock256_t arg2);
362template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::lt(bitblock256_t arg1, bitblock256_t arg2);
363template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::lt(bitblock256_t arg1, bitblock256_t arg2);
364template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::himask();
365template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::himask();
366template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::himask();
367template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::himask();
368template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::himask();
369template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::himask();
370template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::himask();
371template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::himask();
372template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::add(bitblock256_t arg1, bitblock256_t arg2);
373template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::add(bitblock256_t arg1, bitblock256_t arg2);
374template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::add(bitblock256_t arg1, bitblock256_t arg2);
375template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::add(bitblock256_t arg1, bitblock256_t arg2);
376template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::add(bitblock256_t arg1, bitblock256_t arg2);
377template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::add(bitblock256_t arg1, bitblock256_t arg2);
378template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::add(bitblock256_t arg1, bitblock256_t arg2);
379template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::add(bitblock256_t arg1, bitblock256_t arg2);
380template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::add(bitblock256_t arg1, bitblock256_t arg2);
381template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::umax(bitblock256_t arg1, bitblock256_t arg2);
382template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::umax(bitblock256_t arg1, bitblock256_t arg2);
383template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::umax(bitblock256_t arg1, bitblock256_t arg2);
384template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::umax(bitblock256_t arg1, bitblock256_t arg2);
385template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::umax(bitblock256_t arg1, bitblock256_t arg2);
386template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::umax(bitblock256_t arg1, bitblock256_t arg2);
387template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::umax(bitblock256_t arg1, bitblock256_t arg2);
388template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::umax(bitblock256_t arg1, bitblock256_t arg2);
389template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::umax(bitblock256_t arg1, bitblock256_t arg2);
390template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::umin_hl(bitblock256_t arg1, bitblock256_t arg2);
391template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::umin_hl(bitblock256_t arg1, bitblock256_t arg2);
392template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::umin_hl(bitblock256_t arg1, bitblock256_t arg2);
393template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::umin_hl(bitblock256_t arg1, bitblock256_t arg2);
394template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::umin_hl(bitblock256_t arg1, bitblock256_t arg2);
395template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::umin_hl(bitblock256_t arg1, bitblock256_t arg2);
396template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::umin_hl(bitblock256_t arg1, bitblock256_t arg2);
397template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::umin_hl(bitblock256_t arg1, bitblock256_t arg2);
398template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::add_hl(bitblock256_t arg1, bitblock256_t arg2);
399template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::add_hl(bitblock256_t arg1, bitblock256_t arg2);
400template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::add_hl(bitblock256_t arg1, bitblock256_t arg2);
401template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::add_hl(bitblock256_t arg1, bitblock256_t arg2);
402template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::add_hl(bitblock256_t arg1, bitblock256_t arg2);
403template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::add_hl(bitblock256_t arg1, bitblock256_t arg2);
404template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::add_hl(bitblock256_t arg1, bitblock256_t arg2);
405template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::add_hl(bitblock256_t arg1, bitblock256_t arg2);
406template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packss(bitblock256_t arg1, bitblock256_t arg2);
407template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packss(bitblock256_t arg1, bitblock256_t arg2);
408template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::packss(bitblock256_t arg1, bitblock256_t arg2);
409template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::packss(bitblock256_t arg1, bitblock256_t arg2);
410template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::packss(bitblock256_t arg1, bitblock256_t arg2);
411template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::packss(bitblock256_t arg1, bitblock256_t arg2);
412template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::packss(bitblock256_t arg1, bitblock256_t arg2);
413template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::packss(bitblock256_t arg1, bitblock256_t arg2);
414template <> IDISA_ALWAYS_INLINE FieldType<256/8>::T hsimd256<8>::signmask(bitblock256_t arg1);
415template <> IDISA_ALWAYS_INLINE FieldType<256/16>::T hsimd256<16>::signmask(bitblock256_t arg1);
416template <> IDISA_ALWAYS_INLINE FieldType<256/32>::T hsimd256<32>::signmask(bitblock256_t arg1);
417template <> IDISA_ALWAYS_INLINE FieldType<256/64>::T hsimd256<64>::signmask(bitblock256_t arg1);
418template <> IDISA_ALWAYS_INLINE FieldType<256/128>::T hsimd256<128>::signmask(bitblock256_t arg1);
419template <> IDISA_ALWAYS_INLINE FieldType<256/256>::T hsimd256<256>::signmask(bitblock256_t arg1);
420template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packl(bitblock256_t arg1, bitblock256_t arg2);
421template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packl(bitblock256_t arg1, bitblock256_t arg2);
422template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::packl(bitblock256_t arg1, bitblock256_t arg2);
423template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::packl(bitblock256_t arg1, bitblock256_t arg2);
424template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::packl(bitblock256_t arg1, bitblock256_t arg2);
425template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::packl(bitblock256_t arg1, bitblock256_t arg2);
426template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::packl(bitblock256_t arg1, bitblock256_t arg2);
427template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::packl(bitblock256_t arg1, bitblock256_t arg2);
428template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packh(bitblock256_t arg1, bitblock256_t arg2);
429template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packh(bitblock256_t arg1, bitblock256_t arg2);
430template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::packh(bitblock256_t arg1, bitblock256_t arg2);
431template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::packh(bitblock256_t arg1, bitblock256_t arg2);
432template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::packh(bitblock256_t arg1, bitblock256_t arg2);
433template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::packh(bitblock256_t arg1, bitblock256_t arg2);
434template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::packh(bitblock256_t arg1, bitblock256_t arg2);
435template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::packh(bitblock256_t arg1, bitblock256_t arg2);
436template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::min_hl(bitblock256_t arg1, bitblock256_t arg2);
437template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::min_hl(bitblock256_t arg1, bitblock256_t arg2);
438template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::min_hl(bitblock256_t arg1, bitblock256_t arg2);
439template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::min_hl(bitblock256_t arg1, bitblock256_t arg2);
440template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::min_hl(bitblock256_t arg1, bitblock256_t arg2);
441template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::min_hl(bitblock256_t arg1, bitblock256_t arg2);
442template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::min_hl(bitblock256_t arg1, bitblock256_t arg2);
443template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::min_hl(bitblock256_t arg1, bitblock256_t arg2);
444template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packus(bitblock256_t arg1, bitblock256_t arg2);
445template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packus(bitblock256_t arg1, bitblock256_t arg2);
446template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::packus(bitblock256_t arg1, bitblock256_t arg2);
447template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::packus(bitblock256_t arg1, bitblock256_t arg2);
448template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::packus(bitblock256_t arg1, bitblock256_t arg2);
449template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::packus(bitblock256_t arg1, bitblock256_t arg2);
450template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::packus(bitblock256_t arg1, bitblock256_t arg2);
451template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::packus(bitblock256_t arg1, bitblock256_t arg2);
452template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::mergel(bitblock256_t arg1, bitblock256_t arg2);
453template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::mergel(bitblock256_t arg1, bitblock256_t arg2);
454template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::mergel(bitblock256_t arg1, bitblock256_t arg2);
455template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::mergel(bitblock256_t arg1, bitblock256_t arg2);
456template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::mergel(bitblock256_t arg1, bitblock256_t arg2);
457template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::mergel(bitblock256_t arg1, bitblock256_t arg2);
458template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::mergel(bitblock256_t arg1, bitblock256_t arg2);
459template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::mergel(bitblock256_t arg1, bitblock256_t arg2);
460template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::mergeh(bitblock256_t arg1, bitblock256_t arg2);
461template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::mergeh(bitblock256_t arg1, bitblock256_t arg2);
462template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::mergeh(bitblock256_t arg1, bitblock256_t arg2);
463template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::mergeh(bitblock256_t arg1, bitblock256_t arg2);
464template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::mergeh(bitblock256_t arg1, bitblock256_t arg2);
465template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::mergeh(bitblock256_t arg1, bitblock256_t arg2);
466template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::mergeh(bitblock256_t arg1, bitblock256_t arg2);
467template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::mergeh(bitblock256_t arg1, bitblock256_t arg2);
468template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::zeroextendh(bitblock256_t arg1);
469template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::zeroextendh(bitblock256_t arg1);
470template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::zeroextendh(bitblock256_t arg1);
471template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::zeroextendh(bitblock256_t arg1);
472template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::zeroextendh(bitblock256_t arg1);
473template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::zeroextendh(bitblock256_t arg1);
474template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::zeroextendh(bitblock256_t arg1);
475template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::zeroextendh(bitblock256_t arg1);
476template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::zeroextendl(bitblock256_t arg1);
477template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::zeroextendl(bitblock256_t arg1);
478template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::zeroextendl(bitblock256_t arg1);
479template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::zeroextendl(bitblock256_t arg1);
480template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::zeroextendl(bitblock256_t arg1);
481template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::zeroextendl(bitblock256_t arg1);
482template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::zeroextendl(bitblock256_t arg1);
483template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::zeroextendl(bitblock256_t arg1);
484template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::signextendh(bitblock256_t arg1);
485template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::signextendh(bitblock256_t arg1);
486template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::signextendh(bitblock256_t arg1);
487template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::signextendh(bitblock256_t arg1);
488template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::signextendh(bitblock256_t arg1);
489template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::signextendh(bitblock256_t arg1);
490template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::signextendh(bitblock256_t arg1);
491template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::signextendh(bitblock256_t arg1);
492template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::signextendl(bitblock256_t arg1);
493template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::signextendl(bitblock256_t arg1);
494template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::signextendl(bitblock256_t arg1);
495template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::signextendl(bitblock256_t arg1);
496template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::signextendl(bitblock256_t arg1);
497template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::signextendl(bitblock256_t arg1);
498template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::signextendl(bitblock256_t arg1);
499template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::signextendl(bitblock256_t arg1);
500template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::dsrli(bitblock256_t arg1, bitblock256_t arg2);
501template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::dsrli(bitblock256_t arg1, bitblock256_t arg2);
502template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::dsrli(bitblock256_t arg1, bitblock256_t arg2);
503template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::dsrli(bitblock256_t arg1, bitblock256_t arg2);
504template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::dsrli(bitblock256_t arg1, bitblock256_t arg2);
505template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::dsrli(bitblock256_t arg1, bitblock256_t arg2);
506template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::dsrli(bitblock256_t arg1, bitblock256_t arg2);
507template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::dsrli(bitblock256_t arg1, bitblock256_t arg2);
508template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill16(FieldType<1>::T val1, FieldType<1>::T val2, FieldType<1>::T val3, FieldType<1>::T val4, FieldType<1>::T val5, FieldType<1>::T val6, FieldType<1>::T val7, FieldType<1>::T val8, FieldType<1>::T val9, FieldType<1>::T val10, FieldType<1>::T val11, FieldType<1>::T val12, FieldType<1>::T val13, FieldType<1>::T val14, FieldType<1>::T val15, FieldType<1>::T val16);
509template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill16(FieldType<2>::T val1, FieldType<2>::T val2, FieldType<2>::T val3, FieldType<2>::T val4, FieldType<2>::T val5, FieldType<2>::T val6, FieldType<2>::T val7, FieldType<2>::T val8, FieldType<2>::T val9, FieldType<2>::T val10, FieldType<2>::T val11, FieldType<2>::T val12, FieldType<2>::T val13, FieldType<2>::T val14, FieldType<2>::T val15, FieldType<2>::T val16);
510template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill16(FieldType<4>::T val1, FieldType<4>::T val2, FieldType<4>::T val3, FieldType<4>::T val4, FieldType<4>::T val5, FieldType<4>::T val6, FieldType<4>::T val7, FieldType<4>::T val8, FieldType<4>::T val9, FieldType<4>::T val10, FieldType<4>::T val11, FieldType<4>::T val12, FieldType<4>::T val13, FieldType<4>::T val14, FieldType<4>::T val15, FieldType<4>::T val16);
511template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill16(FieldType<8>::T val1, FieldType<8>::T val2, FieldType<8>::T val3, FieldType<8>::T val4, FieldType<8>::T val5, FieldType<8>::T val6, FieldType<8>::T val7, FieldType<8>::T val8, FieldType<8>::T val9, FieldType<8>::T val10, FieldType<8>::T val11, FieldType<8>::T val12, FieldType<8>::T val13, FieldType<8>::T val14, FieldType<8>::T val15, FieldType<8>::T val16);
512template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill16(FieldType<16>::T val1, FieldType<16>::T val2, FieldType<16>::T val3, FieldType<16>::T val4, FieldType<16>::T val5, FieldType<16>::T val6, FieldType<16>::T val7, FieldType<16>::T val8, FieldType<16>::T val9, FieldType<16>::T val10, FieldType<16>::T val11, FieldType<16>::T val12, FieldType<16>::T val13, FieldType<16>::T val14, FieldType<16>::T val15, FieldType<16>::T val16);
513template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill(FieldType<1>::T val1);
514template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill(FieldType<2>::T val1);
515template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill(FieldType<4>::T val1);
516template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill(FieldType<8>::T val1);
517template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill(FieldType<16>::T val1);
518template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::fill(FieldType<32>::T val1);
519template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::fill(FieldType<64>::T val1);
520template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::fill(FieldType<128>::T val1);
521template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::fill(FieldType<256>::T val1);
522template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<1>::T mvmd256<1>::extract(bitblock256_t arg1);
523template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<2>::T mvmd256<2>::extract(bitblock256_t arg1);
524template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<4>::T mvmd256<4>::extract(bitblock256_t arg1);
525template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<8>::T mvmd256<8>::extract(bitblock256_t arg1);
526template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<16>::T mvmd256<16>::extract(bitblock256_t arg1);
527template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<32>::T mvmd256<32>::extract(bitblock256_t arg1);
528template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<64>::T mvmd256<64>::extract(bitblock256_t arg1);
529template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::splat(bitblock256_t arg1);
530template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::splat(bitblock256_t arg1);
531template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::splat(bitblock256_t arg1);
532template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::splat(bitblock256_t arg1);
533template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::splat(bitblock256_t arg1);
534template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::splat(bitblock256_t arg1);
535template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::splat(bitblock256_t arg1);
536template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::splat(bitblock256_t arg1);
537template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::splat(bitblock256_t arg1);
538template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::insert(bitblock256_t arg1, FieldType<2>::T arg2);
539template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::insert(bitblock256_t arg1, FieldType<4>::T arg2);
540template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::insert(bitblock256_t arg1, FieldType<8>::T arg2);
541template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::insert(bitblock256_t arg1, FieldType<16>::T arg2);
542template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::insert(bitblock256_t arg1, FieldType<32>::T arg2);
543template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::insert(bitblock256_t arg1, FieldType<64>::T arg2);
544template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill4(FieldType<1>::T val1, FieldType<1>::T val2, FieldType<1>::T val3, FieldType<1>::T val4);
545template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill4(FieldType<2>::T val1, FieldType<2>::T val2, FieldType<2>::T val3, FieldType<2>::T val4);
546template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill4(FieldType<4>::T val1, FieldType<4>::T val2, FieldType<4>::T val3, FieldType<4>::T val4);
547template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill4(FieldType<8>::T val1, FieldType<8>::T val2, FieldType<8>::T val3, FieldType<8>::T val4);
548template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill4(FieldType<16>::T val1, FieldType<16>::T val2, FieldType<16>::T val3, FieldType<16>::T val4);
549template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::fill4(FieldType<32>::T val1, FieldType<32>::T val2, FieldType<32>::T val3, FieldType<32>::T val4);
550template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::fill4(FieldType<64>::T val1, FieldType<64>::T val2, FieldType<64>::T val3, FieldType<64>::T val4);
551template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::srli(bitblock256_t arg1);
552template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::srli(bitblock256_t arg1);
553template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::srli(bitblock256_t arg1);
554template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::srli(bitblock256_t arg1);
555template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::srli(bitblock256_t arg1);
556template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::srli(bitblock256_t arg1);
557template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::srli(bitblock256_t arg1);
558template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::srli(bitblock256_t arg1);
559template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill2(FieldType<1>::T val1, FieldType<1>::T val2);
560template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill2(FieldType<2>::T val1, FieldType<2>::T val2);
561template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill2(FieldType<4>::T val1, FieldType<4>::T val2);
562template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill2(FieldType<8>::T val1, FieldType<8>::T val2);
563template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill2(FieldType<16>::T val1, FieldType<16>::T val2);
564template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::fill2(FieldType<32>::T val1, FieldType<32>::T val2);
565template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::fill2(FieldType<64>::T val1, FieldType<64>::T val2);
566template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::fill2(FieldType<128>::T val1, FieldType<128>::T val2);
567template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::dslli(bitblock256_t arg1, bitblock256_t arg2);
568template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::dslli(bitblock256_t arg1, bitblock256_t arg2);
569template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::dslli(bitblock256_t arg1, bitblock256_t arg2);
570template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::dslli(bitblock256_t arg1, bitblock256_t arg2);
571template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::dslli(bitblock256_t arg1, bitblock256_t arg2);
572template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::dslli(bitblock256_t arg1, bitblock256_t arg2);
573template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::dslli(bitblock256_t arg1, bitblock256_t arg2);
574template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::dslli(bitblock256_t arg1, bitblock256_t arg2);
575template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::slli(bitblock256_t arg1);
576template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::slli(bitblock256_t arg1);
577template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::slli(bitblock256_t arg1);
578template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::slli(bitblock256_t arg1);
579template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::slli(bitblock256_t arg1);
580template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::slli(bitblock256_t arg1);
581template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::slli(bitblock256_t arg1);
582template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::slli(bitblock256_t arg1);
583template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill8(FieldType<1>::T val1, FieldType<1>::T val2, FieldType<1>::T val3, FieldType<1>::T val4, FieldType<1>::T val5, FieldType<1>::T val6, FieldType<1>::T val7, FieldType<1>::T val8);
584template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill8(FieldType<2>::T val1, FieldType<2>::T val2, FieldType<2>::T val3, FieldType<2>::T val4, FieldType<2>::T val5, FieldType<2>::T val6, FieldType<2>::T val7, FieldType<2>::T val8);
585template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill8(FieldType<4>::T val1, FieldType<4>::T val2, FieldType<4>::T val3, FieldType<4>::T val4, FieldType<4>::T val5, FieldType<4>::T val6, FieldType<4>::T val7, FieldType<4>::T val8);
586template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill8(FieldType<8>::T val1, FieldType<8>::T val2, FieldType<8>::T val3, FieldType<8>::T val4, FieldType<8>::T val5, FieldType<8>::T val6, FieldType<8>::T val7, FieldType<8>::T val8);
587template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill8(FieldType<16>::T val1, FieldType<16>::T val2, FieldType<16>::T val3, FieldType<16>::T val4, FieldType<16>::T val5, FieldType<16>::T val6, FieldType<16>::T val7, FieldType<16>::T val8);
588template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::fill8(FieldType<32>::T val1, FieldType<32>::T val2, FieldType<32>::T val3, FieldType<32>::T val4, FieldType<32>::T val5, FieldType<32>::T val6, FieldType<32>::T val7, FieldType<32>::T val8);
589
590//Implementation Part
591
592#define avx_move_lo128_to_hi128(x) \
593        _mm256_permute2f128_si256(x, x, 0 + 8)
594
595#define avx_select_lo128(x) \
596        _mm256_castsi256_si128(x)
597
598#define avx_move_hi128_to_lo128(x) \
599        _mm256_permute2f128_si256(x, x, 1 + 128)
600
601#define avx_select_hi128(x) \
602        (_mm256_extractf128_si256(x, 1))
603
604#define avx_byte_shift_right(x, y) \
605        ((bitblock256_t)avx_general_combine256(_mm_srli_si128(avx_select_hi128(x), y), _mm_srli_si128(avx_select_lo128(x), y)))
606
607#define avx_byte_shift_left(x, y) \
608        ((bitblock256_t)avx_general_combine256(_mm_slli_si128(avx_select_hi128(x), y), _mm_slli_si128(avx_select_lo128(x), y)))
609
610#define avx_general_combine256(x, y) \
611    (_mm256_insertf128_si256(_mm256_castsi128_si256(y), x, 1))
612
613// Prevents erroneous clang template expansion compile errors. Should not be used unless necessary!
614#define TEMPLATE_SUBTRACT(x, y) \
615    (((x) > (y)) ? ((x) - (y)) : (y))
616
617//The total number of operations is 2.0
618IDISA_ALWAYS_INLINE bitblock256_t simd_nor(bitblock256_t arg1, bitblock256_t arg2)
619{
620        return simd_not(simd_or(arg1, arg2));
621}
622
623//The total number of operations is 1.0
624IDISA_ALWAYS_INLINE bitblock256_t simd_not(bitblock256_t arg1)
625{
626        return simd_xor(arg1, simd256<32>::constant<4294967295ULL>());
627}
628
629//The total number of operations is 1.0
630IDISA_ALWAYS_INLINE bitblock256_t simd_andc(bitblock256_t arg1, bitblock256_t arg2)
631{
632        return _mm256_andnot_si256(arg2, arg1);
633}
634
635//The total number of operations is 1.0
636IDISA_ALWAYS_INLINE bitblock256_t simd_or(bitblock256_t arg1, bitblock256_t arg2)
637{
638        return _mm256_or_si256(arg1, arg2);
639}
640
641//The total number of operations is 1.0
642IDISA_ALWAYS_INLINE bitblock256_t simd_and(bitblock256_t arg1, bitblock256_t arg2)
643{
644        return _mm256_and_si256(arg1, arg2);
645}
646
647//The total number of operations is 1.0
648IDISA_ALWAYS_INLINE bitblock256_t simd_xor(bitblock256_t arg1, bitblock256_t arg2)
649{
650        return _mm256_xor_si256(arg1, arg2);
651}
652
653//The total number of operations is 1.0
654template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::max(bitblock256_t arg1, bitblock256_t arg2)
655{
656        return simd_and(arg1, arg2);
657}
658
659//The total number of operations is 18.0
660template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::max(bitblock256_t arg1, bitblock256_t arg2)
661{
662        return simd256<1>::ifh(simd256<2>::lt(arg1, arg2), arg2, arg1);
663}
664
665//The total number of operations is 9.0
666template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::max(bitblock256_t arg1, bitblock256_t arg2)
667{
668        bitblock256_t high_bit = simd256<4>::constant<(8)>();
669        return simd_xor(simd256<4>::umax(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
670}
671
672//The total number of operations is 1.0
673template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::max(bitblock256_t arg1, bitblock256_t arg2)
674{
675        return _mm256_max_epi8(arg1, arg2);
676}
677
678//The total number of operations is 1.0
679template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::max(bitblock256_t arg1, bitblock256_t arg2)
680{
681        return _mm256_max_epi16(arg1, arg2);
682}
683
684//The total number of operations is 1.0
685template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::max(bitblock256_t arg1, bitblock256_t arg2)
686{
687        return _mm256_max_epi32(arg1, arg2);
688}
689
690//The total number of operations is 4.0
691template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::max(bitblock256_t arg1, bitblock256_t arg2)
692{
693        return simd256<1>::ifh(simd256<64>::gt(arg1, arg2), arg1, arg2);
694}
695
696//The total number of operations is 32.6666666667
697template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::max(bitblock256_t arg1, bitblock256_t arg2)
698{
699        bitblock256_t hiAns = simd256<(64)>::max(arg1, arg2);
700        bitblock256_t loAns = simd256<(64)>::umax(arg1, arg2);
701        bitblock256_t eqMask1 = simd256<128>::srli<(64)>(simd256<(64)>::eq(hiAns, arg1));
702        bitblock256_t eqMask2 = simd256<128>::srli<(64)>(simd256<(64)>::eq(hiAns, arg2));
703        return simd256<1>::ifh(simd256<128>::himask(), hiAns, simd256<1>::ifh(eqMask1, simd256<1>::ifh(eqMask2, loAns, arg1), arg2));
704}
705
706//The total number of operations is 116.666666667
707template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::max(bitblock256_t arg1, bitblock256_t arg2)
708{
709        bitblock256_t hiAns = simd256<(128)>::max(arg1, arg2);
710        bitblock256_t loAns = simd256<(128)>::umax(arg1, arg2);
711        bitblock256_t eqMask1 = simd256<256>::srli<(128)>(simd256<(128)>::eq(hiAns, arg1));
712        bitblock256_t eqMask2 = simd256<256>::srli<(128)>(simd256<(128)>::eq(hiAns, arg2));
713        return simd256<1>::ifh(simd256<256>::himask(), hiAns, simd256<1>::ifh(eqMask1, simd256<1>::ifh(eqMask2, loAns, arg1), arg2));
714}
715
716//The total number of operations is 1.0
717template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::mult(bitblock256_t arg1, bitblock256_t arg2)
718{
719        return simd_and(arg1, arg2);
720}
721
722//The total number of operations is 34.0
723template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::mult(bitblock256_t arg1, bitblock256_t arg2)
724{
725        bitblock256_t tmp1 = simd256<256>::slli<1>(arg1);
726        bitblock256_t tmp2 = simd256<256>::slli<1>(arg2);
727        return simd256<1>::ifh(simd256<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));
728}
729
730//The total number of operations is 31.0
731template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::mult(bitblock256_t arg1, bitblock256_t arg2)
732{
733        bitblock256_t loMask = simd256<(8)>::lomask();
734        bitblock256_t tmpAns1 = simd256<(8)>::mult(simd_and(loMask, arg1), simd_and(loMask, arg2));
735        bitblock256_t tmpAns2 = simd256<(8)>::mult(simd256<(8)>::srli<4>(arg1), simd256<(8)>::srli<4>(arg2));
736        return simd256<1>::ifh(loMask, tmpAns1, simd256<(8)>::slli<4>(tmpAns2));
737}
738
739//The total number of operations is 10.0
740template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::mult(bitblock256_t arg1, bitblock256_t arg2)
741{
742        bitblock256_t loMask = simd256<(16)>::lomask();
743        bitblock256_t tmpAns1 = simd256<(16)>::mult(simd_and(loMask, arg1), simd_and(loMask, arg2));
744        bitblock256_t tmpAns2 = simd256<(16)>::mult(simd256<(16)>::srli<8>(arg1), simd256<(16)>::srli<8>(arg2));
745        return simd256<1>::ifh(loMask, tmpAns1, simd256<(16)>::slli<8>(tmpAns2));
746}
747
748//The total number of operations is 1.0
749template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::mult(bitblock256_t arg1, bitblock256_t arg2)
750{
751        return _mm256_mullo_epi16(arg1, arg2);
752}
753
754//The total number of operations is 1.0
755template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::mult(bitblock256_t arg1, bitblock256_t arg2)
756{
757        return _mm256_mullo_epi32(arg1, arg2);
758}
759
760//The total number of operations is 11.0
761template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::mult(bitblock256_t arg1, bitblock256_t arg2)
762{
763        bitblock256_t loMask = simd256<64>::lomask();
764        bitblock256_t arg1_low = simd_and(arg1, loMask);
765        bitblock256_t arg1_high = simd256<64>::srli<(32)>(arg1);
766        bitblock256_t arg2_low = simd_and(arg2, loMask);
767        bitblock256_t arg2_high = simd256<64>::srli<(32)>(arg2);
768        bitblock256_t tmpAns1 = simd256<(32)>::umult(arg1_low, arg2_low);
769        bitblock256_t tmpAns2 = simd256<64>::slli<(32)>(simd256<(32)>::umult(arg1_low, arg2_high));
770        bitblock256_t tmpAns3 = simd256<64>::slli<(32)>(simd256<(32)>::umult(arg1_high, arg2_low));
771        return simd256<64>::add(tmpAns1, simd256<64>::add(tmpAns2, tmpAns3));
772}
773
774//The total number of operations is 237.0
775template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::mult(bitblock256_t arg1, bitblock256_t arg2)
776{
777        bitblock256_t loMask = simd256<128>::lomask();
778        bitblock256_t arg1_low = simd_and(arg1, loMask);
779        bitblock256_t arg1_high = simd256<128>::srli<(64)>(arg1);
780        bitblock256_t arg2_low = simd_and(arg2, loMask);
781        bitblock256_t arg2_high = simd256<128>::srli<(64)>(arg2);
782        bitblock256_t tmpAns1 = simd256<(64)>::umult(arg1_low, arg2_low);
783        bitblock256_t tmpAns2 = simd256<128>::slli<(64)>(simd256<(64)>::umult(arg1_low, arg2_high));
784        bitblock256_t tmpAns3 = simd256<128>::slli<(64)>(simd256<(64)>::umult(arg1_high, arg2_low));
785        return simd256<128>::add(tmpAns1, simd256<128>::add(tmpAns2, tmpAns3));
786}
787
788//The total number of operations is 1400.33333333
789template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::mult(bitblock256_t arg1, bitblock256_t arg2)
790{
791        bitblock256_t loMask = simd256<256>::lomask();
792        bitblock256_t arg1_low = simd_and(arg1, loMask);
793        bitblock256_t arg1_high = simd256<256>::srli<(128)>(arg1);
794        bitblock256_t arg2_low = simd_and(arg2, loMask);
795        bitblock256_t arg2_high = simd256<256>::srli<(128)>(arg2);
796        bitblock256_t tmpAns1 = simd256<(128)>::umult(arg1_low, arg2_low);
797        bitblock256_t tmpAns2 = simd256<256>::slli<(128)>(simd256<(128)>::umult(arg1_low, arg2_high));
798        bitblock256_t tmpAns3 = simd256<256>::slli<(128)>(simd256<(128)>::umult(arg1_high, arg2_low));
799        return simd256<256>::add(tmpAns1, simd256<256>::add(tmpAns2, tmpAns3));
800}
801
802//The total number of operations is 1.0
803template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::gt(bitblock256_t arg1, bitblock256_t arg2)
804{
805        return simd_andc(arg2, arg1);
806}
807
808//The total number of operations is 15.0
809template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::gt(bitblock256_t arg1, bitblock256_t arg2)
810{
811        bitblock256_t hiAns = simd256<(1)>::gt(arg1, arg2);
812        bitblock256_t loAns = simd256<(1)>::ugt(arg1, arg2);
813        bitblock256_t mask = simd_and(loAns, simd256<2>::srli<(1)>(simd256<(1)>::eq(arg1, arg2)));
814        mask = simd_or(mask, simd256<2>::slli<(1)>(mask));
815        return simd_or(simd256<2>::srai<(1)>(hiAns), mask);
816}
817
818//The total number of operations is 10.0
819template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::gt(bitblock256_t arg1, bitblock256_t arg2)
820{
821        return simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::gt(simd_and(simd256<(8)>::himask(), arg1), arg2), simd256<(8)>::gt(simd256<(8)>::slli<4>(arg1), simd256<(8)>::slli<4>(arg2)));
822}
823
824//The total number of operations is 1.0
825template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::gt(bitblock256_t arg1, bitblock256_t arg2)
826{
827        return _mm256_cmpgt_epi8(arg1, arg2);
828}
829
830//The total number of operations is 1.0
831template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::gt(bitblock256_t arg1, bitblock256_t arg2)
832{
833        return _mm256_cmpgt_epi16(arg1, arg2);
834}
835
836//The total number of operations is 1.0
837template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::gt(bitblock256_t arg1, bitblock256_t arg2)
838{
839        return _mm256_cmpgt_epi32(arg1, arg2);
840}
841
842//The total number of operations is 1.0
843template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::gt(bitblock256_t arg1, bitblock256_t arg2)
844{
845        return _mm256_cmpgt_epi64(arg1, arg2);
846}
847
848//The total number of operations is 32.75
849template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::gt(bitblock256_t arg1, bitblock256_t arg2)
850{
851        bitblock256_t hiAns = simd256<(64)>::gt(arg1, arg2);
852        bitblock256_t loAns = simd256<(64)>::ugt(arg1, arg2);
853        bitblock256_t mask = simd_and(loAns, simd256<128>::srli<(64)>(simd256<(64)>::eq(arg1, arg2)));
854        mask = simd_or(mask, simd256<128>::slli<(64)>(mask));
855        return simd_or(simd256<128>::srai<(64)>(hiAns), mask);
856}
857
858//The total number of operations is 132.791666667
859template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::gt(bitblock256_t arg1, bitblock256_t arg2)
860{
861        bitblock256_t hiAns = simd256<(128)>::gt(arg1, arg2);
862        bitblock256_t loAns = simd256<(128)>::ugt(arg1, arg2);
863        bitblock256_t mask = simd_and(loAns, simd256<256>::srli<(128)>(simd256<(128)>::eq(arg1, arg2)));
864        mask = simd_or(mask, simd256<256>::slli<(128)>(mask));
865        return simd_or(simd256<256>::srai<(128)>(hiAns), mask);
866}
867
868//The total number of operations is 289.0
869template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::umult(bitblock256_t arg1, bitblock256_t arg2)
870{
871        bitblock256_t loMask = simd256<(2)>::lomask();
872        bitblock256_t tmpAns1 = simd256<(2)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
873        bitblock256_t tmpAns2 = simd256<(2)>::umult(simd_and(loMask, simd256<(4)>::srli<(2)>(arg1)), simd_and(loMask, simd256<(4)>::srli<(2)>(arg2)));
874        return simd_or(tmpAns1, simd256<(4)>::slli<(2)>(tmpAns2));
875}
876
877//The total number of operations is 139.0
878template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::umult(bitblock256_t arg1, bitblock256_t arg2)
879{
880        bitblock256_t loMask = simd256<(4)>::lomask();
881        bitblock256_t tmpAns1 = simd256<(4)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
882        bitblock256_t tmpAns2 = simd256<(4)>::umult(simd_and(loMask, simd256<(8)>::srli<(4)>(arg1)), simd_and(loMask, simd256<(8)>::srli<(4)>(arg2)));
883        return simd_or(tmpAns1, simd256<(8)>::slli<(4)>(tmpAns2));
884}
885
886//The total number of operations is 64.0
887template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::umult(bitblock256_t arg1, bitblock256_t arg2)
888{
889        bitblock256_t loMask = simd256<(8)>::lomask();
890        bitblock256_t tmpAns1 = simd256<(8)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
891        bitblock256_t tmpAns2 = simd256<(8)>::umult(simd_and(loMask, simd256<(16)>::srli<(8)>(arg1)), simd_and(loMask, simd256<(16)>::srli<(8)>(arg2)));
892        return simd_or(tmpAns1, simd256<(16)>::slli<(8)>(tmpAns2));
893}
894
895//The total number of operations is 28.0
896template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::umult(bitblock256_t arg1, bitblock256_t arg2)
897{
898        bitblock256_t loMask = simd256<(16)>::lomask();
899        bitblock256_t tmpAns1 = simd256<(16)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
900        bitblock256_t tmpAns2 = simd256<(16)>::umult(simd_and(loMask, simd256<(32)>::srli<(16)>(arg1)), simd_and(loMask, simd256<(32)>::srli<(16)>(arg2)));
901        return simd_or(tmpAns1, simd256<(32)>::slli<(16)>(tmpAns2));
902}
903
904//The total number of operations is 10.0
905template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::umult(bitblock256_t arg1, bitblock256_t arg2)
906{
907        bitblock256_t loMask = simd256<(32)>::lomask();
908        bitblock256_t tmpAns1 = simd256<(32)>::umult(simd_and(loMask, arg1), simd_and(loMask, arg2));
909        bitblock256_t tmpAns2 = simd256<(32)>::umult(simd_and(loMask, simd256<(64)>::srli<(32)>(arg1)), simd_and(loMask, simd256<(64)>::srli<(32)>(arg2)));
910        return simd_or(tmpAns1, simd256<(64)>::slli<(32)>(tmpAns2));
911}
912
913//The total number of operations is 1.0
914template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::umult(bitblock256_t arg1, bitblock256_t arg2)
915{
916        return _mm256_mul_epu32(arg1, arg2);
917}
918
919//The total number of operations is 63.0
920template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::umult(bitblock256_t arg1, bitblock256_t arg2)
921{
922        bitblock256_t loMask1 = simd256<(128)>::lomask();
923        bitblock256_t arg11 = simd_and(arg1, loMask1);
924        bitblock256_t arg22 = simd_and(arg2, loMask1);
925        bitblock256_t loMask2 = simd256<64>::lomask();
926        bitblock256_t arg1_low = simd_and(arg11, loMask2);
927        bitblock256_t arg1_high = simd256<64>::srli<(32)>(arg11);
928        bitblock256_t arg2_low = simd_and(arg22, loMask2);
929        bitblock256_t arg2_high = simd256<64>::srli<(32)>(arg22);
930        bitblock256_t tmpAns1 = simd256<(32)>::umult(arg1_low, arg2_low);
931        bitblock256_t tmpAns2 = simd256<(128)>::slli<(32)>(simd256<(32)>::umult(arg1_low, arg2_high));
932        bitblock256_t tmpAns3 = simd256<(128)>::slli<(32)>(simd256<(32)>::umult(arg1_high, arg2_low));
933        bitblock256_t tmpAns4 = simd256<(128)>::slli<64>(simd256<(32)>::umult(arg1_high, arg2_high));
934        return simd256<(128)>::add(tmpAns1, simd256<(128)>::add(tmpAns2, simd256<(128)>::add(tmpAns3, tmpAns4)));
935}
936
937//The total number of operations is 424.666666667
938template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::umult(bitblock256_t arg1, bitblock256_t arg2)
939{
940        bitblock256_t loMask1 = simd256<(256)>::lomask();
941        bitblock256_t arg11 = simd_and(arg1, loMask1);
942        bitblock256_t arg22 = simd_and(arg2, loMask1);
943        bitblock256_t loMask2 = simd256<128>::lomask();
944        bitblock256_t arg1_low = simd_and(arg11, loMask2);
945        bitblock256_t arg1_high = simd256<128>::srli<(64)>(arg11);
946        bitblock256_t arg2_low = simd_and(arg22, loMask2);
947        bitblock256_t arg2_high = simd256<128>::srli<(64)>(arg22);
948        bitblock256_t tmpAns1 = simd256<(64)>::umult(arg1_low, arg2_low);
949        bitblock256_t tmpAns2 = simd256<(256)>::slli<(64)>(simd256<(64)>::umult(arg1_low, arg2_high));
950        bitblock256_t tmpAns3 = simd256<(256)>::slli<(64)>(simd256<(64)>::umult(arg1_high, arg2_low));
951        bitblock256_t tmpAns4 = simd256<(256)>::slli<128>(simd256<(64)>::umult(arg1_high, arg2_high));
952        return simd256<(256)>::add(tmpAns1, simd256<(256)>::add(tmpAns2, simd256<(256)>::add(tmpAns3, tmpAns4)));
953}
954
955//The total number of operations is 1.0
956template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ult(bitblock256_t arg1, bitblock256_t arg2)
957{
958        return simd_andc(arg2, arg1);
959}
960
961//The total number of operations is 14.0
962template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ult(bitblock256_t arg1, bitblock256_t arg2)
963{
964        bitblock256_t tmpAns = simd256<(1)>::ult(arg1, arg2);
965        bitblock256_t mask = simd_and(tmpAns, simd256<2>::srli<(1)>(simd256<(1)>::eq(arg1, arg2)));
966        mask = simd_or(mask, simd256<2>::slli<(1)>(mask));
967        return simd_or(simd256<2>::srai<(1)>(tmpAns), mask);
968}
969
970//The total number of operations is 20.0
971template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ult(bitblock256_t arg1, bitblock256_t arg2)
972{
973        return simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::ult(arg1, simd_and(simd256<(8)>::himask(), arg2)), simd256<(8)>::ult(simd_andc(arg1, simd256<(8)>::himask()), simd_andc(arg2, simd256<(8)>::himask())));
974}
975
976//The total number of operations is 7.0
977template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::ult(bitblock256_t arg1, bitblock256_t arg2)
978{
979        bitblock256_t high_bit = simd256<8>::constant<(128)>();
980        return simd256<8>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
981}
982
983//The total number of operations is 7.0
984template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::ult(bitblock256_t arg1, bitblock256_t arg2)
985{
986        bitblock256_t high_bit = simd256<16>::constant<(32768)>();
987        return simd256<16>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
988}
989
990//The total number of operations is 7.0
991template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::ult(bitblock256_t arg1, bitblock256_t arg2)
992{
993        bitblock256_t high_bit = simd256<32>::constant<(2147483648ULL)>();
994        return simd256<32>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
995}
996
997//The total number of operations is 7.0
998template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::ult(bitblock256_t arg1, bitblock256_t arg2)
999{
1000        bitblock256_t high_bit = simd256<64>::constant<(9223372036854775808ULL)>();
1001        return simd256<64>::lt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
1002}
1003
1004//The total number of operations is 35.75
1005template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::ult(bitblock256_t arg1, bitblock256_t arg2)
1006{
1007        bitblock256_t tmpAns = simd256<(64)>::ult(arg1, arg2);
1008        bitblock256_t mask = simd_and(tmpAns, simd256<128>::srli<(64)>(simd256<(64)>::eq(arg1, arg2)));
1009        mask = simd_or(mask, simd256<128>::slli<(64)>(mask));
1010        return simd_or(simd256<128>::srai<(64)>(tmpAns), mask);
1011}
1012
1013//The total number of operations is 104.041666667
1014template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::ult(bitblock256_t arg1, bitblock256_t arg2)
1015{
1016        bitblock256_t tmpAns = simd256<(128)>::ult(arg1, arg2);
1017        bitblock256_t mask = simd_and(tmpAns, simd256<256>::srli<(128)>(simd256<(128)>::eq(arg1, arg2)));
1018        mask = simd_or(mask, simd256<256>::slli<(128)>(mask));
1019        return simd_or(simd256<256>::srai<(128)>(tmpAns), mask);
1020}
1021
1022//The total number of operations is 6.0
1023template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::all(bitblock256_t arg1)
1024{
1025        bitblock256_t f0 = simd_and(arg1, simd256<2>::srli<1>(arg1));
1026        return simd_or(f0, simd256<2>::slli<1>(f0));
1027}
1028
1029//The total number of operations is 9.0
1030template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::all(bitblock256_t arg1)
1031{
1032        return simd256<4>::eq(arg1, simd256<8>::constant<255>());
1033}
1034
1035//The total number of operations is 1.0
1036template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::all(bitblock256_t arg1)
1037{
1038        return simd256<8>::eq(arg1, simd256<8>::constant<255>());
1039}
1040
1041//The total number of operations is 1.0
1042template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::all(bitblock256_t arg1)
1043{
1044        return simd256<16>::eq(arg1, simd256<8>::constant<255>());
1045}
1046
1047//The total number of operations is 1.0
1048template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::all(bitblock256_t arg1)
1049{
1050        return simd256<32>::eq(arg1, simd256<8>::constant<255>());
1051}
1052
1053//The total number of operations is 1.0
1054template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::all(bitblock256_t arg1)
1055{
1056        return simd256<64>::eq(arg1, simd256<8>::constant<255>());
1057}
1058
1059//The total number of operations is 13.6666666667
1060template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::all(bitblock256_t arg1)
1061{
1062        return simd256<128>::eq(arg1, simd256<8>::constant<255>());
1063}
1064
1065//The total number of operations is 2.0
1066template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::all(bitblock256_t arg1)
1067{
1068        return ((bitblock256::all(arg1)) ? simd256<8>::constant<255>() : simd256<8>::constant<0>());
1069}
1070
1071//The total number of operations is 2.0
1072template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::srli(bitblock256_t arg1)
1073{
1074        return simd_and(simd256<32>::srli<sh>(arg1), simd256<2>::constant<((3)>>sh)>());
1075}
1076
1077//The total number of operations is 2.0
1078template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::srli(bitblock256_t arg1)
1079{
1080        return simd_and(simd256<32>::srli<sh>(arg1), simd256<4>::constant<((15)>>sh)>());
1081}
1082
1083//The total number of operations is 2.0
1084template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::srli(bitblock256_t arg1)
1085{
1086        return simd_and(simd256<32>::srli<sh>(arg1), simd256<8>::constant<((255)>>sh)>());
1087}
1088
1089//The total number of operations is 1.0
1090template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::srli(bitblock256_t arg1)
1091{
1092        return _mm256_srli_epi16(arg1, (int32_t)(sh));
1093}
1094
1095//The total number of operations is 1.0
1096template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::srli(bitblock256_t arg1)
1097{
1098        return _mm256_srli_epi32(arg1, (int32_t)(sh));
1099}
1100
1101//The total number of operations is 1.0
1102template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::srli(bitblock256_t arg1)
1103{
1104        return _mm256_srli_epi64(arg1, (int32_t)(sh));
1105}
1106
1107//The total number of operations is 5.33333333333
1108template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::srli(bitblock256_t arg1)
1109{
1110        return (((sh%8) == 0) ? avx_byte_shift_right(arg1, (sh/8)) : ((sh >= 64) ? simd256<64>::srli<(sh&63)>(avx_byte_shift_right(arg1, 8)) : simd_or(simd256<64>::srli<sh>(arg1), avx_byte_shift_right(simd256<64>::slli<((128-sh)&63)>(arg1), 8))));
1111}
1112
1113//The total number of operations is 9.5
1114template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::srli(bitblock256_t arg1)
1115{
1116    return ((sh < 128) ? simd_or(simd256<128>::srli<sh>(arg1), simd256<128>::slli<(128-sh)>(_mm256_castsi128_si256(avx_select_hi128(arg1)))) : simd256<128>::srli<TEMPLATE_SUBTRACT(sh,128)>(avx_move_hi128_to_lo128(arg1)));
1117}
1118
1119//The total number of operations is 1.0
1120template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ctz(bitblock256_t arg1)
1121{
1122        return simd_not(arg1);
1123}
1124
1125//The total number of operations is 17.0
1126template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ctz(bitblock256_t arg1)
1127{
1128        return simd256<2>::popcount(simd_andc(simd256<2>::sub(arg1, simd256<2>::constant<1>()), arg1));
1129}
1130
1131//The total number of operations is 14.0
1132template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ctz(bitblock256_t arg1)
1133{
1134        return simd256<4>::popcount(simd_andc(simd256<4>::sub(arg1, simd256<4>::constant<1>()), arg1));
1135}
1136
1137//The total number of operations is 13.0
1138template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::ctz(bitblock256_t arg1)
1139{
1140        return simd256<8>::popcount(simd_andc(simd256<8>::sub(arg1, simd256<8>::constant<1>()), arg1));
1141}
1142
1143//The total number of operations is 16.0
1144template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::ctz(bitblock256_t arg1)
1145{
1146        return simd256<16>::popcount(simd_andc(simd256<16>::sub(arg1, simd256<16>::constant<1>()), arg1));
1147}
1148
1149//The total number of operations is 19.0
1150template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::ctz(bitblock256_t arg1)
1151{
1152        return simd256<32>::popcount(simd_andc(simd256<32>::sub(arg1, simd256<32>::constant<1>()), arg1));
1153}
1154
1155//The total number of operations is 19.0
1156template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::ctz(bitblock256_t arg1)
1157{
1158        return simd256<64>::popcount(simd_andc(simd256<64>::sub(arg1, simd256<64>::constant<1>()), arg1));
1159}
1160
1161//The total number of operations is 49.0
1162template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::ctz(bitblock256_t arg1)
1163{
1164        return simd256<128>::popcount(simd_andc(simd256<128>::sub(arg1, simd256<128>::constant<1>()), arg1));
1165}
1166
1167//The total number of operations is 62.1666666667
1168template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::ctz(bitblock256_t arg1)
1169{
1170        return simd256<256>::popcount(simd_andc(simd256<256>::sub(arg1, simd256<256>::constant<1>()), arg1));
1171}
1172
1173//The total number of operations is 1.0
1174template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::sll(bitblock256_t arg1, bitblock256_t shift_mask)
1175{
1176        return _mm256_sll_epi16(arg1, avx_select_lo128(shift_mask));
1177}
1178
1179//The total number of operations is 1.0
1180template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::sll(bitblock256_t arg1, bitblock256_t shift_mask)
1181{
1182        return _mm256_sll_epi32(arg1, avx_select_lo128(shift_mask));
1183}
1184
1185//The total number of operations is 1.0
1186template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::sll(bitblock256_t arg1, bitblock256_t shift_mask)
1187{
1188        return _mm256_sll_epi64(arg1, avx_select_lo128(shift_mask));
1189}
1190
1191//The total number of operations is 6.875
1192template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::sll(bitblock256_t arg1, bitblock256_t shift_mask)
1193{
1194        uint32_t shift = _mm_cvtsi128_si32(avx_select_lo128(shift_mask));
1195        uint32_t n = (shift/64);
1196        bitblock256_t arg2 = ((n == 1) ? mvmd256<64>::slli<1>(arg1) : ((n == 2) ? mvmd256<64>::slli<2>(arg1) : ((n == 3) ? mvmd256<64>::slli<3>(arg1) : arg1)));
1197        return ((n >= 4) ? simd256<32>::constant<0>() : (((shift&63) > 0) ? simd_or(_mm256_sll_epi64(arg2, _mm_cvtsi32_si128((int32_t)((shift&63)))), mvmd256<64>::slli<1>(_mm256_srl_epi64(arg2, _mm_cvtsi32_si128((int32_t)((64-(shift&63))))))) : arg2));
1198}
1199
1200//The total number of operations is 1.0
1201template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::sub(bitblock256_t arg1, bitblock256_t arg2)
1202{
1203        return simd_xor(arg1, arg2);
1204}
1205
1206//The total number of operations is 13.0
1207template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::sub(bitblock256_t arg1, bitblock256_t arg2)
1208{
1209        bitblock256_t ans = simd256<(1)>::sub(arg1, arg2);
1210        bitblock256_t borrowMask = simd_or(simd_andc(arg2, arg1), simd_and(simd_not(simd_xor(arg1, arg2)), ans));
1211        bitblock256_t loMask = simd256<2>::lomask();
1212        bitblock256_t borrow = simd256<2>::slli<1>(simd_and(borrowMask, loMask));
1213        return simd256<1>::ifh(loMask, ans, simd256<(1)>::sub(ans, borrow));
1214}
1215
1216//The total number of operations is 6.0
1217template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::sub(bitblock256_t arg1, bitblock256_t arg2)
1218{
1219        return simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::sub(arg1, simd_and(simd256<(8)>::himask(), arg2)), simd256<(8)>::sub(arg1, arg2));
1220}
1221
1222//The total number of operations is 1.0
1223template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::sub(bitblock256_t arg1, bitblock256_t arg2)
1224{
1225        return _mm256_sub_epi8(arg1, arg2);
1226}
1227
1228//The total number of operations is 1.0
1229template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::sub(bitblock256_t arg1, bitblock256_t arg2)
1230{
1231        return _mm256_sub_epi16(arg1, arg2);
1232}
1233
1234//The total number of operations is 1.0
1235template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::sub(bitblock256_t arg1, bitblock256_t arg2)
1236{
1237        return _mm256_sub_epi32(arg1, arg2);
1238}
1239
1240//The total number of operations is 1.0
1241template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::sub(bitblock256_t arg1, bitblock256_t arg2)
1242{
1243        return _mm256_sub_epi64(arg1, arg2);
1244}
1245
1246//The total number of operations is 12.3333333333
1247template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::sub(bitblock256_t arg1, bitblock256_t arg2)
1248{
1249        bitblock256_t partial = simd256<(64)>::sub(arg1, arg2);
1250        bitblock256_t borrowMask = simd_or(simd_andc(arg2, arg1), simd_andc(partial, simd_xor(arg1, arg2)));
1251        bitblock256_t borrow = simd256<128>::slli<(64)>(simd256<(64)>::srli<(63)>(borrowMask));
1252        return simd256<(64)>::sub(partial, borrow);
1253}
1254
1255//The total number of operations is 43.1666666667
1256template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::sub(bitblock256_t arg1, bitblock256_t arg2)
1257{
1258        bitblock256_t ans = simd256<(128)>::sub(arg1, arg2);
1259        bitblock256_t borrowMask = simd_or(simd_andc(arg2, arg1), simd_and(simd_not(simd_xor(arg1, arg2)), ans));
1260        bitblock256_t loMask = simd256<256>::lomask();
1261        bitblock256_t borrow = simd256<256>::slli<1>(simd_and(borrowMask, loMask));
1262        return simd256<1>::ifh(loMask, ans, simd256<(128)>::sub(ans, borrow));
1263}
1264
1265//The total number of operations is 1.0
1266template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1267{
1268        return simd_andc(arg1, arg2);
1269}
1270
1271//The total number of operations is 14.0
1272template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1273{
1274        bitblock256_t tmpAns = simd256<(1)>::ugt(arg1, arg2);
1275        bitblock256_t mask = simd_and(tmpAns, simd256<2>::srli<(1)>(simd256<(1)>::eq(arg1, arg2)));
1276        mask = simd_or(mask, simd256<2>::slli<(1)>(mask));
1277        return simd_or(simd256<2>::srai<(1)>(tmpAns), mask);
1278}
1279
1280//The total number of operations is 12.0
1281template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1282{
1283        return simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::ugt(simd_and(simd256<(8)>::himask(), arg1), arg2), simd256<(8)>::ugt(simd_andc(arg1, simd256<(8)>::himask()), simd_andc(arg2, simd256<(8)>::himask())));
1284}
1285
1286//The total number of operations is 3.0
1287template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1288{
1289        bitblock256_t high_bit = simd256<8>::constant<(128)>();
1290        return simd256<8>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
1291}
1292
1293//The total number of operations is 3.0
1294template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1295{
1296        bitblock256_t high_bit = simd256<16>::constant<(32768)>();
1297        return simd256<16>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
1298}
1299
1300//The total number of operations is 3.0
1301template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1302{
1303        bitblock256_t high_bit = simd256<32>::constant<(2147483648ULL)>();
1304        return simd256<32>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
1305}
1306
1307//The total number of operations is 3.0
1308template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1309{
1310        bitblock256_t high_bit = simd256<64>::constant<(9223372036854775808ULL)>();
1311        return simd256<64>::gt(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit));
1312}
1313
1314//The total number of operations is 31.75
1315template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1316{
1317        bitblock256_t tmpAns = simd256<(64)>::ugt(arg1, arg2);
1318        bitblock256_t mask = simd_and(tmpAns, simd256<128>::srli<(64)>(simd256<(64)>::eq(arg1, arg2)));
1319        mask = simd_or(mask, simd256<128>::slli<(64)>(mask));
1320        return simd_or(simd256<128>::srai<(64)>(tmpAns), mask);
1321}
1322
1323//The total number of operations is 100.041666667
1324template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::ugt(bitblock256_t arg1, bitblock256_t arg2)
1325{
1326        bitblock256_t tmpAns = simd256<(128)>::ugt(arg1, arg2);
1327        bitblock256_t mask = simd_and(tmpAns, simd256<256>::srli<(128)>(simd256<(128)>::eq(arg1, arg2)));
1328        mask = simd_or(mask, simd256<256>::slli<(128)>(mask));
1329        return simd_or(simd256<256>::srai<(128)>(tmpAns), mask);
1330}
1331
1332//The total number of operations is 4.0
1333template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::xor_hl(bitblock256_t arg1)
1334{
1335        return simd_xor(simd256<2>::srli<(1)>(arg1), simd_and(arg1, simd256<2>::lomask()));
1336}
1337
1338//The total number of operations is 4.0
1339template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::xor_hl(bitblock256_t arg1)
1340{
1341        return simd_xor(simd256<4>::srli<(2)>(arg1), simd_and(arg1, simd256<4>::lomask()));
1342}
1343
1344//The total number of operations is 4.0
1345template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::xor_hl(bitblock256_t arg1)
1346{
1347        return simd_xor(simd256<8>::srli<(4)>(arg1), simd_and(arg1, simd256<8>::lomask()));
1348}
1349
1350//The total number of operations is 3.0
1351template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::xor_hl(bitblock256_t arg1)
1352{
1353        return simd_xor(simd256<16>::srli<(8)>(arg1), simd_and(arg1, simd256<16>::lomask()));
1354}
1355
1356//The total number of operations is 3.0
1357template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::xor_hl(bitblock256_t arg1)
1358{
1359        return simd_xor(simd256<32>::srli<(16)>(arg1), simd_and(arg1, simd256<32>::lomask()));
1360}
1361
1362//The total number of operations is 3.0
1363template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::xor_hl(bitblock256_t arg1)
1364{
1365        return simd_xor(simd256<64>::srli<(32)>(arg1), simd_and(arg1, simd256<64>::lomask()));
1366}
1367
1368//The total number of operations is 7.33333333333
1369template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::xor_hl(bitblock256_t arg1)
1370{
1371        return simd_xor(simd256<128>::srli<(64)>(arg1), simd_and(arg1, simd256<128>::lomask()));
1372}
1373
1374//The total number of operations is 11.5
1375template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::xor_hl(bitblock256_t arg1)
1376{
1377        return simd_xor(simd256<256>::srli<(128)>(arg1), simd_and(arg1, simd256<256>::lomask()));
1378}
1379
1380//The total number of operations is 0
1381template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::popcount(bitblock256_t arg1)
1382{
1383        return arg1;
1384}
1385
1386//The total number of operations is 3.0
1387template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::popcount(bitblock256_t arg1)
1388{
1389        return simd256<2>::add_hl(simd256<(1)>::popcount(arg1));
1390}
1391
1392//The total number of operations is 7.0
1393template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::popcount(bitblock256_t arg1)
1394{
1395        return simd256<4>::add_hl(simd256<(2)>::popcount(arg1));
1396}
1397
1398//The total number of operations is 11.0
1399template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::popcount(bitblock256_t arg1)
1400{
1401        return simd256<8>::add_hl(simd256<(4)>::popcount(arg1));
1402}
1403
1404//The total number of operations is 14.0
1405template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::popcount(bitblock256_t arg1)
1406{
1407        return simd256<16>::add_hl(simd256<(8)>::popcount(arg1));
1408}
1409
1410//The total number of operations is 17.0
1411template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::popcount(bitblock256_t arg1)
1412{
1413        return simd256<32>::add_hl(simd256<(16)>::popcount(arg1));
1414}
1415
1416//The total number of operations is 17.0
1417template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::popcount(bitblock256_t arg1)
1418{
1419        bitblock256_t tmpAns = simd256<8>::popcount(arg1);
1420        return avx_general_combine256(_mm_sad_epu8(avx_select_hi128(tmpAns), _mm_set1_epi32((int32_t)(0))), _mm_sad_epu8(avx_select_lo128(tmpAns), _mm_set1_epi32((int32_t)(0))));
1421}
1422
1423//The total number of operations is 35.6666666667
1424template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::popcount(bitblock256_t arg1)
1425{
1426        return simd256<128>::add_hl(simd256<(64)>::popcount(arg1));
1427}
1428
1429//The total number of operations is 18.0
1430template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::popcount(bitblock256_t arg1)
1431{
1432        return _mm256_castsi128_si256(_mm_cvtsi64_si128((int64_t)(bitblock256::popcount(arg1))));
1433}
1434
1435//The total number of operations is 8.0
1436template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::any(bitblock256_t arg1)
1437{
1438        bitblock256_t t0 = simd256<2>::srli<1>(arg1);
1439        bitblock256_t f0 = simd_or(t0, simd_and(arg1, simd_xor(t0, simd256<8>::constant<255>())));
1440        return simd_or(f0, simd256<2>::slli<1>(f0));
1441}
1442
1443//The total number of operations is 12.0
1444template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::any(bitblock256_t arg1)
1445{
1446        return simd256<4>::ugt(arg1, simd256<8>::constant<0>());
1447}
1448
1449//The total number of operations is 3.0
1450template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::any(bitblock256_t arg1)
1451{
1452        return simd256<8>::ugt(arg1, simd256<8>::constant<0>());
1453}
1454
1455//The total number of operations is 3.0
1456template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::any(bitblock256_t arg1)
1457{
1458        return simd256<16>::ugt(arg1, simd256<8>::constant<0>());
1459}
1460
1461//The total number of operations is 3.0
1462template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::any(bitblock256_t arg1)
1463{
1464        return simd256<32>::ugt(arg1, simd256<8>::constant<0>());
1465}
1466
1467//The total number of operations is 3.0
1468template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::any(bitblock256_t arg1)
1469{
1470        return simd256<64>::ugt(arg1, simd256<8>::constant<0>());
1471}
1472
1473//The total number of operations is 31.75
1474template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::any(bitblock256_t arg1)
1475{
1476        return simd256<128>::ugt(arg1, simd256<8>::constant<0>());
1477}
1478
1479//The total number of operations is 1.0
1480template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::any(bitblock256_t arg1)
1481{
1482        return ((bitblock256::any(arg1)) ? simd256<8>::constant<255>() : simd256<8>::constant<0>());
1483}
1484
1485//The total number of operations is 1.0
1486template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::sra(bitblock256_t arg1, bitblock256_t shift_mask)
1487{
1488        return _mm256_sra_epi16(arg1, avx_select_lo128(shift_mask));
1489}
1490
1491//The total number of operations is 1.0
1492template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::sra(bitblock256_t arg1, bitblock256_t shift_mask)
1493{
1494        return _mm256_sra_epi32(arg1, avx_select_lo128(shift_mask));
1495}
1496
1497//The total number of operations is 13.0
1498template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::neg(bitblock256_t arg1)
1499{
1500        return simd256<2>::sub(simd256<2>::constant<0>(), arg1);
1501}
1502
1503//The total number of operations is 6.0
1504template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::neg(bitblock256_t arg1)
1505{
1506        return simd256<4>::sub(simd256<4>::constant<0>(), arg1);
1507}
1508
1509//The total number of operations is 1.0
1510template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::neg(bitblock256_t arg1)
1511{
1512        return simd256<8>::sub(simd256<8>::constant<0>(), arg1);
1513}
1514
1515//The total number of operations is 1.0
1516template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::neg(bitblock256_t arg1)
1517{
1518        return simd256<16>::sub(simd256<16>::constant<0>(), arg1);
1519}
1520
1521//The total number of operations is 1.0
1522template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::neg(bitblock256_t arg1)
1523{
1524        return simd256<32>::sub(simd256<32>::constant<0>(), arg1);
1525}
1526
1527//The total number of operations is 1.0
1528template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::neg(bitblock256_t arg1)
1529{
1530        return simd256<64>::sub(simd256<64>::constant<0>(), arg1);
1531}
1532
1533//The total number of operations is 12.3333333333
1534template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::neg(bitblock256_t arg1)
1535{
1536        return simd256<128>::sub(simd256<128>::constant<0>(), arg1);
1537}
1538
1539//The total number of operations is 43.1666666667
1540template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::neg(bitblock256_t arg1)
1541{
1542        return simd256<256>::sub(simd256<256>::constant<0>(), arg1);
1543}
1544
1545//The total number of operations is 2.0
1546template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::slli(bitblock256_t arg1)
1547{
1548        return simd_and(simd256<32>::slli<sh>(arg1), simd256<2>::constant<(((3)<<sh)&(3))>());
1549}
1550
1551//The total number of operations is 2.0
1552template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::slli(bitblock256_t arg1)
1553{
1554        return simd_and(simd256<32>::slli<sh>(arg1), simd256<4>::constant<(((15)<<sh)&(15))>());
1555}
1556
1557//The total number of operations is 2.0
1558template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::slli(bitblock256_t arg1)
1559{
1560        return simd_and(simd256<32>::slli<sh>(arg1), simd256<8>::constant<(((255)<<sh)&(255))>());
1561}
1562
1563//The total number of operations is 1.0
1564template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::slli(bitblock256_t arg1)
1565{
1566        return _mm256_slli_epi16(arg1, (int32_t)(sh));
1567}
1568
1569//The total number of operations is 1.0
1570template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::slli(bitblock256_t arg1)
1571{
1572        return _mm256_slli_epi32(arg1, (int32_t)(sh));
1573}
1574
1575//The total number of operations is 1.0
1576template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::slli(bitblock256_t arg1)
1577{
1578        return _mm256_slli_epi64(arg1, (int32_t)(sh));
1579}
1580
1581//The total number of operations is 5.33333333333
1582template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::slli(bitblock256_t arg1)
1583{
1584        return (((sh%8) == 0) ? avx_byte_shift_left(arg1, (sh/8)) : ((sh >= 64) ? simd256<64>::slli<(sh&63)>(avx_byte_shift_left(arg1, 8)) : simd_or(simd256<64>::slli<sh>(arg1), avx_byte_shift_left(simd256<64>::srli<((128-sh)&63)>(arg1), 8))));
1585}
1586
1587//The total number of operations is 9.5
1588template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::slli(bitblock256_t arg1) {
1589    return (sh < 128) ? simd_or(simd256<128>::slli<sh>(arg1), avx_move_lo128_to_hi128(simd256<128>::srli<(sh < 128) ? (128 - sh) : 0>(arg1))) : simd256<128>::slli<TEMPLATE_SUBTRACT(sh, 128)>(avx_move_lo128_to_hi128(arg1));
1590}
1591
1592//The total number of operations is 3.0
1593template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1594{
1595        return simd_or(simd_and(arg2, arg1), simd_andc(arg3, arg1));
1596}
1597
1598//The total number of operations is 8.0
1599template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1600{
1601        return simd256<(1)>::ifh(simd256<1>::ifh(simd256<2>::himask(), arg1, simd256<2>::srli<(1)>(arg1)), arg2, arg3);
1602}
1603
1604//The total number of operations is 13.0
1605template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1606{
1607        return simd256<1>::ifh(simd256<4>::gt(simd256<4>::constant<0>(), arg1), arg2, arg3);
1608}
1609
1610//The total number of operations is 1.0
1611template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1612{
1613        return _mm256_blendv_epi8(arg3, arg2, arg1);
1614}
1615
1616//The total number of operations is 4.0
1617template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1618{
1619        return simd256<1>::ifh(simd256<16>::gt(simd256<16>::constant<0>(), arg1), arg2, arg3);
1620}
1621
1622//The total number of operations is 4.0
1623template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1624{
1625        return simd256<1>::ifh(simd256<32>::gt(simd256<32>::constant<0>(), arg1), arg2, arg3);
1626}
1627
1628//The total number of operations is 4.0
1629template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1630{
1631        return simd256<1>::ifh(simd256<64>::gt(simd256<64>::constant<0>(), arg1), arg2, arg3);
1632}
1633
1634//The total number of operations is 12.3333333333
1635template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1636{
1637        return simd256<(64)>::ifh(simd256<1>::ifh(simd256<128>::himask(), arg1, simd256<128>::srli<(64)>(arg1)), arg2, arg3);
1638}
1639
1640//The total number of operations is 24.8333333333
1641template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::ifh(bitblock256_t arg1, bitblock256_t arg2, bitblock256_t arg3)
1642{
1643        return simd256<(128)>::ifh(simd256<1>::ifh(simd256<256>::himask(), arg1, simd256<256>::srli<(128)>(arg1)), arg2, arg3);
1644}
1645
1646//The total number of operations is 3.0
1647template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::add_hl(bitblock256_t arg1)
1648{
1649        return simd256<16>::sub(arg1, simd_and(simd256<2>::lomask(), simd256<16>::srli<1>(arg1)));
1650}
1651
1652//The total number of operations is 4.0
1653template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::add_hl(bitblock256_t arg1)
1654{
1655        return simd256<(8)>::add(simd256<4>::srli<(2)>(arg1), simd_and(arg1, simd256<4>::lomask()));
1656}
1657
1658//The total number of operations is 4.0
1659template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::add_hl(bitblock256_t arg1)
1660{
1661        return simd256<(16)>::add(simd256<8>::srli<(4)>(arg1), simd_and(arg1, simd256<8>::lomask()));
1662}
1663
1664//The total number of operations is 3.0
1665template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::add_hl(bitblock256_t arg1)
1666{
1667        return simd256<(32)>::add(simd256<16>::srli<(8)>(arg1), simd_and(arg1, simd256<16>::lomask()));
1668}
1669
1670//The total number of operations is 3.0
1671template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::add_hl(bitblock256_t arg1)
1672{
1673        return simd256<(64)>::add(simd256<32>::srli<(16)>(arg1), simd_and(arg1, simd256<32>::lomask()));
1674}
1675
1676//The total number of operations is 3.0
1677template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::add_hl(bitblock256_t arg1)
1678{
1679        return simd256<64>::add(simd256<64>::srli<(32)>(arg1), simd_and(arg1, simd256<64>::lomask()));
1680}
1681
1682//The total number of operations is 18.6666666667
1683template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::add_hl(bitblock256_t arg1)
1684{
1685        return simd256<128>::add(simd256<128>::srli<(64)>(arg1), simd_and(arg1, simd256<128>::lomask()));
1686}
1687
1688//The total number of operations is 53.6666666667
1689template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::add_hl(bitblock256_t arg1)
1690{
1691        return simd256<256>::add(simd256<256>::srli<(128)>(arg1), simd_and(arg1, simd256<256>::lomask()));
1692}
1693
1694//The total number of operations is 1.0
1695template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::srl(bitblock256_t arg1, bitblock256_t shift_mask)
1696{
1697        return _mm256_srl_epi16(arg1, avx_select_lo128(shift_mask));
1698}
1699
1700//The total number of operations is 1.0
1701template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::srl(bitblock256_t arg1, bitblock256_t shift_mask)
1702{
1703        return _mm256_srl_epi32(arg1, avx_select_lo128(shift_mask));
1704}
1705
1706//The total number of operations is 1.0
1707template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::srl(bitblock256_t arg1, bitblock256_t shift_mask)
1708{
1709        return _mm256_srl_epi64(arg1, avx_select_lo128(shift_mask));
1710}
1711
1712//The total number of operations is 6.875
1713template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::srl(bitblock256_t arg1, bitblock256_t shift_mask)
1714{
1715        uint32_t shift = _mm_cvtsi128_si32(avx_select_lo128(shift_mask));
1716        uint32_t n = (shift/64);
1717        bitblock256_t arg2 = ((n == 1) ? mvmd256<64>::srli<1>(arg1) : ((n == 2) ? mvmd256<64>::srli<2>(arg1) : ((n == 3) ? mvmd256<64>::srli<3>(arg1) : arg1)));
1718        return ((n >= 4) ? simd256<32>::constant<0>() : (((shift&63) > 0) ? simd_or(_mm256_srl_epi64(arg2, _mm_cvtsi32_si128((int32_t)((shift&63)))), mvmd256<64>::srli<1>(_mm256_sll_epi64(arg2, _mm_cvtsi32_si128((int32_t)((64-(shift&63))))))) : arg2));
1719}
1720
1721//The total number of operations is 0
1722template <> template <FieldType<1>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::constant()
1723{
1724        return simd256<2>::constant<((val+val)+val)>();
1725}
1726
1727//The total number of operations is 0
1728template <> template <FieldType<2>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::constant()
1729{
1730        return simd256<(4)>::constant<((val<<2)|(val&(3)))>();
1731}
1732
1733//The total number of operations is 0
1734template <> template <FieldType<4>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::constant()
1735{
1736        return simd256<(8)>::constant<((val<<4)|(val&(15)))>();
1737}
1738
1739//The total number of operations is 0
1740template <> template <FieldType<8>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::constant()
1741{
1742        return _mm256_set1_epi8((int32_t)(val));
1743}
1744
1745//The total number of operations is 0
1746template <> template <FieldType<16>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::constant()
1747{
1748        return _mm256_set1_epi16((int32_t)(val));
1749}
1750
1751//The total number of operations is 0
1752template <> template <FieldType<32>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::constant()
1753{
1754        return _mm256_set1_epi32((int32_t)(val));
1755}
1756
1757//The total number of operations is 0
1758template <> template <FieldType<64>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::constant()
1759{
1760        return ((bitblock256_t)(_mm256_set_epi32((int32_t)((val>>32)), (int32_t)(val), (int32_t)((val>>32)), (int32_t)(val), (int32_t)((val>>32)), (int32_t)(val), (int32_t)((val>>32)), (int32_t)(val))));
1761}
1762
1763//The total number of operations is 0
1764template <> template <FieldType<128>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::constant()
1765{
1766        return ((bitblock256_t)(_mm256_set_epi32((int32_t)(0), (int32_t)(0), (int32_t)((val>>32)), (int32_t)(val), (int32_t)(0), (int32_t)(0), (int32_t)((val>>32)), (int32_t)(val))));
1767}
1768
1769//The total number of operations is 0
1770template <> template <FieldType<256>::T val> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::constant()
1771{
1772        return ((bitblock256_t)(_mm256_set_epi32((int32_t)(0), (int32_t)(0), (int32_t)(0), (int32_t)(0), (int32_t)(0), (int32_t)(0), (int32_t)((val>>32)), (int32_t)(val))));
1773}
1774
1775//The total number of operations is 1.0
1776template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::min(bitblock256_t arg1, bitblock256_t arg2)
1777{
1778        return simd_or(arg1, arg2);
1779}
1780
1781//The total number of operations is 18.0
1782template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::min(bitblock256_t arg1, bitblock256_t arg2)
1783{
1784        return simd256<1>::ifh(simd256<2>::lt(arg1, arg2), arg1, arg2);
1785}
1786
1787//The total number of operations is 9.0
1788template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::min(bitblock256_t arg1, bitblock256_t arg2)
1789{
1790        bitblock256_t high_bit = simd256<4>::constant<(8)>();
1791        return simd_xor(simd256<4>::umin(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1792}
1793
1794//The total number of operations is 1.0
1795template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::min(bitblock256_t arg1, bitblock256_t arg2)
1796{
1797        return _mm256_min_epi8(arg1, arg2);
1798}
1799
1800//The total number of operations is 1.0
1801template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::min(bitblock256_t arg1, bitblock256_t arg2)
1802{
1803        return _mm256_min_epi16(arg1, arg2);
1804}
1805
1806//The total number of operations is 1.0
1807template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::min(bitblock256_t arg1, bitblock256_t arg2)
1808{
1809        return _mm256_min_epi32(arg1, arg2);
1810}
1811
1812//The total number of operations is 4.0
1813template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::min(bitblock256_t arg1, bitblock256_t arg2)
1814{
1815        return simd256<1>::ifh(simd256<64>::gt(arg1, arg2), arg2, arg1);
1816}
1817
1818//The total number of operations is 32.6666666667
1819template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::min(bitblock256_t arg1, bitblock256_t arg2)
1820{
1821        bitblock256_t hiAns = simd256<(64)>::min(arg1, arg2);
1822        bitblock256_t loAns = simd256<(64)>::umin(arg1, arg2);
1823        bitblock256_t eqMask1 = simd256<128>::srli<(64)>(simd256<(64)>::eq(hiAns, arg1));
1824        bitblock256_t eqMask2 = simd256<128>::srli<(64)>(simd256<(64)>::eq(hiAns, arg2));
1825        return simd256<1>::ifh(simd256<128>::himask(), hiAns, simd256<1>::ifh(eqMask1, simd256<1>::ifh(eqMask2, loAns, arg1), arg2));
1826}
1827
1828//The total number of operations is 116.666666667
1829template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::min(bitblock256_t arg1, bitblock256_t arg2)
1830{
1831        bitblock256_t hiAns = simd256<(128)>::min(arg1, arg2);
1832        bitblock256_t loAns = simd256<(128)>::umin(arg1, arg2);
1833        bitblock256_t eqMask1 = simd256<256>::srli<(128)>(simd256<(128)>::eq(hiAns, arg1));
1834        bitblock256_t eqMask2 = simd256<256>::srli<(128)>(simd256<(128)>::eq(hiAns, arg2));
1835        return simd256<1>::ifh(simd256<256>::himask(), hiAns, simd256<1>::ifh(eqMask1, simd256<1>::ifh(eqMask2, loAns, arg1), arg2));
1836}
1837
1838//The total number of operations is 0
1839template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::lomask()
1840{
1841        return simd256<2>::constant<(1)>();
1842}
1843
1844//The total number of operations is 0
1845template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::lomask()
1846{
1847        return simd256<4>::constant<(3)>();
1848}
1849
1850//The total number of operations is 0
1851template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::lomask()
1852{
1853        return simd256<8>::constant<(15)>();
1854}
1855
1856//The total number of operations is 0
1857template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::lomask()
1858{
1859        return simd256<16>::constant<(255)>();
1860}
1861
1862//The total number of operations is 0
1863template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::lomask()
1864{
1865        return simd256<32>::constant<(65535)>();
1866}
1867
1868//The total number of operations is 0
1869template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::lomask()
1870{
1871        return ((bitblock256_t)(_mm256_set_epi32((int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(((4294967296ULL)-1)))));
1872}
1873
1874//The total number of operations is 0
1875template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::lomask()
1876{
1877        return ((bitblock256_t)(_mm256_set_epi32((int32_t)(0), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)))));
1878}
1879
1880//The total number of operations is 0
1881template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::lomask()
1882{
1883        return ((bitblock256_t)(_mm256_set_epi32((int32_t)(0), (int32_t)(0), (int32_t)(0), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)))));
1884}
1885
1886//The total number of operations is 1.0
1887template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::umin(bitblock256_t arg1, bitblock256_t arg2)
1888{
1889        return simd_and(arg1, arg2);
1890}
1891
1892//The total number of operations is 16.0
1893template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::umin(bitblock256_t arg1, bitblock256_t arg2)
1894{
1895        return simd_or(simd_and(simd256<(4)>::himask(), simd256<(4)>::umin(arg1, arg2)), simd256<(4)>::umin(simd_and(simd256<(4)>::lomask(), arg1), simd_and(simd256<(4)>::lomask(), arg2)));
1896}
1897
1898//The total number of operations is 6.0
1899template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::umin(bitblock256_t arg1, bitblock256_t arg2)
1900{
1901        return simd_or(simd_and(simd256<(8)>::himask(), simd256<(8)>::umin(arg1, arg2)), simd256<(8)>::umin(simd_and(simd256<(8)>::lomask(), arg1), simd_and(simd256<(8)>::lomask(), arg2)));
1902}
1903
1904//The total number of operations is 1.0
1905template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::umin(bitblock256_t arg1, bitblock256_t arg2)
1906{
1907        return _mm256_min_epu8(arg1, arg2);
1908}
1909
1910//The total number of operations is 1.0
1911template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::umin(bitblock256_t arg1, bitblock256_t arg2)
1912{
1913        return _mm256_min_epu16(arg1, arg2);
1914}
1915
1916//The total number of operations is 1.0
1917template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::umin(bitblock256_t arg1, bitblock256_t arg2)
1918{
1919        return _mm256_min_epu32(arg1, arg2);
1920}
1921
1922//The total number of operations is 7.0
1923template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::umin(bitblock256_t arg1, bitblock256_t arg2)
1924{
1925        bitblock256_t high_bit = simd256<64>::constant<(9223372036854775808ULL)>();
1926        return simd_xor(simd256<64>::min(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
1927}
1928
1929//The total number of operations is 28.6666666667
1930template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::umin(bitblock256_t arg1, bitblock256_t arg2)
1931{
1932        bitblock256_t tmpAns = simd256<(64)>::umin(arg1, arg2);
1933        bitblock256_t eqMask1 = simd256<128>::srli<(64)>(simd256<(64)>::eq(tmpAns, arg1));
1934        bitblock256_t eqMask2 = simd256<128>::srli<(64)>(simd256<(64)>::eq(tmpAns, arg2));
1935        return simd256<1>::ifh(simd256<128>::himask(), tmpAns, simd256<1>::ifh(eqMask1, simd256<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1936}
1937
1938//The total number of operations is 84.0
1939template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::umin(bitblock256_t arg1, bitblock256_t arg2)
1940{
1941        bitblock256_t tmpAns = simd256<(128)>::umin(arg1, arg2);
1942        bitblock256_t eqMask1 = simd256<256>::srli<(128)>(simd256<(128)>::eq(tmpAns, arg1));
1943        bitblock256_t eqMask2 = simd256<256>::srli<(128)>(simd256<(128)>::eq(tmpAns, arg2));
1944        return simd256<1>::ifh(simd256<256>::himask(), tmpAns, simd256<1>::ifh(eqMask1, simd256<1>::ifh(eqMask2, tmpAns, arg1), arg2));
1945}
1946
1947//The total number of operations is 14.5
1948template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::abs(bitblock256_t arg1)
1949{
1950        return simd256<1>::ifh(simd256<2>::himask(), simd_and(arg1, simd256<256>::slli<1>(simd_not(arg1))), arg1);
1951}
1952
1953//The total number of operations is 19.0
1954template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::abs(bitblock256_t arg1)
1955{
1956        bitblock256_t gtMask = simd256<4>::gt(arg1, simd256<4>::constant<0>());
1957        return simd256<1>::ifh(gtMask, arg1, simd256<4>::sub(gtMask, arg1));
1958}
1959
1960//The total number of operations is 1.0
1961template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::abs(bitblock256_t arg1)
1962{
1963        return _mm256_abs_epi8(arg1);
1964}
1965
1966//The total number of operations is 1.0
1967template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::abs(bitblock256_t arg1)
1968{
1969        return _mm256_abs_epi16(arg1);
1970}
1971
1972//The total number of operations is 1.0
1973template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::abs(bitblock256_t arg1)
1974{
1975        return _mm256_abs_epi32(arg1);
1976}
1977
1978//The total number of operations is 5.0
1979template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::abs(bitblock256_t arg1)
1980{
1981        bitblock256_t gtMask = simd256<64>::gt(arg1, simd256<64>::constant<0>());
1982        return simd256<1>::ifh(gtMask, arg1, simd256<64>::sub(gtMask, arg1));
1983}
1984
1985//The total number of operations is 37.0
1986template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::abs(bitblock256_t arg1)
1987{
1988        bitblock256_t eqMask = simd256<128>::eq(simd256<1>::ifh(simd256<128>::himask(), simd256<(64)>::abs(arg1), arg1), arg1);
1989        return simd256<1>::ifh(eqMask, arg1, simd256<128>::sub(eqMask, arg1));
1990}
1991
1992//The total number of operations is 120.833333333
1993template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::abs(bitblock256_t arg1)
1994{
1995        bitblock256_t eqMask = simd256<256>::eq(simd256<1>::ifh(simd256<256>::himask(), simd256<(128)>::abs(arg1), arg1), arg1);
1996        return simd256<1>::ifh(eqMask, arg1, simd256<256>::sub(eqMask, arg1));
1997}
1998
1999//The total number of operations is 2.0
2000template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::eq(bitblock256_t arg1, bitblock256_t arg2)
2001{
2002        return simd_not(simd_xor(arg1, arg2));
2003}
2004
2005//The total number of operations is 8.0
2006template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::eq(bitblock256_t arg1, bitblock256_t arg2)
2007{
2008        bitblock256_t tmpAns = simd256<(1)>::eq(arg1, arg2);
2009        bitblock256_t loMask = simd_and(tmpAns, simd256<2>::srli<(1)>(tmpAns));
2010        bitblock256_t hiMask = simd256<2>::slli<(1)>(loMask);
2011        return simd_or(loMask, hiMask);
2012}
2013
2014//The total number of operations is 9.0
2015template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::eq(bitblock256_t arg1, bitblock256_t arg2)
2016{
2017        return simd_or(simd_and(simd256<(8)>::himask(), simd256<(8)>::eq(simd_and(simd256<(8)>::himask(), arg1), simd_and(simd256<(8)>::himask(), arg2))), simd_and(simd256<(8)>::lomask(), simd256<(8)>::eq(simd_and(simd256<(8)>::lomask(), arg1), simd_and(simd256<(8)>::lomask(), arg2))));
2018}
2019
2020//The total number of operations is 1.0
2021template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::eq(bitblock256_t arg1, bitblock256_t arg2)
2022{
2023        return _mm256_cmpeq_epi8(arg1, arg2);
2024}
2025
2026//The total number of operations is 1.0
2027template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::eq(bitblock256_t arg1, bitblock256_t arg2)
2028{
2029        return _mm256_cmpeq_epi16(arg1, arg2);
2030}
2031
2032//The total number of operations is 1.0
2033template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::eq(bitblock256_t arg1, bitblock256_t arg2)
2034{
2035        return _mm256_cmpeq_epi32(arg1, arg2);
2036}
2037
2038//The total number of operations is 1.0
2039template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::eq(bitblock256_t arg1, bitblock256_t arg2)
2040{
2041        return _mm256_cmpeq_epi64(arg1, arg2);
2042}
2043
2044//The total number of operations is 13.6666666667
2045template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::eq(bitblock256_t arg1, bitblock256_t arg2)
2046{
2047        bitblock256_t tmpAns = simd256<(64)>::eq(arg1, arg2);
2048        bitblock256_t loMask = simd_and(tmpAns, simd256<128>::srli<(64)>(tmpAns));
2049        bitblock256_t hiMask = simd256<128>::slli<(64)>(loMask);
2050        return simd_or(loMask, hiMask);
2051}
2052
2053//The total number of operations is 34.6666666667
2054template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::eq(bitblock256_t arg1, bitblock256_t arg2)
2055{
2056        bitblock256_t tmpAns = simd256<(128)>::eq(arg1, arg2);
2057        bitblock256_t loMask = simd_and(tmpAns, simd256<256>::srli<(128)>(tmpAns));
2058        bitblock256_t hiMask = simd256<256>::slli<(128)>(loMask);
2059        return simd_or(loMask, hiMask);
2060}
2061
2062//The total number of operations is 4.0
2063template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::srai(bitblock256_t arg1)
2064{
2065        return ((sh == 0) ? arg1 : simd_or(simd_and(simd256<2>::himask(), arg1), simd256<2>::srli<1>(arg1)));
2066}
2067
2068//The total number of operations is 10.0
2069template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::srai(bitblock256_t arg1)
2070{
2071        bitblock256_t tmp = simd256<4>::srli<((sh >= 4) ? (3) : ((sh < 0) ? 0 : sh))>(arg1);
2072        return simd_or(tmp, simd256<4>::sub(simd256<4>::constant<0>(), simd_and(simd256<4>::constant<(1<<((4-((sh >= 4) ? (3) : ((sh < 0) ? 0 : sh)))-1))>(), tmp)));
2073}
2074
2075//The total number of operations is 5.0
2076template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::srai(bitblock256_t arg1)
2077{
2078        bitblock256_t tmp = simd256<8>::srli<((sh >= 8) ? (7) : ((sh < 0) ? 0 : sh))>(arg1);
2079        return simd_or(tmp, simd256<8>::sub(simd256<8>::constant<0>(), simd_and(simd256<8>::constant<(1<<((8-((sh >= 8) ? (7) : ((sh < 0) ? 0 : sh)))-1))>(), tmp)));
2080}
2081
2082//The total number of operations is 1.0
2083template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::srai(bitblock256_t arg1)
2084{
2085        return _mm256_srai_epi16(arg1, (int32_t)(sh));
2086}
2087
2088//The total number of operations is 1.0
2089template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::srai(bitblock256_t arg1)
2090{
2091        return _mm256_srai_epi32(arg1, (int32_t)(sh));
2092}
2093
2094//The total number of operations is 4.5
2095template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::srai(bitblock256_t arg1)
2096{
2097    return simd_or(simd_and(simd256<64>::himask(), simd256<(32)>::srai<((sh < (32)) ? sh : (32))>(arg1)), ((sh <= (32)) ? simd256<64>::srli<sh>(arg1) : simd256<(32)>::srai<TEMPLATE_SUBTRACT(sh,32)>(simd256<64>::srli<(32)>(arg1))));
2098}
2099
2100//The total number of operations is 14.0833333333
2101template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::srai(bitblock256_t arg1)
2102{
2103    return simd_or(simd_and(simd256<128>::himask(), simd256<(64)>::srai<((sh < (64)) ? sh : (64))>(arg1)), ((sh <= (64)) ? simd256<128>::srli<sh>(arg1) : simd256<(64)>::srai<TEMPLATE_SUBTRACT(sh,64)>(simd256<128>::srli<(64)>(arg1))));
2104}
2105
2106//The total number of operations is 32.625
2107template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::srai(bitblock256_t arg1)
2108{
2109    return simd_or(simd_and(simd256<256>::himask(), simd256<(128)>::srai<((sh < (128)) ? sh : (128))>(arg1)), ((sh <= (128)) ? simd256<256>::srli<sh>(arg1) : simd256<(128)>::srai<TEMPLATE_SUBTRACT(sh,128)>(simd256<256>::srli<(128)>(arg1))));
2110}
2111
2112//The total number of operations is 1.0
2113template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::lt(bitblock256_t arg1, bitblock256_t arg2)
2114{
2115        return simd_andc(arg1, arg2);
2116}
2117
2118//The total number of operations is 15.0
2119template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::lt(bitblock256_t arg1, bitblock256_t arg2)
2120{
2121        bitblock256_t hiAns = simd256<(1)>::lt(arg1, arg2);
2122        bitblock256_t loAns = simd256<(1)>::ult(arg1, arg2);
2123        bitblock256_t mask = simd_and(loAns, simd256<2>::srli<(1)>(simd256<(1)>::eq(arg1, arg2)));
2124        mask = simd_or(mask, simd256<2>::slli<(1)>(mask));
2125        return simd_or(simd256<2>::srai<(1)>(hiAns), mask);
2126}
2127
2128//The total number of operations is 18.0
2129template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::lt(bitblock256_t arg1, bitblock256_t arg2)
2130{
2131        return simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::lt(arg1, simd_and(simd256<(8)>::himask(), arg2)), simd256<(8)>::lt(simd256<(8)>::slli<4>(arg1), simd256<(8)>::slli<4>(arg2)));
2132}
2133
2134//The total number of operations is 5.0
2135template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::lt(bitblock256_t arg1, bitblock256_t arg2)
2136{
2137        return simd_and(simd_not(simd256<8>::gt(arg1, arg2)), simd_not(simd256<8>::eq(arg1, arg2)));
2138}
2139
2140//The total number of operations is 5.0
2141template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::lt(bitblock256_t arg1, bitblock256_t arg2)
2142{
2143        return simd_and(simd_not(simd256<16>::gt(arg1, arg2)), simd_not(simd256<16>::eq(arg1, arg2)));
2144}
2145
2146//The total number of operations is 5.0
2147template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::lt(bitblock256_t arg1, bitblock256_t arg2)
2148{
2149        return simd_and(simd_not(simd256<32>::gt(arg1, arg2)), simd_not(simd256<32>::eq(arg1, arg2)));
2150}
2151
2152//The total number of operations is 5.0
2153template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::lt(bitblock256_t arg1, bitblock256_t arg2)
2154{
2155        return simd_and(simd_not(simd256<64>::gt(arg1, arg2)), simd_not(simd256<64>::eq(arg1, arg2)));
2156}
2157
2158//The total number of operations is 40.75
2159template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::lt(bitblock256_t arg1, bitblock256_t arg2)
2160{
2161        bitblock256_t hiAns = simd256<(64)>::lt(arg1, arg2);
2162        bitblock256_t loAns = simd256<(64)>::ult(arg1, arg2);
2163        bitblock256_t mask = simd_and(loAns, simd256<128>::srli<(64)>(simd256<(64)>::eq(arg1, arg2)));
2164        mask = simd_or(mask, simd256<128>::slli<(64)>(mask));
2165        return simd_or(simd256<128>::srai<(64)>(hiAns), mask);
2166}
2167
2168//The total number of operations is 144.791666667
2169template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::lt(bitblock256_t arg1, bitblock256_t arg2)
2170{
2171        bitblock256_t hiAns = simd256<(128)>::lt(arg1, arg2);
2172        bitblock256_t loAns = simd256<(128)>::ult(arg1, arg2);
2173        bitblock256_t mask = simd_and(loAns, simd256<256>::srli<(128)>(simd256<(128)>::eq(arg1, arg2)));
2174        mask = simd_or(mask, simd256<256>::slli<(128)>(mask));
2175        return simd_or(simd256<256>::srai<(128)>(hiAns), mask);
2176}
2177
2178//The total number of operations is 0
2179template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::himask()
2180{
2181        return simd256<2>::constant<(2)>();
2182}
2183
2184//The total number of operations is 0
2185template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::himask()
2186{
2187        return simd256<4>::constant<(12)>();
2188}
2189
2190//The total number of operations is 0
2191template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::himask()
2192{
2193        return simd256<8>::constant<(240)>();
2194}
2195
2196//The total number of operations is 0
2197template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::himask()
2198{
2199        return simd256<16>::constant<(65280)>();
2200}
2201
2202//The total number of operations is 0
2203template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::himask()
2204{
2205        return simd256<32>::constant<4294901760ULL>();
2206}
2207
2208//The total number of operations is 0
2209template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::himask()
2210{
2211        return ((bitblock256_t)(_mm256_set_epi32((int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(0))));
2212}
2213
2214//The total number of operations is 0
2215template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::himask()
2216{
2217        return ((bitblock256_t)(_mm256_set_epi32((int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(0), (int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(0))));
2218}
2219
2220//The total number of operations is 0
2221template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::himask()
2222{
2223        return ((bitblock256_t)(_mm256_set_epi32((int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)), (int32_t)(((4294967296ULL)-1)), (int32_t)(0), (int32_t)(0), (int32_t)(0), (int32_t)(0))));
2224}
2225
2226//The total number of operations is 1.0
2227template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::add(bitblock256_t arg1, bitblock256_t arg2)
2228{
2229        return simd_xor(arg1, arg2);
2230}
2231
2232//The total number of operations is 13.0
2233template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::add(bitblock256_t arg1, bitblock256_t arg2)
2234{
2235        bitblock256_t ans = simd256<(1)>::add(arg1, arg2);
2236        bitblock256_t carryMask = simd_or(simd_and(arg1, arg2), simd_and(simd_xor(arg1, arg2), simd_not(ans)));
2237        bitblock256_t loMask = simd256<2>::lomask();
2238        bitblock256_t carry = simd256<2>::slli<1>(simd_and(carryMask, loMask));
2239        return simd256<1>::ifh(loMask, ans, simd256<(1)>::add(ans, carry));
2240}
2241
2242//The total number of operations is 6.0
2243template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::add(bitblock256_t arg1, bitblock256_t arg2)
2244{
2245        return simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::add(arg1, simd_and(simd256<(8)>::himask(), arg2)), simd256<(8)>::add(arg1, arg2));
2246}
2247
2248//The total number of operations is 1.0
2249template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::add(bitblock256_t arg1, bitblock256_t arg2)
2250{
2251        return _mm256_add_epi8(arg1, arg2);
2252}
2253
2254//The total number of operations is 1.0
2255template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::add(bitblock256_t arg1, bitblock256_t arg2)
2256{
2257        return _mm256_add_epi16(arg1, arg2);
2258}
2259
2260//The total number of operations is 1.0
2261template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::add(bitblock256_t arg1, bitblock256_t arg2)
2262{
2263        return _mm256_add_epi32(arg1, arg2);
2264}
2265
2266//The total number of operations is 1.0
2267template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::add(bitblock256_t arg1, bitblock256_t arg2)
2268{
2269        return _mm256_add_epi64(arg1, arg2);
2270}
2271
2272//The total number of operations is 12.3333333333
2273template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::add(bitblock256_t arg1, bitblock256_t arg2)
2274{
2275        bitblock256_t partial = simd256<(64)>::add(arg1, arg2);
2276        bitblock256_t carryMask = simd_or(simd_and(arg1, arg2), simd_andc(simd_xor(arg1, arg2), partial));
2277        bitblock256_t carry = simd256<128>::slli<(64)>(simd256<(64)>::srli<(63)>(carryMask));
2278        return simd256<(64)>::add(partial, carry);
2279}
2280
2281//The total number of operations is 43.1666666667
2282template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::add(bitblock256_t arg1, bitblock256_t arg2)
2283{
2284        bitblock256_t ans = simd256<(128)>::add(arg1, arg2);
2285        bitblock256_t carryMask = simd_or(simd_and(arg1, arg2), simd_and(simd_xor(arg1, arg2), simd_not(ans)));
2286        bitblock256_t loMask = simd256<256>::lomask();
2287        bitblock256_t carry = simd256<256>::slli<1>(simd_and(carryMask, loMask));
2288        return simd256<1>::ifh(loMask, ans, simd256<(128)>::add(ans, carry));
2289}
2290
2291//The total number of operations is 1.0
2292template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<1>::umax(bitblock256_t arg1, bitblock256_t arg2)
2293{
2294        return simd_or(arg1, arg2);
2295}
2296
2297//The total number of operations is 16.0
2298template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<2>::umax(bitblock256_t arg1, bitblock256_t arg2)
2299{
2300        return simd_or(simd_and(simd256<(4)>::himask(), simd256<(4)>::umax(arg1, arg2)), simd256<(4)>::umax(simd_and(simd256<(4)>::lomask(), arg1), simd_and(simd256<(4)>::lomask(), arg2)));
2301}
2302
2303//The total number of operations is 6.0
2304template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<4>::umax(bitblock256_t arg1, bitblock256_t arg2)
2305{
2306        return simd_or(simd_and(simd256<(8)>::himask(), simd256<(8)>::umax(arg1, arg2)), simd256<(8)>::umax(simd_and(simd256<(8)>::lomask(), arg1), simd_and(simd256<(8)>::lomask(), arg2)));
2307}
2308
2309//The total number of operations is 1.0
2310template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<8>::umax(bitblock256_t arg1, bitblock256_t arg2)
2311{
2312        return _mm256_max_epu8(arg1, arg2);
2313}
2314
2315//The total number of operations is 1.0
2316template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<16>::umax(bitblock256_t arg1, bitblock256_t arg2)
2317{
2318        return _mm256_max_epu16(arg1, arg2);
2319}
2320
2321//The total number of operations is 1.0
2322template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<32>::umax(bitblock256_t arg1, bitblock256_t arg2)
2323{
2324        return _mm256_max_epu32(arg1, arg2);
2325}
2326
2327//The total number of operations is 7.0
2328template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<64>::umax(bitblock256_t arg1, bitblock256_t arg2)
2329{
2330        bitblock256_t high_bit = simd256<64>::constant<(9223372036854775808ULL)>();
2331        return simd_xor(simd256<64>::max(simd_xor(arg1, high_bit), simd_xor(arg2, high_bit)), high_bit);
2332}
2333
2334//The total number of operations is 28.6666666667
2335template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<128>::umax(bitblock256_t arg1, bitblock256_t arg2)
2336{
2337        bitblock256_t tmpAns = simd256<(64)>::umax(arg1, arg2);
2338        bitblock256_t eqMask1 = simd256<128>::srli<(64)>(simd256<(64)>::eq(tmpAns, arg1));
2339        bitblock256_t eqMask2 = simd256<128>::srli<(64)>(simd256<(64)>::eq(tmpAns, arg2));
2340        return simd256<1>::ifh(simd256<128>::himask(), tmpAns, simd256<1>::ifh(eqMask1, simd256<1>::ifh(eqMask2, tmpAns, arg1), arg2));
2341}
2342
2343//The total number of operations is 84.0
2344template <> IDISA_ALWAYS_INLINE bitblock256_t simd256<256>::umax(bitblock256_t arg1, bitblock256_t arg2)
2345{
2346        bitblock256_t tmpAns = simd256<(128)>::umax(arg1, arg2);
2347        bitblock256_t eqMask1 = simd256<256>::srli<(128)>(simd256<(128)>::eq(tmpAns, arg1));
2348        bitblock256_t eqMask2 = simd256<256>::srli<(128)>(simd256<(128)>::eq(tmpAns, arg2));
2349        return simd256<1>::ifh(simd256<256>::himask(), tmpAns, simd256<1>::ifh(eqMask1, simd256<1>::ifh(eqMask2, tmpAns, arg1), arg2));
2350}
2351
2352//The total number of operations is 163.0
2353template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::umin_hl(bitblock256_t arg1, bitblock256_t arg2)
2354{
2355        return simd256<(1)>::umin(hsimd256<2>::packh(arg1, arg2), hsimd256<2>::packl(arg1, arg2));
2356}
2357
2358//The total number of operations is 128.0
2359template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::umin_hl(bitblock256_t arg1, bitblock256_t arg2)
2360{
2361        return simd256<(2)>::umin(hsimd256<4>::packh(arg1, arg2), hsimd256<4>::packl(arg1, arg2));
2362}
2363
2364//The total number of operations is 68.0
2365template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::umin_hl(bitblock256_t arg1, bitblock256_t arg2)
2366{
2367        return simd256<(4)>::umin(hsimd256<8>::packh(arg1, arg2), hsimd256<8>::packl(arg1, arg2));
2368}
2369
2370//The total number of operations is 11.0
2371template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::umin_hl(bitblock256_t arg1, bitblock256_t arg2)
2372{
2373        return simd256<(8)>::umin(hsimd256<16>::packh(arg1, arg2), hsimd256<16>::packl(arg1, arg2));
2374}
2375
2376//The total number of operations is 11.0
2377template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::umin_hl(bitblock256_t arg1, bitblock256_t arg2)
2378{
2379        return simd256<(16)>::umin(hsimd256<32>::packh(arg1, arg2), hsimd256<32>::packl(arg1, arg2));
2380}
2381
2382//The total number of operations is 128.0
2383template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::umin_hl(bitblock256_t arg1, bitblock256_t arg2)
2384{
2385        return simd256<(32)>::umin(hsimd256<64>::packh(arg1, arg2), hsimd256<64>::packl(arg1, arg2));
2386}
2387
2388//The total number of operations is 152.666666667
2389template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::umin_hl(bitblock256_t arg1, bitblock256_t arg2)
2390{
2391        return simd256<(64)>::umin(hsimd256<128>::packh(arg1, arg2), hsimd256<128>::packl(arg1, arg2));
2392}
2393
2394//The total number of operations is 53.6666666667
2395template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::umin_hl(bitblock256_t arg1, bitblock256_t arg2)
2396{
2397        return simd256<(128)>::umin(hsimd256<256>::packh(arg1, arg2), hsimd256<256>::packl(arg1, arg2));
2398}
2399
2400//The total number of operations is 163.0
2401template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::add_hl(bitblock256_t arg1, bitblock256_t arg2)
2402{
2403        return simd256<(1)>::add(hsimd256<2>::packh(arg1, arg2), hsimd256<2>::packl(arg1, arg2));
2404}
2405
2406//The total number of operations is 125.0
2407template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::add_hl(bitblock256_t arg1, bitblock256_t arg2)
2408{
2409        return simd256<(2)>::add(hsimd256<4>::packh(arg1, arg2), hsimd256<4>::packl(arg1, arg2));
2410}
2411
2412//The total number of operations is 68.0
2413template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::add_hl(bitblock256_t arg1, bitblock256_t arg2)
2414{
2415        return simd256<(4)>::add(hsimd256<8>::packh(arg1, arg2), hsimd256<8>::packl(arg1, arg2));
2416}
2417
2418//The total number of operations is 11.0
2419template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::add_hl(bitblock256_t arg1, bitblock256_t arg2)
2420{
2421        return simd256<(8)>::add(hsimd256<16>::packh(arg1, arg2), hsimd256<16>::packl(arg1, arg2));
2422}
2423
2424//The total number of operations is 3.0
2425template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::add_hl(bitblock256_t arg1, bitblock256_t arg2)
2426{
2427        bitblock256_t alpha = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(32));
2428        bitblock256_t beta = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(49));
2429        return _mm256_hadd_epi16(alpha, beta);
2430}
2431
2432//The total number of operations is 3.0
2433template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::add_hl(bitblock256_t arg1, bitblock256_t arg2)
2434{
2435        bitblock256_t alpha = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(32));
2436        bitblock256_t beta = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(49));
2437        return _mm256_hadd_epi32(alpha, beta);
2438}
2439
2440//The total number of operations is 146.666666667
2441template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::add_hl(bitblock256_t arg1, bitblock256_t arg2)
2442{
2443        return simd256<(64)>::add(hsimd256<128>::packh(arg1, arg2), hsimd256<128>::packl(arg1, arg2));
2444}
2445
2446//The total number of operations is 37.3333333333
2447template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::add_hl(bitblock256_t arg1, bitblock256_t arg2)
2448{
2449        return simd256<(128)>::add(hsimd256<256>::packh(arg1, arg2), hsimd256<256>::packl(arg1, arg2));
2450}
2451
2452//The total number of operations is 155.0
2453template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packss(bitblock256_t arg1, bitblock256_t arg2)
2454{
2455        bitblock256_t hiBound = simd256<2>::srli<1>(simd256<2>::lomask());
2456        bitblock256_t loBound = simd_not(hiBound);
2457        return hsimd256<2>::packl(simd256<1>::ifh(simd256<2>::gt(arg1, hiBound), hiBound, simd256<1>::ifh(simd256<2>::gt(arg1, loBound), arg1, loBound)), simd256<1>::ifh(simd256<2>::gt(arg2, hiBound), hiBound, simd256<1>::ifh(simd256<2>::gt(arg2, loBound), arg2, loBound)));
2458}
2459
2460//The total number of operations is 110.0
2461template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packss(bitblock256_t arg1, bitblock256_t arg2)
2462{
2463        bitblock256_t hiBound = simd256<4>::srli<1>(simd256<4>::lomask());
2464        bitblock256_t loBound = simd_not(hiBound);
2465        return hsimd256<4>::packl(simd256<1>::ifh(simd256<4>::gt(arg1, hiBound), hiBound, simd256<1>::ifh(simd256<4>::gt(arg1, loBound), arg1, loBound)), simd256<1>::ifh(simd256<4>::gt(arg2, hiBound), hiBound, simd256<1>::ifh(simd256<4>::gt(arg2, loBound), arg2, loBound)));
2466}
2467
2468//The total number of operations is 49.0
2469template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::packss(bitblock256_t arg1, bitblock256_t arg2)
2470{
2471        bitblock256_t hiBound = simd256<8>::srli<1>(simd256<8>::lomask());
2472        bitblock256_t loBound = simd_not(hiBound);
2473        return hsimd256<8>::packl(simd256<1>::ifh(simd256<8>::gt(arg1, hiBound), hiBound, simd256<1>::ifh(simd256<8>::gt(arg1, loBound), arg1, loBound)), simd256<1>::ifh(simd256<8>::gt(arg2, hiBound), hiBound, simd256<1>::ifh(simd256<8>::gt(arg2, loBound), arg2, loBound)));
2474}
2475
2476//The total number of operations is 3.0
2477template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::packss(bitblock256_t arg1, bitblock256_t arg2)
2478{
2479        bitblock256_t alpha = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(32));
2480        bitblock256_t beta = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(49));
2481        return _mm256_packs_epi16(alpha, beta);
2482}
2483
2484//The total number of operations is 3.0
2485template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::packss(bitblock256_t arg1, bitblock256_t arg2)
2486{
2487        bitblock256_t alpha = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(32));
2488        bitblock256_t beta = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(49));
2489        return _mm256_packs_epi32(alpha, beta);
2490}
2491
2492//The total number of operations is 80.5
2493template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::packss(bitblock256_t arg1, bitblock256_t arg2)
2494{
2495        bitblock256_t hiBound = simd256<64>::srli<1>(simd256<64>::lomask());
2496        bitblock256_t loBound = simd_not(hiBound);
2497        return hsimd256<64>::packl(simd256<1>::ifh(simd256<64>::gt(arg1, hiBound), hiBound, simd256<1>::ifh(simd256<64>::gt(arg1, loBound), arg1, loBound)), simd256<1>::ifh(simd256<64>::gt(arg2, hiBound), hiBound, simd256<1>::ifh(simd256<64>::gt(arg2, loBound), arg2, loBound)));
2498}
2499
2500//The total number of operations is 186.833333333
2501template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::packss(bitblock256_t arg1, bitblock256_t arg2)
2502{
2503        bitblock256_t hiBound = simd256<128>::srli<1>(simd256<128>::lomask());
2504        bitblock256_t loBound = simd_not(hiBound);
2505        return hsimd256<128>::packl(simd256<1>::ifh(simd256<128>::gt(arg1, hiBound), hiBound, simd256<1>::ifh(simd256<128>::gt(arg1, loBound), arg1, loBound)), simd256<1>::ifh(simd256<128>::gt(arg2, hiBound), hiBound, simd256<1>::ifh(simd256<128>::gt(arg2, loBound), arg2, loBound)));
2506}
2507
2508//The total number of operations is 566.166666667
2509template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::packss(bitblock256_t arg1, bitblock256_t arg2)
2510{
2511        bitblock256_t hiBound = simd256<256>::srli<1>(simd256<256>::lomask());
2512        bitblock256_t loBound = simd_not(hiBound);
2513        return hsimd256<256>::packl(simd256<1>::ifh(simd256<256>::gt(arg1, hiBound), hiBound, simd256<1>::ifh(simd256<256>::gt(arg1, loBound), arg1, loBound)), simd256<1>::ifh(simd256<256>::gt(arg2, hiBound), hiBound, simd256<1>::ifh(simd256<256>::gt(arg2, loBound), arg2, loBound)));
2514}
2515
2516//The total number of operations is 1.0
2517template <> IDISA_ALWAYS_INLINE FieldType<256/8>::T hsimd256<8>::signmask(bitblock256_t arg1)
2518{
2519        return _mm256_movemask_epi8(arg1);
2520}
2521
2522//The total number of operations is 4.0
2523template <> IDISA_ALWAYS_INLINE FieldType<256/16>::T hsimd256<16>::signmask(bitblock256_t arg1)
2524{
2525        return hsimd256<(8)>::signmask(hsimd256<16>::packss(simd256<16>::constant<0>(), arg1));
2526}
2527
2528//The total number of operations is 1.0
2529template <> IDISA_ALWAYS_INLINE FieldType<256/32>::T hsimd256<32>::signmask(bitblock256_t arg1)
2530{
2531        return _mm256_movemask_ps(_mm256_castsi256_ps(arg1));
2532}
2533
2534//The total number of operations is 1.0
2535template <> IDISA_ALWAYS_INLINE FieldType<256/64>::T hsimd256<64>::signmask(bitblock256_t arg1)
2536{
2537        return _mm256_movemask_pd(_mm256_castsi256_pd(arg1));
2538}
2539
2540//The total number of operations is 109.166666667
2541template <> IDISA_ALWAYS_INLINE FieldType<256/128>::T hsimd256<128>::signmask(bitblock256_t arg1)
2542{
2543        return hsimd256<(64)>::signmask(hsimd256<128>::packh(simd256<128>::constant<0>(), arg1));
2544}
2545
2546//The total number of operations is 121.666666667
2547template <> IDISA_ALWAYS_INLINE FieldType<256/256>::T hsimd256<256>::signmask(bitblock256_t arg1)
2548{
2549        return hsimd256<(128)>::signmask(hsimd256<256>::packh(simd256<256>::constant<0>(), arg1));
2550}
2551
2552//The total number of operations is 80.0
2553template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packl(bitblock256_t arg1, bitblock256_t arg2)
2554{
2555        return hsimd256<(4)>::packl(simd256<1>::ifh(simd256<2>::himask(), simd256<256>::srli<(1)>(arg1), arg1), simd256<1>::ifh(simd256<2>::himask(), simd256<256>::srli<(1)>(arg2), arg2));
2556}
2557
2558//The total number of operations is 55.0
2559template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packl(bitblock256_t arg1, bitblock256_t arg2)
2560{
2561        return hsimd256<(8)>::packl(simd256<1>::ifh(simd256<4>::himask(), simd256<256>::srli<(2)>(arg1), arg1), simd256<1>::ifh(simd256<4>::himask(), simd256<256>::srli<(2)>(arg2), arg2));
2562}
2563
2564//The total number of operations is 30.0
2565template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::packl(bitblock256_t arg1, bitblock256_t arg2)
2566{
2567        return hsimd256<(16)>::packl(simd256<1>::ifh(simd256<8>::himask(), simd256<256>::srli<(4)>(arg1), arg1), simd256<1>::ifh(simd256<8>::himask(), simd256<256>::srli<(4)>(arg2), arg2));
2568}
2569
2570//The total number of operations is 5.0
2571template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::packl(bitblock256_t arg1, bitblock256_t arg2)
2572{
2573        return hsimd256<16>::packus(simd_and(arg1, simd256<16>::lomask()), simd_and(arg2, simd256<16>::lomask()));
2574}
2575
2576//The total number of operations is 5.0
2577template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::packl(bitblock256_t arg1, bitblock256_t arg2)
2578{
2579        return hsimd256<32>::packus(simd_and(arg1, simd256<32>::lomask()), simd_and(arg2, simd256<32>::lomask()));
2580}
2581
2582//The total number of operations is 62.5
2583template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::packl(bitblock256_t arg1, bitblock256_t arg2)
2584{
2585        return hsimd256<(128)>::packl(simd256<1>::ifh(simd256<64>::himask(), simd256<256>::srli<(32)>(arg1), arg1), simd256<1>::ifh(simd256<64>::himask(), simd256<256>::srli<(32)>(arg2), arg2));
2586}
2587
2588//The total number of operations is 37.5
2589template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::packl(bitblock256_t arg1, bitblock256_t arg2)
2590{
2591        return hsimd256<(256)>::packl(simd256<1>::ifh(simd256<128>::himask(), simd256<256>::srli<(64)>(arg1), arg1), simd256<1>::ifh(simd256<128>::himask(), simd256<256>::srli<(64)>(arg2), arg2));
2592}
2593
2594//The total number of operations is 12.5
2595template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::packl(bitblock256_t arg1, bitblock256_t arg2)
2596{
2597        return simd256<1>::ifh(simd256<256>::himask(), simd256<256>::slli<(128)>(arg1), arg2);
2598}
2599
2600//The total number of operations is 82.0
2601template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packh(bitblock256_t arg1, bitblock256_t arg2)
2602{
2603        return hsimd256<2>::packl(simd256<64>::srli<(1)>(arg1), simd256<64>::srli<(1)>(arg2));
2604}
2605
2606//The total number of operations is 57.0
2607template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packh(bitblock256_t arg1, bitblock256_t arg2)
2608{
2609        return hsimd256<4>::packl(simd256<64>::srli<(2)>(arg1), simd256<64>::srli<(2)>(arg2));
2610}
2611
2612//The total number of operations is 32.0
2613template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::packh(bitblock256_t arg1, bitblock256_t arg2)
2614{
2615        return hsimd256<8>::packl(simd256<64>::srli<(4)>(arg1), simd256<64>::srli<(4)>(arg2));
2616}
2617
2618//The total number of operations is 5.0
2619template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::packh(bitblock256_t arg1, bitblock256_t arg2)
2620{
2621        return hsimd256<16>::packus(simd256<16>::srli<(8)>(arg1), simd256<16>::srli<(8)>(arg2));
2622}
2623
2624//The total number of operations is 5.0
2625template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::packh(bitblock256_t arg1, bitblock256_t arg2)
2626{
2627        return hsimd256<32>::packus(simd256<32>::srli<(16)>(arg1), simd256<32>::srli<(16)>(arg2));
2628}
2629
2630//The total number of operations is 64.5
2631template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::packh(bitblock256_t arg1, bitblock256_t arg2)
2632{
2633        return hsimd256<64>::packl(simd256<64>::srli<(32)>(arg1), simd256<64>::srli<(32)>(arg2));
2634}
2635
2636//The total number of operations is 108.166666667
2637template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::packh(bitblock256_t arg1, bitblock256_t arg2)
2638{
2639        return hsimd256<128>::packus(simd256<128>::srli<(64)>(arg1), simd256<128>::srli<(64)>(arg2));
2640}
2641
2642//The total number of operations is 12.5
2643template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::packh(bitblock256_t arg1, bitblock256_t arg2)
2644{
2645        return simd256<1>::ifh(simd256<256>::himask(), arg1, simd256<256>::srli<(128)>(arg2));
2646}
2647
2648//The total number of operations is 163.0
2649template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::min_hl(bitblock256_t arg1, bitblock256_t arg2)
2650{
2651        return simd256<(1)>::min(hsimd256<2>::packh(arg1, arg2), hsimd256<2>::packl(arg1, arg2));
2652}
2653
2654//The total number of operations is 130.0
2655template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::min_hl(bitblock256_t arg1, bitblock256_t arg2)
2656{
2657        return simd256<(2)>::min(hsimd256<4>::packh(arg1, arg2), hsimd256<4>::packl(arg1, arg2));
2658}
2659
2660//The total number of operations is 71.0
2661template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::min_hl(bitblock256_t arg1, bitblock256_t arg2)
2662{
2663        return simd256<(4)>::min(hsimd256<8>::packh(arg1, arg2), hsimd256<8>::packl(arg1, arg2));
2664}
2665
2666//The total number of operations is 11.0
2667template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::min_hl(bitblock256_t arg1, bitblock256_t arg2)
2668{
2669        return simd256<(8)>::min(hsimd256<16>::packh(arg1, arg2), hsimd256<16>::packl(arg1, arg2));
2670}
2671
2672//The total number of operations is 11.0
2673template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::min_hl(bitblock256_t arg1, bitblock256_t arg2)
2674{
2675        return simd256<(16)>::min(hsimd256<32>::packh(arg1, arg2), hsimd256<32>::packl(arg1, arg2));
2676}
2677
2678//The total number of operations is 128.0
2679template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::min_hl(bitblock256_t arg1, bitblock256_t arg2)
2680{
2681        return simd256<(32)>::min(hsimd256<64>::packh(arg1, arg2), hsimd256<64>::packl(arg1, arg2));
2682}
2683
2684//The total number of operations is 149.666666667
2685template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::min_hl(bitblock256_t arg1, bitblock256_t arg2)
2686{
2687        return simd256<(64)>::min(hsimd256<128>::packh(arg1, arg2), hsimd256<128>::packl(arg1, arg2));
2688}
2689
2690//The total number of operations is 57.6666666667
2691template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::min_hl(bitblock256_t arg1, bitblock256_t arg2)
2692{
2693        return simd256<(128)>::min(hsimd256<256>::packh(arg1, arg2), hsimd256<256>::packl(arg1, arg2));
2694}
2695
2696//The total number of operations is 120.0
2697template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<2>::packus(bitblock256_t arg1, bitblock256_t arg2)
2698{
2699        bitblock256_t arg11 = simd256<2>::ifh(arg1, simd256<2>::constant<0>(), arg1);
2700        bitblock256_t arg12 = simd_and(simd256<2>::lomask(), arg11);
2701        bitblock256_t arg21 = simd256<2>::ifh(arg2, simd256<2>::constant<0>(), arg2);
2702        bitblock256_t arg22 = simd_and(simd256<2>::lomask(), arg21);
2703        return hsimd256<2>::packl(simd256<1>::ifh(simd256<2>::eq(arg12, arg11), arg12, simd256<2>::lomask()), simd256<1>::ifh(simd256<2>::eq(arg22, arg21), arg22, simd256<2>::lomask()));
2704}
2705
2706//The total number of operations is 107.0
2707template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<4>::packus(bitblock256_t arg1, bitblock256_t arg2)
2708{
2709        bitblock256_t arg11 = simd256<4>::ifh(arg1, simd256<4>::constant<0>(), arg1);
2710        bitblock256_t arg12 = simd_and(simd256<4>::lomask(), arg11);
2711        bitblock256_t arg21 = simd256<4>::ifh(arg2, simd256<4>::constant<0>(), arg2);
2712        bitblock256_t arg22 = simd_and(simd256<4>::lomask(), arg21);
2713        return hsimd256<4>::packl(simd256<1>::ifh(simd256<4>::eq(arg12, arg11), arg12, simd256<4>::lomask()), simd256<1>::ifh(simd256<4>::eq(arg22, arg21), arg22, simd256<4>::lomask()));
2714}
2715
2716//The total number of operations is 42.0
2717template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<8>::packus(bitblock256_t arg1, bitblock256_t arg2)
2718{
2719        bitblock256_t arg11 = simd256<8>::ifh(arg1, simd256<8>::constant<0>(), arg1);
2720        bitblock256_t arg12 = simd_and(simd256<8>::lomask(), arg11);
2721        bitblock256_t arg21 = simd256<8>::ifh(arg2, simd256<8>::constant<0>(), arg2);
2722        bitblock256_t arg22 = simd_and(simd256<8>::lomask(), arg21);
2723        return hsimd256<8>::packl(simd256<1>::ifh(simd256<8>::eq(arg12, arg11), arg12, simd256<8>::lomask()), simd256<1>::ifh(simd256<8>::eq(arg22, arg21), arg22, simd256<8>::lomask()));
2724}
2725
2726//The total number of operations is 3.0
2727template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<16>::packus(bitblock256_t arg1, bitblock256_t arg2)
2728{
2729        bitblock256_t alpha = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(32));
2730        bitblock256_t beta = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(49));
2731        return _mm256_packus_epi16(alpha, beta);
2732}
2733
2734//The total number of operations is 3.0
2735template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<32>::packus(bitblock256_t arg1, bitblock256_t arg2)
2736{
2737        bitblock256_t alpha = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(32));
2738        bitblock256_t beta = _mm256_permute2x128_si256(arg2, arg1, (int32_t)(49));
2739        return _mm256_packus_epi32(alpha, beta);
2740}
2741
2742//The total number of operations is 80.5
2743template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<64>::packus(bitblock256_t arg1, bitblock256_t arg2)
2744{
2745        bitblock256_t arg11 = simd256<64>::ifh(arg1, simd256<64>::constant<0>(), arg1);
2746        bitblock256_t arg12 = simd_and(simd256<64>::lomask(), arg11);
2747        bitblock256_t arg21 = simd256<64>::ifh(arg2, simd256<64>::constant<0>(), arg2);
2748        bitblock256_t arg22 = simd_and(simd256<64>::lomask(), arg21);
2749        return hsimd256<64>::packl(simd256<1>::ifh(simd256<64>::eq(arg12, arg11), arg12, simd256<64>::lomask()), simd256<1>::ifh(simd256<64>::eq(arg22, arg21), arg22, simd256<64>::lomask()));
2750}
2751
2752//The total number of operations is 97.5
2753template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<128>::packus(bitblock256_t arg1, bitblock256_t arg2)
2754{
2755        bitblock256_t arg11 = simd256<128>::ifh(arg1, simd256<128>::constant<0>(), arg1);
2756        bitblock256_t arg12 = simd_and(simd256<128>::lomask(), arg11);
2757        bitblock256_t arg21 = simd256<128>::ifh(arg2, simd256<128>::constant<0>(), arg2);
2758        bitblock256_t arg22 = simd_and(simd256<128>::lomask(), arg21);
2759        return hsimd256<128>::packl(simd256<1>::ifh(simd256<128>::eq(arg12, arg11), arg12, simd256<128>::lomask()), simd256<1>::ifh(simd256<128>::eq(arg22, arg21), arg22, simd256<128>::lomask()));
2760}
2761
2762//The total number of operations is 71.0833333333
2763template <> IDISA_ALWAYS_INLINE bitblock256_t hsimd256<256>::packus(bitblock256_t arg1, bitblock256_t arg2)
2764{
2765        bitblock256_t hiPart = hsimd256<256>::packh(arg1, arg2);
2766        return simd256<(128)>::ifh(hiPart, simd256<(128)>::constant<0>(), simd_or(simd256<(128)>::gt(hiPart, simd256<(128)>::constant<0>()), hsimd256<256>::packl(arg1, arg2)));
2767}
2768
2769//The total number of operations is 31.0
2770template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::mergel(bitblock256_t arg1, bitblock256_t arg2)
2771{
2772        return esimd256<(2)>::mergel(simd256<1>::ifh(simd256<(2)>::himask(), arg1, simd256<(2)>::srli<1>(arg2)), simd256<1>::ifh(simd256<(2)>::himask(), simd256<(2)>::slli<1>(arg1), arg2));
2773}
2774
2775//The total number of operations is 21.0
2776template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::mergel(bitblock256_t arg1, bitblock256_t arg2)
2777{
2778        return esimd256<(4)>::mergel(simd256<1>::ifh(simd256<(4)>::himask(), arg1, simd256<(4)>::srli<2>(arg2)), simd256<1>::ifh(simd256<(4)>::himask(), simd256<(4)>::slli<2>(arg1), arg2));
2779}
2780
2781//The total number of operations is 11.0
2782template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::mergel(bitblock256_t arg1, bitblock256_t arg2)
2783{
2784        return esimd256<(8)>::mergel(simd256<1>::ifh(simd256<(8)>::himask(), arg1, simd256<(8)>::srli<4>(arg2)), simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::slli<4>(arg1), arg2));
2785}
2786
2787//The total number of operations is 1.0
2788template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::mergel(bitblock256_t arg1, bitblock256_t arg2)
2789{
2790        __m128i loPart2 = avx_select_lo128(arg2);
2791        __m128i loPart1 = avx_select_lo128(arg1);
2792        return avx_general_combine256(_mm_unpackhi_epi8(loPart2, loPart1), _mm_unpacklo_epi8(loPart2, loPart1));
2793}
2794
2795//The total number of operations is 1.0
2796template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::mergel(bitblock256_t arg1, bitblock256_t arg2)
2797{
2798        __m128i loPart2 = avx_select_lo128(arg2);
2799        __m128i loPart1 = avx_select_lo128(arg1);
2800        return avx_general_combine256(_mm_unpackhi_epi16(loPart2, loPart1), _mm_unpacklo_epi16(loPart2, loPart1));
2801}
2802
2803//The total number of operations is 1.0
2804template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::mergel(bitblock256_t arg1, bitblock256_t arg2)
2805{
2806        __m128i loPart2 = avx_select_lo128(arg2);
2807        __m128i loPart1 = avx_select_lo128(arg1);
2808        return avx_general_combine256(_mm_unpackhi_epi32(loPart2, loPart1), _mm_unpacklo_epi32(loPart2, loPart1));
2809}
2810
2811//The total number of operations is 1.0
2812template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::mergel(bitblock256_t arg1, bitblock256_t arg2)
2813{
2814        __m128i loPart2 = avx_select_lo128(arg2);
2815        __m128i loPart1 = avx_select_lo128(arg1);
2816        return avx_general_combine256(_mm_unpackhi_epi64(loPart2, loPart1), _mm_unpacklo_epi64(loPart2, loPart1));
2817}
2818
2819//The total number of operations is 17.6666666667
2820template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::mergel(bitblock256_t arg1, bitblock256_t arg2)
2821{
2822        return esimd256<(64)>::mergel(simd256<1>::ifh(simd256<128>::himask(), arg1, simd256<128>::srli<(64)>(arg2)), simd256<1>::ifh(simd256<128>::himask(), simd256<128>::slli<(64)>(arg1), arg2));
2823}
2824
2825//The total number of operations is 33.0
2826template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::mergeh(bitblock256_t arg1, bitblock256_t arg2)
2827{
2828        return esimd256<(2)>::mergeh(simd256<1>::ifh(simd256<(2)>::himask(), arg1, simd256<(2)>::srli<1>(arg2)), simd256<1>::ifh(simd256<(2)>::himask(), simd256<(2)>::slli<1>(arg1), arg2));
2829}
2830
2831//The total number of operations is 23.0
2832template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::mergeh(bitblock256_t arg1, bitblock256_t arg2)
2833{
2834        return esimd256<(4)>::mergeh(simd256<1>::ifh(simd256<(4)>::himask(), arg1, simd256<(4)>::srli<2>(arg2)), simd256<1>::ifh(simd256<(4)>::himask(), simd256<(4)>::slli<2>(arg1), arg2));
2835}
2836
2837//The total number of operations is 13.0
2838template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::mergeh(bitblock256_t arg1, bitblock256_t arg2)
2839{
2840        return esimd256<(8)>::mergeh(simd256<1>::ifh(simd256<(8)>::himask(), arg1, simd256<(8)>::srli<4>(arg2)), simd256<1>::ifh(simd256<(8)>::himask(), simd256<(8)>::slli<4>(arg1), arg2));
2841}
2842
2843//The total number of operations is 3.0
2844template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::mergeh(bitblock256_t arg1, bitblock256_t arg2)
2845{
2846        __m128i hiPart2 = avx_select_hi128(arg2);
2847        __m128i hiPart1 = avx_select_hi128(arg1);
2848        return avx_general_combine256(_mm_unpackhi_epi8(hiPart2, hiPart1), _mm_unpacklo_epi8(hiPart2, hiPart1));
2849}
2850
2851//The total number of operations is 3.0
2852template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::mergeh(bitblock256_t arg1, bitblock256_t arg2)
2853{
2854        __m128i hiPart2 = avx_select_hi128(arg2);
2855        __m128i hiPart1 = avx_select_hi128(arg1);
2856        return avx_general_combine256(_mm_unpackhi_epi16(hiPart2, hiPart1), _mm_unpacklo_epi16(hiPart2, hiPart1));
2857}
2858
2859//The total number of operations is 3.0
2860template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::mergeh(bitblock256_t arg1, bitblock256_t arg2)
2861{
2862        __m128i hiPart2 = avx_select_hi128(arg2);
2863        __m128i hiPart1 = avx_select_hi128(arg1);
2864        return avx_general_combine256(_mm_unpackhi_epi32(hiPart2, hiPart1), _mm_unpacklo_epi32(hiPart2, hiPart1));
2865}
2866
2867//The total number of operations is 3.0
2868template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::mergeh(bitblock256_t arg1, bitblock256_t arg2)
2869{
2870        __m128i hiPart2 = avx_select_hi128(arg2);
2871        __m128i hiPart1 = avx_select_hi128(arg1);
2872        return avx_general_combine256(_mm_unpackhi_epi64(hiPart2, hiPart1), _mm_unpacklo_epi64(hiPart2, hiPart1));
2873}
2874
2875//The total number of operations is 19.6666666667
2876template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::mergeh(bitblock256_t arg1, bitblock256_t arg2)
2877{
2878        return esimd256<(64)>::mergeh(simd256<1>::ifh(simd256<128>::himask(), arg1, simd256<128>::srli<(64)>(arg2)), simd256<1>::ifh(simd256<128>::himask(), simd256<128>::slli<(64)>(arg1), arg2));
2879}
2880
2881//The total number of operations is 26.0
2882template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::zeroextendh(bitblock256_t arg1)
2883{
2884        return esimd256<(2)>::mergeh(simd256<(2)>::srli<1>(arg1), simd_and(simd256<(2)>::lomask(), arg1));
2885}
2886
2887//The total number of operations is 16.0
2888template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::zeroextendh(bitblock256_t arg1)
2889{
2890        return esimd256<(4)>::mergeh(simd256<(4)>::srli<2>(arg1), simd_and(simd256<(4)>::lomask(), arg1));
2891}
2892
2893//The total number of operations is 6.0
2894template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::zeroextendh(bitblock256_t arg1)
2895{
2896        return esimd256<(8)>::mergeh(simd256<(8)>::srli<4>(arg1), simd_and(simd256<(8)>::lomask(), arg1));
2897}
2898
2899//The total number of operations is 5.0
2900template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::zeroextendh(bitblock256_t arg1)
2901{
2902        return esimd256<(16)>::mergeh(simd256<(16)>::srli<8>(arg1), simd_and(simd256<(16)>::lomask(), arg1));
2903}
2904
2905//The total number of operations is 5.0
2906template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::zeroextendh(bitblock256_t arg1)
2907{
2908        return esimd256<(32)>::mergeh(simd256<(32)>::srli<16>(arg1), simd_and(simd256<(32)>::lomask(), arg1));
2909}
2910
2911//The total number of operations is 5.0
2912template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::zeroextendh(bitblock256_t arg1)
2913{
2914        return esimd256<(64)>::mergeh(simd256<(64)>::srli<32>(arg1), simd_and(simd256<(64)>::lomask(), arg1));
2915}
2916
2917//The total number of operations is 26.0
2918template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::zeroextendh(bitblock256_t arg1)
2919{
2920        return esimd256<(128)>::mergeh(simd256<(128)>::srli<64>(arg1), simd_and(simd256<(128)>::lomask(), arg1));
2921}
2922
2923//The total number of operations is 9.5
2924template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::zeroextendh(bitblock256_t arg1)
2925{
2926        return simd256<(256)>::srli<128>(arg1);
2927}
2928
2929//The total number of operations is 24.0
2930template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::zeroextendl(bitblock256_t arg1)
2931{
2932        return esimd256<(2)>::mergel(simd256<(2)>::srli<1>(arg1), simd_and(simd256<(2)>::lomask(), arg1));
2933}
2934
2935//The total number of operations is 14.0
2936template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::zeroextendl(bitblock256_t arg1)
2937{
2938        return esimd256<(4)>::mergel(simd256<(4)>::srli<2>(arg1), simd_and(simd256<(4)>::lomask(), arg1));
2939}
2940
2941//The total number of operations is 4.0
2942template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::zeroextendl(bitblock256_t arg1)
2943{
2944        return esimd256<(8)>::mergel(simd256<(8)>::srli<4>(arg1), simd_and(simd256<(8)>::lomask(), arg1));
2945}
2946
2947//The total number of operations is 3.0
2948template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::zeroextendl(bitblock256_t arg1)
2949{
2950        return esimd256<(16)>::mergel(simd256<(16)>::srli<8>(arg1), simd_and(simd256<(16)>::lomask(), arg1));
2951}
2952
2953//The total number of operations is 3.0
2954template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::zeroextendl(bitblock256_t arg1)
2955{
2956        return esimd256<(32)>::mergel(simd256<(32)>::srli<16>(arg1), simd_and(simd256<(32)>::lomask(), arg1));
2957}
2958
2959//The total number of operations is 3.0
2960template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::zeroextendl(bitblock256_t arg1)
2961{
2962        return esimd256<(64)>::mergel(simd256<(64)>::srli<32>(arg1), simd_and(simd256<(64)>::lomask(), arg1));
2963}
2964
2965//The total number of operations is 24.0
2966template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::zeroextendl(bitblock256_t arg1)
2967{
2968        return esimd256<(128)>::mergel(simd256<(128)>::srli<64>(arg1), simd_and(simd256<(128)>::lomask(), arg1));
2969}
2970
2971//The total number of operations is 1.0
2972template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::zeroextendl(bitblock256_t arg1)
2973{
2974        return simd_and(simd256<(256)>::lomask(), arg1);
2975}
2976
2977//The total number of operations is 33.0
2978template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::signextendh(bitblock256_t arg1)
2979{
2980        return esimd256<(2)>::mergeh(simd256<(2)>::srai<1>(arg1), simd256<(2)>::srai<1>(simd256<(2)>::slli<1>(arg1)));
2981}
2982
2983//The total number of operations is 35.0
2984template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::signextendh(bitblock256_t arg1)
2985{
2986        return esimd256<(4)>::mergeh(simd256<(4)>::srai<2>(arg1), simd256<(4)>::srai<2>(simd256<(4)>::slli<2>(arg1)));
2987}
2988
2989//The total number of operations is 15.0
2990template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::signextendh(bitblock256_t arg1)
2991{
2992        return esimd256<(8)>::mergeh(simd256<(8)>::srai<4>(arg1), simd256<(8)>::srai<4>(simd256<(8)>::slli<4>(arg1)));
2993}
2994
2995//The total number of operations is 6.0
2996template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::signextendh(bitblock256_t arg1)
2997{
2998        return esimd256<(16)>::mergeh(simd256<(16)>::srai<8>(arg1), simd256<(16)>::srai<8>(simd256<(16)>::slli<8>(arg1)));
2999}
3000
3001//The total number of operations is 6.0
3002template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::signextendh(bitblock256_t arg1)
3003{
3004        return esimd256<(32)>::mergeh(simd256<(32)>::srai<16>(arg1), simd256<(32)>::srai<16>(simd256<(32)>::slli<16>(arg1)));
3005}
3006
3007//The total number of operations is 13.0
3008template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::signextendh(bitblock256_t arg1)
3009{
3010        return esimd256<(64)>::mergeh(simd256<(64)>::srai<32>(arg1), simd256<(64)>::srai<32>(simd256<(64)>::slli<32>(arg1)));
3011}
3012
3013//The total number of operations is 53.1666666667
3014template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::signextendh(bitblock256_t arg1)
3015{
3016        return esimd256<(128)>::mergeh(simd256<(128)>::srai<64>(arg1), simd256<(128)>::srai<64>(simd256<(128)>::slli<64>(arg1)));
3017}
3018
3019//The total number of operations is 32.625
3020template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::signextendh(bitblock256_t arg1)
3021{
3022        return simd256<(256)>::srai<128>(arg1);
3023}
3024
3025//The total number of operations is 31.0
3026template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<1>::signextendl(bitblock256_t arg1)
3027{
3028        return esimd256<(2)>::mergel(simd256<(2)>::srai<1>(arg1), simd256<(2)>::srai<1>(simd256<(2)>::slli<1>(arg1)));
3029}
3030
3031//The total number of operations is 33.0
3032template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<2>::signextendl(bitblock256_t arg1)
3033{
3034        return esimd256<(4)>::mergel(simd256<(4)>::srai<2>(arg1), simd256<(4)>::srai<2>(simd256<(4)>::slli<2>(arg1)));
3035}
3036
3037//The total number of operations is 13.0
3038template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<4>::signextendl(bitblock256_t arg1)
3039{
3040        return esimd256<(8)>::mergel(simd256<(8)>::srai<4>(arg1), simd256<(8)>::srai<4>(simd256<(8)>::slli<4>(arg1)));
3041}
3042
3043//The total number of operations is 4.0
3044template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<8>::signextendl(bitblock256_t arg1)
3045{
3046        return esimd256<(16)>::mergel(simd256<(16)>::srai<8>(arg1), simd256<(16)>::srai<8>(simd256<(16)>::slli<8>(arg1)));
3047}
3048
3049//The total number of operations is 4.0
3050template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<16>::signextendl(bitblock256_t arg1)
3051{
3052        return esimd256<(32)>::mergel(simd256<(32)>::srai<16>(arg1), simd256<(32)>::srai<16>(simd256<(32)>::slli<16>(arg1)));
3053}
3054
3055//The total number of operations is 11.0
3056template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<32>::signextendl(bitblock256_t arg1)
3057{
3058        return esimd256<(64)>::mergel(simd256<(64)>::srai<32>(arg1), simd256<(64)>::srai<32>(simd256<(64)>::slli<32>(arg1)));
3059}
3060
3061//The total number of operations is 51.1666666667
3062template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<64>::signextendl(bitblock256_t arg1)
3063{
3064        return esimd256<(128)>::mergel(simd256<(128)>::srai<64>(arg1), simd256<(128)>::srai<64>(simd256<(128)>::slli<64>(arg1)));
3065}
3066
3067//The total number of operations is 42.125
3068template <> IDISA_ALWAYS_INLINE bitblock256_t esimd256<128>::signextendl(bitblock256_t arg1)
3069{
3070        return simd256<(256)>::srai<128>(simd256<(256)>::slli<128>(arg1));
3071}
3072
3073//The total number of operations is 20.0
3074template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::dsrli(bitblock256_t arg1, bitblock256_t arg2)
3075{
3076        return simd_or(mvmd256<2>::srli<sh>(arg1), mvmd256<2>::slli<((128)-sh)>(arg2));
3077}
3078
3079//The total number of operations is 20.0
3080template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::dsrli(bitblock256_t arg1, bitblock256_t arg2)
3081{
3082        return simd_or(mvmd256<4>::srli<sh>(arg1), mvmd256<4>::slli<((64)-sh)>(arg2));
3083}
3084
3085//The total number of operations is 20.0
3086template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::dsrli(bitblock256_t arg1, bitblock256_t arg2)
3087{
3088        return simd_or(mvmd256<8>::srli<sh>(arg1), mvmd256<8>::slli<((32)-sh)>(arg2));
3089}
3090
3091//The total number of operations is 20.0
3092template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::dsrli(bitblock256_t arg1, bitblock256_t arg2)
3093{
3094        return simd_or(mvmd256<16>::srli<sh>(arg1), mvmd256<16>::slli<((16)-sh)>(arg2));
3095}
3096
3097//The total number of operations is 20.0
3098template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::dsrli(bitblock256_t arg1, bitblock256_t arg2)
3099{
3100        return simd_or(mvmd256<32>::srli<sh>(arg1), mvmd256<32>::slli<((8)-sh)>(arg2));
3101}
3102
3103//The total number of operations is 5.5
3104template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::dsrli(bitblock256_t arg1, bitblock256_t arg2)
3105{
3106        return simd_or(mvmd256<64>::srli<sh>(arg1), mvmd256<64>::slli<((4)-sh)>(arg2));
3107}
3108
3109//The total number of operations is 5.5
3110template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::dsrli(bitblock256_t arg1, bitblock256_t arg2)
3111{
3112        return simd_or(mvmd256<128>::srli<sh>(arg1), mvmd256<128>::slli<((2)-sh)>(arg2));
3113}
3114
3115//The total number of operations is 5.5
3116template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::dsrli(bitblock256_t arg1, bitblock256_t arg2)
3117{
3118        return simd_or(mvmd256<256>::srli<sh>(arg1), mvmd256<256>::slli<((1)-sh)>(arg2));
3119}
3120
3121//The total number of operations is 15.0
3122template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill16(FieldType<1>::T val1, FieldType<1>::T val2, FieldType<1>::T val3, FieldType<1>::T val4, FieldType<1>::T val5, FieldType<1>::T val6, FieldType<1>::T val7, FieldType<1>::T val8, FieldType<1>::T val9, FieldType<1>::T val10, FieldType<1>::T val11, FieldType<1>::T val12, FieldType<1>::T val13, FieldType<1>::T val14, FieldType<1>::T val15, FieldType<1>::T val16)
3123{
3124        return simd_or(mvmd256<(2)>::fill16((val1<<1), (val3<<1), (val5<<1), (val7<<1), (val9<<1), (val11<<1), (val13<<1), (val15<<1), (val1<<1), (val3<<1), (val5<<1), (val7<<1), (val9<<1), (val11<<1), (val13<<1), (val15<<1)), mvmd256<(2)>::fill16((val2&(1)), (val4&(1)), (val6&(1)), (val8&(1)), (val10&(1)), (val12&(1)), (val14&(1)), (val16&(1)), (val2&(1)), (val4&(1)), (val6&(1)), (val8&(1)), (val10&(1)), (val12&(1)), (val14&(1)), (val16&(1))));
3125}
3126
3127//The total number of operations is 7.0
3128template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill16(FieldType<2>::T val1, FieldType<2>::T val2, FieldType<2>::T val3, FieldType<2>::T val4, FieldType<2>::T val5, FieldType<2>::T val6, FieldType<2>::T val7, FieldType<2>::T val8, FieldType<2>::T val9, FieldType<2>::T val10, FieldType<2>::T val11, FieldType<2>::T val12, FieldType<2>::T val13, FieldType<2>::T val14, FieldType<2>::T val15, FieldType<2>::T val16)
3129{
3130        return simd_or(mvmd256<(4)>::fill16((val1<<2), (val3<<2), (val5<<2), (val7<<2), (val9<<2), (val11<<2), (val13<<2), (val15<<2), (val1<<2), (val3<<2), (val5<<2), (val7<<2), (val9<<2), (val11<<2), (val13<<2), (val15<<2)), mvmd256<(4)>::fill16((val2&(3)), (val4&(3)), (val6&(3)), (val8&(3)), (val10&(3)), (val12&(3)), (val14&(3)), (val16&(3)), (val2&(3)), (val4&(3)), (val6&(3)), (val8&(3)), (val10&(3)), (val12&(3)), (val14&(3)), (val16&(3))));
3131}
3132
3133//The total number of operations is 3.0
3134template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill16(FieldType<4>::T val1, FieldType<4>::T val2, FieldType<4>::T val3, FieldType<4>::T val4, FieldType<4>::T val5, FieldType<4>::T val6, FieldType<4>::T val7, FieldType<4>::T val8, FieldType<4>::T val9, FieldType<4>::T val10, FieldType<4>::T val11, FieldType<4>::T val12, FieldType<4>::T val13, FieldType<4>::T val14, FieldType<4>::T val15, FieldType<4>::T val16)
3135{
3136        return simd_or(mvmd256<(8)>::fill16((val1<<4), (val3<<4), (val5<<4), (val7<<4), (val9<<4), (val11<<4), (val13<<4), (val15<<4), (val1<<4), (val3<<4), (val5<<4), (val7<<4), (val9<<4), (val11<<4), (val13<<4), (val15<<4)), mvmd256<(8)>::fill16((val2&(15)), (val4&(15)), (val6&(15)), (val8&(15)), (val10&(15)), (val12&(15)), (val14&(15)), (val16&(15)), (val2&(15)), (val4&(15)), (val6&(15)), (val8&(15)), (val10&(15)), (val12&(15)), (val14&(15)), (val16&(15))));
3137}
3138
3139//The total number of operations is 1.0
3140template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill16(FieldType<8>::T val1, FieldType<8>::T val2, FieldType<8>::T val3, FieldType<8>::T val4, FieldType<8>::T val5, FieldType<8>::T val6, FieldType<8>::T val7, FieldType<8>::T val8, FieldType<8>::T val9, FieldType<8>::T val10, FieldType<8>::T val11, FieldType<8>::T val12, FieldType<8>::T val13, FieldType<8>::T val14, FieldType<8>::T val15, FieldType<8>::T val16)
3141{
3142        return (bitblock256_t)_mm256_set_epi8((int32_t)(val1), (int32_t)(val2), (int32_t)(val3), (int32_t)(val4), (int32_t)(val5), (int32_t)(val6), (int32_t)(val7), (int32_t)(val8), (int32_t)(val9), (int32_t)(val10), (int32_t)(val11), (int32_t)(val12), (int32_t)(val13), (int32_t)(val14), (int32_t)(val15), (int32_t)(val16), (int32_t)(val1), (int32_t)(val2), (int32_t)(val3), (int32_t)(val4), (int32_t)(val5), (int32_t)(val6), (int32_t)(val7), (int32_t)(val8), (int32_t)(val9), (int32_t)(val10), (int32_t)(val11), (int32_t)(val12), (int32_t)(val13), (int32_t)(val14), (int32_t)(val15), (int32_t)(val16));
3143}
3144
3145//The total number of operations is 5.0
3146template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill16(FieldType<16>::T val1, FieldType<16>::T val2, FieldType<16>::T val3, FieldType<16>::T val4, FieldType<16>::T val5, FieldType<16>::T val6, FieldType<16>::T val7, FieldType<16>::T val8, FieldType<16>::T val9, FieldType<16>::T val10, FieldType<16>::T val11, FieldType<16>::T val12, FieldType<16>::T val13, FieldType<16>::T val14, FieldType<16>::T val15, FieldType<16>::T val16)
3147{
3148        return simd256<1>::ifh(simd256<(256)>::himask(), mvmd256<16>::fill8(val1, val2, val3, val4, val5, val6, val7, val8), mvmd256<16>::fill8(val9, val10, val11, val12, val13, val14, val15, val16));
3149}
3150
3151//The total number of operations is 1.0
3152template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill(FieldType<1>::T val1)
3153{
3154        return mvmd256<32>::fill((-1*val1));
3155}
3156
3157//The total number of operations is 1.0
3158template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill(FieldType<2>::T val1)
3159{
3160        return mvmd256<(4)>::fill(((val1<<2)|val1));
3161}
3162
3163//The total number of operations is 1.0
3164template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill(FieldType<4>::T val1)
3165{
3166        return mvmd256<(8)>::fill(((val1<<4)|val1));
3167}
3168
3169//The total number of operations is 1.0
3170template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill(FieldType<8>::T val1)
3171{
3172        return (bitblock256_t)_mm256_set1_epi8((int32_t)(val1));
3173}
3174
3175//The total number of operations is 1.0
3176template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill(FieldType<16>::T val1)
3177{
3178        return (bitblock256_t)_mm256_set1_epi16((int32_t)(val1));
3179}
3180
3181//The total number of operations is 1.0
3182template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::fill(FieldType<32>::T val1)
3183{
3184        return (bitblock256_t)_mm256_set1_epi32((int32_t)(val1));
3185}
3186
3187//The total number of operations is 5.0
3188template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::fill(FieldType<64>::T val1)
3189{
3190        return mvmd256<(32)>::fill2((val1>>(32)), (val1&((4294967296ULL)-1)));
3191}
3192
3193//The total number of operations is 13.0
3194template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::fill(FieldType<128>::T val1)
3195{
3196        return mvmd256<(64)>::fill2(0, val1);
3197}
3198
3199//The total number of operations is 29.0
3200template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::fill(FieldType<256>::T val1)
3201{
3202        return mvmd256<(128)>::fill2(0, val1);
3203}
3204
3205//The total number of operations is 1.5
3206template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<1>::T mvmd256<1>::extract(bitblock256_t arg1)
3207{
3208        return (((pos%2) == 0) ? (mvmd256<(2)>::extract<(pos/2)>(arg1)&(1)) : (mvmd256<(2)>::extract<(pos/2)>(arg1)>>1));
3209}
3210
3211//The total number of operations is 1.5
3212template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<2>::T mvmd256<2>::extract(bitblock256_t arg1)
3213{
3214        return (((pos%2) == 0) ? (mvmd256<(4)>::extract<(pos/2)>(arg1)&(3)) : (mvmd256<(4)>::extract<(pos/2)>(arg1)>>2));
3215}
3216
3217//The total number of operations is 1.5
3218template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<4>::T mvmd256<4>::extract(bitblock256_t arg1)
3219{
3220        return (((pos%2) == 0) ? (mvmd256<(8)>::extract<(pos/2)>(arg1)&(15)) : (mvmd256<(8)>::extract<(pos/2)>(arg1)>>4));
3221}
3222
3223//The total number of operations is 1.5
3224template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<8>::T mvmd256<8>::extract(bitblock256_t arg1)
3225{
3226        return (((pos%2) == 0) ? (mvmd256<(16)>::extract<(pos/2)>(arg1)&(255)) : (mvmd256<(16)>::extract<(pos/2)>(arg1)>>8));
3227}
3228
3229//The total number of operations is 1.5
3230template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<16>::T mvmd256<16>::extract(bitblock256_t arg1)
3231{
3232        return ((pos < 8) ? (65535&_mm_extract_epi16(avx_select_lo128(arg1), (int32_t)(pos))) : (65535&_mm_extract_epi16(avx_select_hi128(arg1), (int32_t)((pos-8)))));
3233}
3234
3235//The total number of operations is 1.5
3236template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<32>::T mvmd256<32>::extract(bitblock256_t arg1)
3237{
3238        return ((pos < 4) ? (((uint64_t)(((4294967296ULL)-1)))&_mm_extract_epi32(avx_select_lo128(arg1), (int32_t)(pos))) : (((uint64_t)(((4294967296ULL)-1)))&_mm_extract_epi32(avx_select_hi128(arg1), (int32_t)((pos-4)))));
3239}
3240
3241//The total number of operations is 3.0
3242template <> template <uint16_t pos> IDISA_ALWAYS_INLINE FieldType<64>::T mvmd256<64>::extract(bitblock256_t arg1)
3243{
3244        return ((((uint64_t)(mvmd256<(32)>::extract<((2*pos)+1)>(arg1)))<<(32))|mvmd256<(32)>::extract<(2*pos)>(arg1));
3245}
3246
3247//The total number of operations is 14.5
3248template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::splat(bitblock256_t arg1)
3249{
3250        return mvmd256<(2)>::splat<(pos/2)>(simd_or((((pos%2) == 0) ? simd256<(2)>::slli<1>(arg1) : simd256<(2)>::srli<1>(arg1)), (((pos%2) == 0) ? simd_and(simd256<(2)>::lomask(), arg1) : simd_and(simd256<(2)>::himask(), arg1))));
3251}
3252
3253//The total number of operations is 10.5
3254template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::splat(bitblock256_t arg1)
3255{
3256        return mvmd256<(4)>::splat<(pos/2)>(simd_or((((pos%2) == 0) ? simd256<(4)>::slli<2>(arg1) : simd256<(4)>::srli<2>(arg1)), (((pos%2) == 0) ? simd_and(simd256<(4)>::lomask(), arg1) : simd_and(simd256<(4)>::himask(), arg1))));
3257}
3258
3259//The total number of operations is 6.5
3260template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::splat(bitblock256_t arg1)
3261{
3262        return mvmd256<(8)>::splat<(pos/2)>(simd_or((((pos%2) == 0) ? simd256<(8)>::slli<4>(arg1) : simd256<(8)>::srli<4>(arg1)), (((pos%2) == 0) ? simd_and(simd256<(8)>::lomask(), arg1) : simd_and(simd256<(8)>::himask(), arg1))));
3263}
3264
3265//The total number of operations is 2.5
3266template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::splat(bitblock256_t arg1)
3267{
3268        return ((pos < 16) ? mvmd256<8>::fill(_mm_extract_epi8(avx_select_lo128(arg1), (int32_t)(pos))) : mvmd256<8>::fill(_mm_extract_epi8(avx_select_hi128(arg1), (int32_t)((pos-16)))));
3269}
3270
3271//The total number of operations is 2.5
3272template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::splat(bitblock256_t arg1)
3273{
3274        return ((pos < 8) ? mvmd256<16>::fill(_mm_extract_epi16(avx_select_lo128(arg1), (int32_t)(pos))) : mvmd256<16>::fill(_mm_extract_epi16(avx_select_hi128(arg1), (int32_t)((pos-8)))));
3275}
3276
3277//The total number of operations is 2.5
3278template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::splat(bitblock256_t arg1)
3279{
3280        return ((pos < 4) ? mvmd256<32>::fill(_mm_extract_epi32(avx_select_lo128(arg1), (int32_t)(pos))) : mvmd256<32>::fill(_mm_extract_epi32(avx_select_hi128(arg1), (int32_t)((pos-4)))));
3281}
3282
3283//The total number of operations is 8.0
3284template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::splat(bitblock256_t arg1)
3285{
3286        return simd256<1>::ifh(simd256<64>::himask(), mvmd256<(32)>::splat<((2*pos)+1)>(arg1), mvmd256<(32)>::splat<(2*pos)>(arg1));
3287}
3288
3289//The total number of operations is 19.0
3290template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::splat(bitblock256_t arg1)
3291{
3292        return simd256<1>::ifh(simd256<128>::himask(), mvmd256<(64)>::splat<((2*pos)+1)>(arg1), mvmd256<(64)>::splat<(2*pos)>(arg1));
3293}
3294
3295//The total number of operations is 41.0
3296template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::splat(bitblock256_t arg1)
3297{
3298        return simd256<1>::ifh(simd256<256>::himask(), mvmd256<(128)>::splat<((2*pos)+1)>(arg1), mvmd256<(128)>::splat<(2*pos)>(arg1));
3299}
3300
3301//The total number of operations is 7.5
3302template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::insert(bitblock256_t arg1, FieldType<2>::T arg2)
3303{
3304        uint32_t v = (arg2&(3));
3305        uint64_t doublev = mvmd256<(4)>::extract<(pos/2)>(arg1);
3306        return mvmd256<(4)>::insert<(pos/2)>(arg1, (((pos&1) == 0) ? (((doublev>>2)<<2)|v) : ((doublev&(3))|(v<<2))));
3307}
3308
3309//The total number of operations is 6.0
3310template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::insert(bitblock256_t arg1, FieldType<4>::T arg2)
3311{
3312        uint32_t v = (arg2&(15));
3313        uint64_t doublev = mvmd256<(8)>::extract<(pos/2)>(arg1);
3314        return mvmd256<(8)>::insert<(pos/2)>(arg1, (((pos&1) == 0) ? (((doublev>>4)<<4)|v) : ((doublev&(15))|(v<<4))));
3315}
3316
3317//The total number of operations is 4.5
3318template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::insert(bitblock256_t arg1, FieldType<8>::T arg2)
3319{
3320        uint32_t v = (arg2&(255));
3321        uint64_t doublev = mvmd256<(16)>::extract<(pos/2)>(arg1);
3322        return mvmd256<(16)>::insert<(pos/2)>(arg1, (((pos&1) == 0) ? (((doublev>>8)<<8)|v) : ((doublev&(255))|(v<<8))));
3323}
3324
3325//The total number of operations is 3.0
3326template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::insert(bitblock256_t arg1, FieldType<16>::T arg2)
3327{
3328        return ((pos < 8) ? avx_general_combine256(avx_select_hi128(arg1), _mm_insert_epi16(avx_select_lo128(arg1), (int32_t)(arg2), (int32_t)(pos))) : avx_general_combine256(_mm_insert_epi16(avx_select_hi128(arg1), (int32_t)(arg2), (int32_t)((pos-8))), avx_select_lo128(arg1)));
3329}
3330
3331//The total number of operations is 6.0
3332template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::insert(bitblock256_t arg1, FieldType<32>::T arg2)
3333{
3334        return mvmd256<(16)>::insert<(2*pos)>(mvmd256<(16)>::insert<((2*pos)+1)>(arg1, (arg2>>(16))), (arg2&(65535)));
3335}
3336
3337//The total number of operations is 12.0
3338template <> template <uint16_t pos> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::insert(bitblock256_t arg1, FieldType<64>::T arg2)
3339{
3340        return mvmd256<(32)>::insert<(2*pos)>(mvmd256<(32)>::insert<((2*pos)+1)>(arg1, (arg2>>(32))), (arg2&((4294967296ULL)-1)));
3341}
3342
3343//The total number of operations is 5.0
3344template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill4(FieldType<1>::T val1, FieldType<1>::T val2, FieldType<1>::T val3, FieldType<1>::T val4)
3345{
3346        return simd256<1>::ifh(simd256<(4)>::himask(), mvmd256<1>::fill2(val1, val2), mvmd256<1>::fill2(val3, val4));
3347}
3348
3349//The total number of operations is 5.0
3350template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill4(FieldType<2>::T val1, FieldType<2>::T val2, FieldType<2>::T val3, FieldType<2>::T val4)
3351{
3352        return simd256<1>::ifh(simd256<(8)>::himask(), mvmd256<2>::fill2(val1, val2), mvmd256<2>::fill2(val3, val4));
3353}
3354
3355//The total number of operations is 5.0
3356template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill4(FieldType<4>::T val1, FieldType<4>::T val2, FieldType<4>::T val3, FieldType<4>::T val4)
3357{
3358        return simd256<1>::ifh(simd256<(16)>::himask(), mvmd256<4>::fill2(val1, val2), mvmd256<4>::fill2(val3, val4));
3359}
3360
3361//The total number of operations is 5.0
3362template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill4(FieldType<8>::T val1, FieldType<8>::T val2, FieldType<8>::T val3, FieldType<8>::T val4)
3363{
3364        return simd256<1>::ifh(simd256<(32)>::himask(), mvmd256<8>::fill2(val1, val2), mvmd256<8>::fill2(val3, val4));
3365}
3366
3367//The total number of operations is 3.0
3368template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill4(FieldType<16>::T val1, FieldType<16>::T val2, FieldType<16>::T val3, FieldType<16>::T val4)
3369{
3370        return simd_or(mvmd256<(32)>::fill4((val1<<16), (val3<<16), (val1<<16), (val3<<16)), mvmd256<(32)>::fill4((val2&(65535)), (val4&(65535)), (val2&(65535)), (val4&(65535))));
3371}
3372
3373//The total number of operations is 1.0
3374template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::fill4(FieldType<32>::T val1, FieldType<32>::T val2, FieldType<32>::T val3, FieldType<32>::T val4)
3375{
3376        return (bitblock256_t)_mm256_set_epi32((int32_t)(val1), (int32_t)(val2), (int32_t)(val3), (int32_t)(val4), (int32_t)(val1), (int32_t)(val2), (int32_t)(val3), (int32_t)(val4));
3377}
3378
3379//The total number of operations is 29.0
3380template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::fill4(FieldType<64>::T val1, FieldType<64>::T val2, FieldType<64>::T val3, FieldType<64>::T val4)
3381{
3382        return simd256<1>::ifh(simd256<(256)>::himask(), mvmd256<64>::fill2(val1, val2), mvmd256<64>::fill2(val3, val4));
3383}
3384
3385//The total number of operations is 9.5
3386template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::srli(bitblock256_t arg1)
3387{
3388        return simd256<256>::srli<(sh*2)>(arg1);
3389}
3390
3391//The total number of operations is 9.5
3392template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::srli(bitblock256_t arg1)
3393{
3394        return simd256<256>::srli<(sh*4)>(arg1);
3395}
3396
3397//The total number of operations is 9.5
3398template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::srli(bitblock256_t arg1)
3399{
3400        return simd256<256>::srli<(sh*8)>(arg1);
3401}
3402
3403//The total number of operations is 9.5
3404template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::srli(bitblock256_t arg1)
3405{
3406        return simd256<256>::srli<(sh*16)>(arg1);
3407}
3408
3409//The total number of operations is 9.5
3410template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<32>::srli(bitblock256_t arg1)
3411{
3412        return simd256<256>::srli<(sh*32)>(arg1);
3413}
3414
3415//The total number of operations is 2.25
3416template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<64>::srli(bitblock256_t arg1)
3417{
3418        return ((sh == 3) ? simd_and(_mm256_set_epi64x((int64_t)(0), (int64_t)(0), (int64_t)(0), (int64_t)(18446744073709551615ULL)), _mm256_permute4x64_epi64(arg1, (int32_t)(3))) : ((sh == 2) ? simd_and(_mm256_set_epi64x((int64_t)(0), (int64_t)(0), (int64_t)(18446744073709551615ULL), (int64_t)(18446744073709551615ULL)), _mm256_permute4x64_epi64(arg1, (int32_t)(14))) : ((sh == 1) ? simd_and(_mm256_set_epi64x((int64_t)(0), (int64_t)(18446744073709551615ULL), (int64_t)(18446744073709551615ULL), (int64_t)(18446744073709551615ULL)), _mm256_permute4x64_epi64(arg1, (int32_t)(57))) : ((sh == 0) ? arg1 : simd256<32>::constant<0>()))));
3419}
3420
3421//The total number of operations is 2.25
3422template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<128>::srli(bitblock256_t arg1)
3423{
3424        return mvmd256<(64)>::srli<(sh*2)>(arg1);
3425}
3426
3427//The total number of operations is 2.25
3428template <> template <uint16_t sh> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<256>::srli(bitblock256_t arg1)
3429{
3430        return mvmd256<(128)>::srli<(sh*2)>(arg1);
3431}
3432
3433//The total number of operations is 1.0
3434template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<1>::fill2(FieldType<1>::T val1, FieldType<1>::T val2)
3435{
3436        return mvmd256<(2)>::fill(((val1<<1)|(val2&(1))));
3437}
3438
3439//The total number of operations is 1.0
3440template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<2>::fill2(FieldType<2>::T val1, FieldType<2>::T val2)
3441{
3442        return mvmd256<(4)>::fill(((val1<<2)|(val2&(3))));
3443}
3444
3445//The total number of operations is 1.0
3446template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<4>::fill2(FieldType<4>::T val1, FieldType<4>::T val2)
3447{
3448        return mvmd256<(8)>::fill(((val1<<4)|(val2&(15))));
3449}
3450
3451//The total number of operations is 1.0
3452template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<8>::fill2(FieldType<8>::T val1, FieldType<8>::T val2)
3453{
3454        return mvmd256<(16)>::fill(((val1<<8)|(val2&(255))));
3455}
3456
3457//The total number of operations is 1.0
3458template <> IDISA_ALWAYS_INLINE bitblock256_t mvmd256<16>::fill2(FieldType<16>::T val1, FieldType<16>::T val2)
3459{
3460        return mvmd256<(32)>::fill(((val1<<16)|