source: trunk/lib/idisa_cpp/idisa_avx.cpp

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

Fix compilation issue

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