-
Notifications
You must be signed in to change notification settings - Fork 3
/
bool4.hpp
369 lines (354 loc) · 25.1 KB
/
bool4.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
#pragma once
#include "bool3.hpp"
namespace hlml {
struct bool4 {
static constexpr u32 flagsall = 0x8888;
VI128 m = { 0 };
HLML_INLINEF bool4() {}
HLML_INLINEF explicit bool4(VI128 v) : m(v) {}
HLML_INLINEF explicit bool4(b8 x, b8 y, b8 z, b8 w) : m(funcs::Ashiftl(funcs::setXYZW(x, y, z, w), 31u)) {}
HLML_INLINEF explicit bool4(const b8* p) : bool4(p[0], p[1], p[2], p[3]) {}
HLML_INLINEF explicit bool4(bool3 v, b8 w) : bool4(v.x(), v.y(), v.z(), w) {}
HLML_INLINEF void store(b8 *p) const { p[0] = x(), p[1] = y(), p[2] = z(), p[3] = w(); }
HLML_INLINEF void setX(b8 x) { m = inserti(m, x << 31u, 0); }
HLML_INLINEF void setY(b8 y) { m = inserti(m, y << 31u, 1); }
HLML_INLINEF void setZ(b8 y) { m = inserti(m, y << 31u, 2); }
HLML_INLINEF void setW(b8 y) { m = inserti(m, y << 31u, 3); }
HLML_INLINEF b8 x() const { return 0 != extracti(m, 0); }
HLML_INLINEF b8 y() const { return 0 != extracti(m, 1); }
HLML_INLINEF b8 z() const { return 0 != extracti(m, 2); }
HLML_INLINEF b8 w() const { return 0 != extracti(m, 3); }
HLML_INLINEF bool2 xx() const { return shuffleb2(*this, 0, 0); }
HLML_INLINEF bool2 xy() const { return shuffleb2(*this, 0, 1); }
HLML_INLINEF bool2 xz() const { return shuffleb2(*this, 0, 2); }
HLML_INLINEF bool2 xw() const { return shuffleb2(*this, 0, 3); }
HLML_INLINEF bool2 yx() const { return shuffleb2(*this, 1, 0); }
HLML_INLINEF bool2 yy() const { return shuffleb2(*this, 1, 1); }
HLML_INLINEF bool2 yz() const { return shuffleb2(*this, 1, 2); }
HLML_INLINEF bool2 yw() const { return shuffleb2(*this, 1, 3); }
HLML_INLINEF bool2 zx() const { return shuffleb2(*this, 2, 0); }
HLML_INLINEF bool2 zy() const { return shuffleb2(*this, 2, 1); }
HLML_INLINEF bool2 zz() const { return shuffleb2(*this, 2, 2); }
HLML_INLINEF bool2 zw() const { return shuffleb2(*this, 2, 3); }
HLML_INLINEF bool2 wx() const { return shuffleb2(*this, 3, 0); }
HLML_INLINEF bool2 wy() const { return shuffleb2(*this, 3, 1); }
HLML_INLINEF bool2 wz() const { return shuffleb2(*this, 3, 2); }
HLML_INLINEF bool2 ww() const { return shuffleb2(*this, 3, 3); }
HLML_INLINEF bool3 xxx() const { return shuffleb3(*this, 0, 0, 0); }
HLML_INLINEF bool3 xxy() const { return shuffleb3(*this, 0, 0, 1); }
HLML_INLINEF bool3 xxz() const { return shuffleb3(*this, 0, 0, 2); }
HLML_INLINEF bool3 xxw() const { return shuffleb3(*this, 0, 0, 3); }
HLML_INLINEF bool3 xyx() const { return shuffleb3(*this, 0, 1, 0); }
HLML_INLINEF bool3 xyy() const { return shuffleb3(*this, 0, 1, 1); }
HLML_INLINEF bool3 xyz() const { return shuffleb3(*this, 0, 1, 2); }
HLML_INLINEF bool3 xyw() const { return shuffleb3(*this, 0, 1, 3); }
HLML_INLINEF bool3 xzx() const { return shuffleb3(*this, 0, 2, 0); }
HLML_INLINEF bool3 xzy() const { return shuffleb3(*this, 0, 2, 1); }
HLML_INLINEF bool3 xzz() const { return shuffleb3(*this, 0, 2, 2); }
HLML_INLINEF bool3 xzw() const { return shuffleb3(*this, 0, 2, 3); }
HLML_INLINEF bool3 xwx() const { return shuffleb3(*this, 0, 3, 0); }
HLML_INLINEF bool3 xwy() const { return shuffleb3(*this, 0, 3, 1); }
HLML_INLINEF bool3 xwz() const { return shuffleb3(*this, 0, 3, 2); }
HLML_INLINEF bool3 xww() const { return shuffleb3(*this, 0, 3, 3); }
HLML_INLINEF bool3 yxx() const { return shuffleb3(*this, 1, 0, 0); }
HLML_INLINEF bool3 yxy() const { return shuffleb3(*this, 1, 0, 1); }
HLML_INLINEF bool3 yxz() const { return shuffleb3(*this, 1, 0, 2); }
HLML_INLINEF bool3 yxw() const { return shuffleb3(*this, 1, 0, 3); }
HLML_INLINEF bool3 yyx() const { return shuffleb3(*this, 1, 1, 0); }
HLML_INLINEF bool3 yyy() const { return shuffleb3(*this, 1, 1, 1); }
HLML_INLINEF bool3 yyz() const { return shuffleb3(*this, 1, 1, 2); }
HLML_INLINEF bool3 yyw() const { return shuffleb3(*this, 1, 1, 3); }
HLML_INLINEF bool3 yzx() const { return shuffleb3(*this, 1, 2, 0); }
HLML_INLINEF bool3 yzy() const { return shuffleb3(*this, 1, 2, 1); }
HLML_INLINEF bool3 yzz() const { return shuffleb3(*this, 1, 2, 2); }
HLML_INLINEF bool3 yzw() const { return shuffleb3(*this, 1, 2, 3); }
HLML_INLINEF bool3 ywx() const { return shuffleb3(*this, 1, 3, 0); }
HLML_INLINEF bool3 ywy() const { return shuffleb3(*this, 1, 3, 1); }
HLML_INLINEF bool3 ywz() const { return shuffleb3(*this, 1, 3, 2); }
HLML_INLINEF bool3 yww() const { return shuffleb3(*this, 1, 3, 3); }
HLML_INLINEF bool3 zxx() const { return shuffleb3(*this, 2, 0, 0); }
HLML_INLINEF bool3 zxy() const { return shuffleb3(*this, 2, 0, 1); }
HLML_INLINEF bool3 zxz() const { return shuffleb3(*this, 2, 0, 2); }
HLML_INLINEF bool3 zxw() const { return shuffleb3(*this, 2, 0, 3); }
HLML_INLINEF bool3 zyx() const { return shuffleb3(*this, 2, 1, 0); }
HLML_INLINEF bool3 zyy() const { return shuffleb3(*this, 2, 1, 1); }
HLML_INLINEF bool3 zyz() const { return shuffleb3(*this, 2, 1, 2); }
HLML_INLINEF bool3 zyw() const { return shuffleb3(*this, 2, 1, 3); }
HLML_INLINEF bool3 zzx() const { return shuffleb3(*this, 2, 2, 0); }
HLML_INLINEF bool3 zzy() const { return shuffleb3(*this, 2, 2, 1); }
HLML_INLINEF bool3 zzz() const { return shuffleb3(*this, 2, 2, 2); }
HLML_INLINEF bool3 zzw() const { return shuffleb3(*this, 2, 2, 3); }
HLML_INLINEF bool3 zwx() const { return shuffleb3(*this, 2, 3, 0); }
HLML_INLINEF bool3 zwy() const { return shuffleb3(*this, 2, 3, 1); }
HLML_INLINEF bool3 zwz() const { return shuffleb3(*this, 2, 3, 2); }
HLML_INLINEF bool3 zww() const { return shuffleb3(*this, 2, 3, 3); }
HLML_INLINEF bool4 xxxx() const { return shuffleb4(*this, 0, 0, 0, 0); }
HLML_INLINEF bool4 xxxy() const { return shuffleb4(*this, 0, 0, 0, 1); }
HLML_INLINEF bool4 xxxz() const { return shuffleb4(*this, 0, 0, 0, 2); }
HLML_INLINEF bool4 xxxw() const { return shuffleb4(*this, 0, 0, 0, 3); }
HLML_INLINEF bool4 xxyx() const { return shuffleb4(*this, 0, 0, 1, 0); }
HLML_INLINEF bool4 xxyy() const { return shuffleb4(*this, 0, 0, 1, 1); }
HLML_INLINEF bool4 xxyz() const { return shuffleb4(*this, 0, 0, 1, 2); }
HLML_INLINEF bool4 xxyw() const { return shuffleb4(*this, 0, 0, 1, 3); }
HLML_INLINEF bool4 xxzx() const { return shuffleb4(*this, 0, 0, 2, 0); }
HLML_INLINEF bool4 xxzy() const { return shuffleb4(*this, 0, 0, 2, 1); }
HLML_INLINEF bool4 xxzz() const { return shuffleb4(*this, 0, 0, 2, 2); }
HLML_INLINEF bool4 xxzw() const { return shuffleb4(*this, 0, 0, 2, 3); }
HLML_INLINEF bool4 xxwx() const { return shuffleb4(*this, 0, 0, 3, 0); }
HLML_INLINEF bool4 xxwy() const { return shuffleb4(*this, 0, 0, 3, 1); }
HLML_INLINEF bool4 xxwz() const { return shuffleb4(*this, 0, 0, 3, 2); }
HLML_INLINEF bool4 xxww() const { return shuffleb4(*this, 0, 0, 3, 3); }
HLML_INLINEF bool4 xyxx() const { return shuffleb4(*this, 0, 1, 0, 0); }
HLML_INLINEF bool4 xyxy() const { return shuffleb4(*this, 0, 1, 0, 1); }
HLML_INLINEF bool4 xyxz() const { return shuffleb4(*this, 0, 1, 0, 2); }
HLML_INLINEF bool4 xyxw() const { return shuffleb4(*this, 0, 1, 0, 3); }
HLML_INLINEF bool4 xyyx() const { return shuffleb4(*this, 0, 1, 1, 0); }
HLML_INLINEF bool4 xyyy() const { return shuffleb4(*this, 0, 1, 1, 1); }
HLML_INLINEF bool4 xyyz() const { return shuffleb4(*this, 0, 1, 1, 2); }
HLML_INLINEF bool4 xyyw() const { return shuffleb4(*this, 0, 1, 1, 3); }
HLML_INLINEF bool4 xyzx() const { return shuffleb4(*this, 0, 1, 2, 0); }
HLML_INLINEF bool4 xyzy() const { return shuffleb4(*this, 0, 1, 2, 1); }
HLML_INLINEF bool4 xyzz() const { return shuffleb4(*this, 0, 1, 2, 2); }
HLML_INLINEF bool4 xyzw() const { return *this; }
HLML_INLINEF bool4 xywx() const { return shuffleb4(*this, 0, 1, 3, 0); }
HLML_INLINEF bool4 xywy() const { return shuffleb4(*this, 0, 1, 3, 1); }
HLML_INLINEF bool4 xywz() const { return shuffleb4(*this, 0, 1, 3, 2); }
HLML_INLINEF bool4 xyww() const { return shuffleb4(*this, 0, 1, 3, 3); }
HLML_INLINEF bool4 xzxx() const { return shuffleb4(*this, 0, 2, 0, 0); }
HLML_INLINEF bool4 xzxy() const { return shuffleb4(*this, 0, 2, 0, 1); }
HLML_INLINEF bool4 xzxz() const { return shuffleb4(*this, 0, 2, 0, 2); }
HLML_INLINEF bool4 xzxw() const { return shuffleb4(*this, 0, 2, 0, 3); }
HLML_INLINEF bool4 xzyx() const { return shuffleb4(*this, 0, 2, 1, 0); }
HLML_INLINEF bool4 xzyy() const { return shuffleb4(*this, 0, 2, 1, 1); }
HLML_INLINEF bool4 xzyz() const { return shuffleb4(*this, 0, 2, 1, 2); }
HLML_INLINEF bool4 xzyw() const { return shuffleb4(*this, 0, 2, 1, 3); }
HLML_INLINEF bool4 xzzx() const { return shuffleb4(*this, 0, 2, 2, 0); }
HLML_INLINEF bool4 xzzy() const { return shuffleb4(*this, 0, 2, 2, 1); }
HLML_INLINEF bool4 xzzz() const { return shuffleb4(*this, 0, 2, 2, 2); }
HLML_INLINEF bool4 xzzw() const { return shuffleb4(*this, 0, 2, 2, 3); }
HLML_INLINEF bool4 xzwx() const { return shuffleb4(*this, 0, 2, 3, 0); }
HLML_INLINEF bool4 xzwy() const { return shuffleb4(*this, 0, 2, 3, 1); }
HLML_INLINEF bool4 xzwz() const { return shuffleb4(*this, 0, 2, 3, 2); }
HLML_INLINEF bool4 xzww() const { return shuffleb4(*this, 0, 2, 3, 3); }
HLML_INLINEF bool4 xwxx() const { return shuffleb4(*this, 0, 3, 0, 0); }
HLML_INLINEF bool4 xwxy() const { return shuffleb4(*this, 0, 3, 0, 1); }
HLML_INLINEF bool4 xwxz() const { return shuffleb4(*this, 0, 3, 0, 2); }
HLML_INLINEF bool4 xwxw() const { return shuffleb4(*this, 0, 3, 0, 3); }
HLML_INLINEF bool4 xwyx() const { return shuffleb4(*this, 0, 3, 1, 0); }
HLML_INLINEF bool4 xwyy() const { return shuffleb4(*this, 0, 3, 1, 1); }
HLML_INLINEF bool4 xwyz() const { return shuffleb4(*this, 0, 3, 1, 2); }
HLML_INLINEF bool4 xwyw() const { return shuffleb4(*this, 0, 3, 1, 3); }
HLML_INLINEF bool4 xwzx() const { return shuffleb4(*this, 0, 3, 2, 0); }
HLML_INLINEF bool4 xwzy() const { return shuffleb4(*this, 0, 3, 2, 1); }
HLML_INLINEF bool4 xwzz() const { return shuffleb4(*this, 0, 3, 2, 2); }
HLML_INLINEF bool4 xwzw() const { return shuffleb4(*this, 0, 3, 2, 3); }
HLML_INLINEF bool4 xwwx() const { return shuffleb4(*this, 0, 3, 3, 0); }
HLML_INLINEF bool4 xwwy() const { return shuffleb4(*this, 0, 3, 3, 1); }
HLML_INLINEF bool4 xwwz() const { return shuffleb4(*this, 0, 3, 3, 2); }
HLML_INLINEF bool4 xwww() const { return shuffleb4(*this, 0, 3, 3, 3); }
HLML_INLINEF bool4 yxxx() const { return shuffleb4(*this, 1, 0, 0, 0); }
HLML_INLINEF bool4 yxxy() const { return shuffleb4(*this, 1, 0, 0, 1); }
HLML_INLINEF bool4 yxxz() const { return shuffleb4(*this, 1, 0, 0, 2); }
HLML_INLINEF bool4 yxxw() const { return shuffleb4(*this, 1, 0, 0, 3); }
HLML_INLINEF bool4 yxyx() const { return shuffleb4(*this, 1, 0, 1, 0); }
HLML_INLINEF bool4 yxyy() const { return shuffleb4(*this, 1, 0, 1, 1); }
HLML_INLINEF bool4 yxyz() const { return shuffleb4(*this, 1, 0, 1, 2); }
HLML_INLINEF bool4 yxyw() const { return shuffleb4(*this, 1, 0, 1, 3); }
HLML_INLINEF bool4 yxzx() const { return shuffleb4(*this, 1, 0, 2, 0); }
HLML_INLINEF bool4 yxzy() const { return shuffleb4(*this, 1, 0, 2, 1); }
HLML_INLINEF bool4 yxzz() const { return shuffleb4(*this, 1, 0, 2, 2); }
HLML_INLINEF bool4 yxzw() const { return shuffleb4(*this, 1, 0, 2, 3); }
HLML_INLINEF bool4 yxwx() const { return shuffleb4(*this, 1, 0, 3, 0); }
HLML_INLINEF bool4 yxwy() const { return shuffleb4(*this, 1, 0, 3, 1); }
HLML_INLINEF bool4 yxwz() const { return shuffleb4(*this, 1, 0, 3, 2); }
HLML_INLINEF bool4 yxww() const { return shuffleb4(*this, 1, 0, 3, 3); }
HLML_INLINEF bool4 yyxx() const { return shuffleb4(*this, 1, 1, 0, 0); }
HLML_INLINEF bool4 yyxy() const { return shuffleb4(*this, 1, 1, 0, 1); }
HLML_INLINEF bool4 yyxz() const { return shuffleb4(*this, 1, 1, 0, 2); }
HLML_INLINEF bool4 yyxw() const { return shuffleb4(*this, 1, 1, 0, 3); }
HLML_INLINEF bool4 yyyx() const { return shuffleb4(*this, 1, 1, 1, 0); }
HLML_INLINEF bool4 yyyy() const { return shuffleb4(*this, 1, 1, 1, 1); }
HLML_INLINEF bool4 yyyz() const { return shuffleb4(*this, 1, 1, 1, 2); }
HLML_INLINEF bool4 yyyw() const { return shuffleb4(*this, 1, 1, 1, 3); }
HLML_INLINEF bool4 yyzx() const { return shuffleb4(*this, 1, 1, 2, 0); }
HLML_INLINEF bool4 yyzy() const { return shuffleb4(*this, 1, 1, 2, 1); }
HLML_INLINEF bool4 yyzz() const { return shuffleb4(*this, 1, 1, 2, 2); }
HLML_INLINEF bool4 yyzw() const { return shuffleb4(*this, 1, 1, 2, 3); }
HLML_INLINEF bool4 yywx() const { return shuffleb4(*this, 1, 1, 3, 0); }
HLML_INLINEF bool4 yywy() const { return shuffleb4(*this, 1, 1, 3, 1); }
HLML_INLINEF bool4 yywz() const { return shuffleb4(*this, 1, 1, 3, 2); }
HLML_INLINEF bool4 yyww() const { return shuffleb4(*this, 1, 1, 3, 3); }
HLML_INLINEF bool4 yzxx() const { return shuffleb4(*this, 1, 2, 0, 0); }
HLML_INLINEF bool4 yzxy() const { return shuffleb4(*this, 1, 2, 0, 1); }
HLML_INLINEF bool4 yzxz() const { return shuffleb4(*this, 1, 2, 0, 2); }
HLML_INLINEF bool4 yzxw() const { return shuffleb4(*this, 1, 2, 0, 3); }
HLML_INLINEF bool4 yzyx() const { return shuffleb4(*this, 1, 2, 1, 0); }
HLML_INLINEF bool4 yzyy() const { return shuffleb4(*this, 1, 2, 1, 1); }
HLML_INLINEF bool4 yzyz() const { return shuffleb4(*this, 1, 2, 1, 2); }
HLML_INLINEF bool4 yzyw() const { return shuffleb4(*this, 1, 2, 1, 3); }
HLML_INLINEF bool4 yzzx() const { return shuffleb4(*this, 1, 2, 2, 0); }
HLML_INLINEF bool4 yzzy() const { return shuffleb4(*this, 1, 2, 2, 1); }
HLML_INLINEF bool4 yzzz() const { return shuffleb4(*this, 1, 2, 2, 2); }
HLML_INLINEF bool4 yzzw() const { return shuffleb4(*this, 1, 2, 2, 3); }
HLML_INLINEF bool4 yzwx() const { return shuffleb4(*this, 1, 2, 3, 0); }
HLML_INLINEF bool4 yzwy() const { return shuffleb4(*this, 1, 2, 3, 1); }
HLML_INLINEF bool4 yzwz() const { return shuffleb4(*this, 1, 2, 3, 2); }
HLML_INLINEF bool4 yzww() const { return shuffleb4(*this, 1, 2, 3, 3); }
HLML_INLINEF bool4 ywxx() const { return shuffleb4(*this, 1, 3, 0, 0); }
HLML_INLINEF bool4 ywxy() const { return shuffleb4(*this, 1, 3, 0, 1); }
HLML_INLINEF bool4 ywxz() const { return shuffleb4(*this, 1, 3, 0, 2); }
HLML_INLINEF bool4 ywxw() const { return shuffleb4(*this, 1, 3, 0, 3); }
HLML_INLINEF bool4 ywyx() const { return shuffleb4(*this, 1, 3, 1, 0); }
HLML_INLINEF bool4 ywyy() const { return shuffleb4(*this, 1, 3, 1, 1); }
HLML_INLINEF bool4 ywyz() const { return shuffleb4(*this, 1, 3, 1, 2); }
HLML_INLINEF bool4 ywyw() const { return shuffleb4(*this, 1, 3, 1, 3); }
HLML_INLINEF bool4 ywzx() const { return shuffleb4(*this, 1, 3, 2, 0); }
HLML_INLINEF bool4 ywzy() const { return shuffleb4(*this, 1, 3, 2, 1); }
HLML_INLINEF bool4 ywzz() const { return shuffleb4(*this, 1, 3, 2, 2); }
HLML_INLINEF bool4 ywzw() const { return shuffleb4(*this, 1, 3, 2, 3); }
HLML_INLINEF bool4 ywwx() const { return shuffleb4(*this, 1, 3, 3, 0); }
HLML_INLINEF bool4 ywwy() const { return shuffleb4(*this, 1, 3, 3, 1); }
HLML_INLINEF bool4 ywwz() const { return shuffleb4(*this, 1, 3, 3, 2); }
HLML_INLINEF bool4 ywww() const { return shuffleb4(*this, 1, 3, 3, 3); }
HLML_INLINEF bool4 zxxx() const { return shuffleb4(*this, 2, 0, 0, 0); }
HLML_INLINEF bool4 zxxy() const { return shuffleb4(*this, 2, 0, 0, 1); }
HLML_INLINEF bool4 zxxz() const { return shuffleb4(*this, 2, 0, 0, 2); }
HLML_INLINEF bool4 zxxw() const { return shuffleb4(*this, 2, 0, 0, 3); }
HLML_INLINEF bool4 zxyx() const { return shuffleb4(*this, 2, 0, 1, 0); }
HLML_INLINEF bool4 zxyy() const { return shuffleb4(*this, 2, 0, 1, 1); }
HLML_INLINEF bool4 zxyz() const { return shuffleb4(*this, 2, 0, 1, 2); }
HLML_INLINEF bool4 zxyw() const { return shuffleb4(*this, 2, 0, 1, 3); }
HLML_INLINEF bool4 zxzx() const { return shuffleb4(*this, 2, 0, 2, 0); }
HLML_INLINEF bool4 zxzy() const { return shuffleb4(*this, 2, 0, 2, 1); }
HLML_INLINEF bool4 zxzz() const { return shuffleb4(*this, 2, 0, 2, 2); }
HLML_INLINEF bool4 zxzw() const { return shuffleb4(*this, 2, 0, 2, 3); }
HLML_INLINEF bool4 zxwx() const { return shuffleb4(*this, 2, 0, 3, 0); }
HLML_INLINEF bool4 zxwy() const { return shuffleb4(*this, 2, 0, 3, 1); }
HLML_INLINEF bool4 zxwz() const { return shuffleb4(*this, 2, 0, 3, 2); }
HLML_INLINEF bool4 zxww() const { return shuffleb4(*this, 2, 0, 3, 3); }
HLML_INLINEF bool4 zyxx() const { return shuffleb4(*this, 2, 1, 0, 0); }
HLML_INLINEF bool4 zyxy() const { return shuffleb4(*this, 2, 1, 0, 1); }
HLML_INLINEF bool4 zyxz() const { return shuffleb4(*this, 2, 1, 0, 2); }
HLML_INLINEF bool4 zyxw() const { return shuffleb4(*this, 2, 1, 0, 3); }
HLML_INLINEF bool4 zyyx() const { return shuffleb4(*this, 2, 1, 1, 0); }
HLML_INLINEF bool4 zyyy() const { return shuffleb4(*this, 2, 1, 1, 1); }
HLML_INLINEF bool4 zyyz() const { return shuffleb4(*this, 2, 1, 1, 2); }
HLML_INLINEF bool4 zyyw() const { return shuffleb4(*this, 2, 1, 1, 3); }
HLML_INLINEF bool4 zyzx() const { return shuffleb4(*this, 2, 1, 2, 0); }
HLML_INLINEF bool4 zyzy() const { return shuffleb4(*this, 2, 1, 2, 1); }
HLML_INLINEF bool4 zyzz() const { return shuffleb4(*this, 2, 1, 2, 2); }
HLML_INLINEF bool4 zyzw() const { return shuffleb4(*this, 2, 1, 2, 3); }
HLML_INLINEF bool4 zywx() const { return shuffleb4(*this, 2, 1, 3, 0); }
HLML_INLINEF bool4 zywy() const { return shuffleb4(*this, 2, 1, 3, 1); }
HLML_INLINEF bool4 zywz() const { return shuffleb4(*this, 2, 1, 3, 2); }
HLML_INLINEF bool4 zyww() const { return shuffleb4(*this, 2, 1, 3, 3); }
HLML_INLINEF bool4 zzxx() const { return shuffleb4(*this, 2, 2, 0, 0); }
HLML_INLINEF bool4 zzxy() const { return shuffleb4(*this, 2, 2, 0, 1); }
HLML_INLINEF bool4 zzxz() const { return shuffleb4(*this, 2, 2, 0, 2); }
HLML_INLINEF bool4 zzxw() const { return shuffleb4(*this, 2, 2, 0, 3); }
HLML_INLINEF bool4 zzyx() const { return shuffleb4(*this, 2, 2, 1, 0); }
HLML_INLINEF bool4 zzyy() const { return shuffleb4(*this, 2, 2, 1, 1); }
HLML_INLINEF bool4 zzyz() const { return shuffleb4(*this, 2, 2, 1, 2); }
HLML_INLINEF bool4 zzyw() const { return shuffleb4(*this, 2, 2, 1, 3); }
HLML_INLINEF bool4 zzzx() const { return shuffleb4(*this, 2, 2, 2, 0); }
HLML_INLINEF bool4 zzzy() const { return shuffleb4(*this, 2, 2, 2, 1); }
HLML_INLINEF bool4 zzzz() const { return shuffleb4(*this, 2, 2, 2, 2); }
HLML_INLINEF bool4 zzzw() const { return shuffleb4(*this, 2, 2, 2, 3); }
HLML_INLINEF bool4 zzwx() const { return shuffleb4(*this, 2, 2, 3, 0); }
HLML_INLINEF bool4 zzwy() const { return shuffleb4(*this, 2, 2, 3, 1); }
HLML_INLINEF bool4 zzwz() const { return shuffleb4(*this, 2, 2, 3, 2); }
HLML_INLINEF bool4 zzww() const { return shuffleb4(*this, 2, 2, 3, 3); }
HLML_INLINEF bool4 zwxx() const { return shuffleb4(*this, 2, 3, 0, 0); }
HLML_INLINEF bool4 zwxy() const { return shuffleb4(*this, 2, 3, 0, 1); }
HLML_INLINEF bool4 zwxz() const { return shuffleb4(*this, 2, 3, 0, 2); }
HLML_INLINEF bool4 zwxw() const { return shuffleb4(*this, 2, 3, 0, 3); }
HLML_INLINEF bool4 zwyx() const { return shuffleb4(*this, 2, 3, 1, 0); }
HLML_INLINEF bool4 zwyy() const { return shuffleb4(*this, 2, 3, 1, 1); }
HLML_INLINEF bool4 zwyz() const { return shuffleb4(*this, 2, 3, 1, 2); }
HLML_INLINEF bool4 zwyw() const { return shuffleb4(*this, 2, 3, 1, 3); }
HLML_INLINEF bool4 zwzx() const { return shuffleb4(*this, 2, 3, 2, 0); }
HLML_INLINEF bool4 zwzy() const { return shuffleb4(*this, 2, 3, 2, 1); }
HLML_INLINEF bool4 zwzz() const { return shuffleb4(*this, 2, 3, 2, 2); }
HLML_INLINEF bool4 zwzw() const { return shuffleb4(*this, 2, 3, 2, 3); }
HLML_INLINEF bool4 zwwx() const { return shuffleb4(*this, 2, 3, 3, 0); }
HLML_INLINEF bool4 zwwy() const { return shuffleb4(*this, 2, 3, 3, 1); }
HLML_INLINEF bool4 zwwz() const { return shuffleb4(*this, 2, 3, 3, 2); }
HLML_INLINEF bool4 zwww() const { return shuffleb4(*this, 2, 3, 3, 3); }
HLML_INLINEF bool4 wxxx() const { return shuffleb4(*this, 3, 0, 0, 0); }
HLML_INLINEF bool4 wxxy() const { return shuffleb4(*this, 3, 0, 0, 1); }
HLML_INLINEF bool4 wxxz() const { return shuffleb4(*this, 3, 0, 0, 2); }
HLML_INLINEF bool4 wxxw() const { return shuffleb4(*this, 3, 0, 0, 3); }
HLML_INLINEF bool4 wxyx() const { return shuffleb4(*this, 3, 0, 1, 0); }
HLML_INLINEF bool4 wxyy() const { return shuffleb4(*this, 3, 0, 1, 1); }
HLML_INLINEF bool4 wxyz() const { return shuffleb4(*this, 3, 0, 1, 2); }
HLML_INLINEF bool4 wxyw() const { return shuffleb4(*this, 3, 0, 1, 3); }
HLML_INLINEF bool4 wxzx() const { return shuffleb4(*this, 3, 0, 2, 0); }
HLML_INLINEF bool4 wxzy() const { return shuffleb4(*this, 3, 0, 2, 1); }
HLML_INLINEF bool4 wxzz() const { return shuffleb4(*this, 3, 0, 2, 2); }
HLML_INLINEF bool4 wxzw() const { return shuffleb4(*this, 3, 0, 2, 3); }
HLML_INLINEF bool4 wxwx() const { return shuffleb4(*this, 3, 0, 3, 0); }
HLML_INLINEF bool4 wxwy() const { return shuffleb4(*this, 3, 0, 3, 1); }
HLML_INLINEF bool4 wxwz() const { return shuffleb4(*this, 3, 0, 3, 2); }
HLML_INLINEF bool4 wxww() const { return shuffleb4(*this, 3, 0, 3, 3); }
HLML_INLINEF bool4 wyxx() const { return shuffleb4(*this, 3, 1, 0, 0); }
HLML_INLINEF bool4 wyxy() const { return shuffleb4(*this, 3, 1, 0, 1); }
HLML_INLINEF bool4 wyxz() const { return shuffleb4(*this, 3, 1, 0, 2); }
HLML_INLINEF bool4 wyxw() const { return shuffleb4(*this, 3, 1, 0, 3); }
HLML_INLINEF bool4 wyyx() const { return shuffleb4(*this, 3, 1, 1, 0); }
HLML_INLINEF bool4 wyyy() const { return shuffleb4(*this, 3, 1, 1, 1); }
HLML_INLINEF bool4 wyyz() const { return shuffleb4(*this, 3, 1, 1, 2); }
HLML_INLINEF bool4 wyyw() const { return shuffleb4(*this, 3, 1, 1, 3); }
HLML_INLINEF bool4 wyzx() const { return shuffleb4(*this, 3, 1, 2, 0); }
HLML_INLINEF bool4 wyzy() const { return shuffleb4(*this, 3, 1, 2, 1); }
HLML_INLINEF bool4 wyzz() const { return shuffleb4(*this, 3, 1, 2, 2); }
HLML_INLINEF bool4 wyzw() const { return shuffleb4(*this, 3, 1, 2, 3); }
HLML_INLINEF bool4 wywx() const { return shuffleb4(*this, 3, 1, 3, 0); }
HLML_INLINEF bool4 wywy() const { return shuffleb4(*this, 3, 1, 3, 1); }
HLML_INLINEF bool4 wywz() const { return shuffleb4(*this, 3, 1, 3, 2); }
HLML_INLINEF bool4 wyww() const { return shuffleb4(*this, 3, 1, 3, 3); }
HLML_INLINEF bool4 wzxx() const { return shuffleb4(*this, 3, 2, 0, 0); }
HLML_INLINEF bool4 wzxy() const { return shuffleb4(*this, 3, 2, 0, 1); }
HLML_INLINEF bool4 wzxz() const { return shuffleb4(*this, 3, 2, 0, 2); }
HLML_INLINEF bool4 wzxw() const { return shuffleb4(*this, 3, 2, 0, 3); }
HLML_INLINEF bool4 wzyx() const { return shuffleb4(*this, 3, 2, 1, 0); }
HLML_INLINEF bool4 wzyy() const { return shuffleb4(*this, 3, 2, 1, 1); }
HLML_INLINEF bool4 wzyz() const { return shuffleb4(*this, 3, 2, 1, 2); }
HLML_INLINEF bool4 wzyw() const { return shuffleb4(*this, 3, 2, 1, 3); }
HLML_INLINEF bool4 wzzx() const { return shuffleb4(*this, 3, 2, 2, 0); }
HLML_INLINEF bool4 wzzy() const { return shuffleb4(*this, 3, 2, 2, 1); }
HLML_INLINEF bool4 wzzz() const { return shuffleb4(*this, 3, 2, 2, 2); }
HLML_INLINEF bool4 wzzw() const { return shuffleb4(*this, 3, 2, 2, 3); }
HLML_INLINEF bool4 wzwx() const { return shuffleb4(*this, 3, 2, 3, 0); }
HLML_INLINEF bool4 wzwy() const { return shuffleb4(*this, 3, 2, 3, 1); }
HLML_INLINEF bool4 wzwz() const { return shuffleb4(*this, 3, 2, 3, 2); }
HLML_INLINEF bool4 wzww() const { return shuffleb4(*this, 3, 2, 3, 3); }
HLML_INLINEF bool4 wwxx() const { return shuffleb4(*this, 3, 3, 0, 0); }
HLML_INLINEF bool4 wwxy() const { return shuffleb4(*this, 3, 3, 0, 1); }
HLML_INLINEF bool4 wwxz() const { return shuffleb4(*this, 3, 3, 0, 2); }
HLML_INLINEF bool4 wwxw() const { return shuffleb4(*this, 3, 3, 0, 3); }
HLML_INLINEF bool4 wwyx() const { return shuffleb4(*this, 3, 3, 1, 0); }
HLML_INLINEF bool4 wwyy() const { return shuffleb4(*this, 3, 3, 1, 1); }
HLML_INLINEF bool4 wwyz() const { return shuffleb4(*this, 3, 3, 1, 2); }
HLML_INLINEF bool4 wwyw() const { return shuffleb4(*this, 3, 3, 1, 3); }
HLML_INLINEF bool4 wwzx() const { return shuffleb4(*this, 3, 3, 2, 0); }
HLML_INLINEF bool4 wwzy() const { return shuffleb4(*this, 3, 3, 2, 1); }
HLML_INLINEF bool4 wwzz() const { return shuffleb4(*this, 3, 3, 2, 2); }
HLML_INLINEF bool4 wwzw() const { return shuffleb4(*this, 3, 3, 2, 3); }
HLML_INLINEF bool4 wwwx() const { return shuffleb4(*this, 3, 3, 3, 0); }
HLML_INLINEF bool4 wwwy() const { return shuffleb4(*this, 3, 3, 3, 1); }
HLML_INLINEF bool4 wwwz() const { return shuffleb4(*this, 3, 3, 3, 2); }
HLML_INLINEF bool4 wwww() const { return shuffleb4(*this, 3, 3, 3, 3); }
};
HLML_INLINEF bool4 operator! (bool4 a) { a.m = funcs::notAandB(a.m, consts::vsignbits_xyzw); return a; }
HLML_INLINEF bool4 operator~ (bool4 a) { return !a; }
HLML_INLINEF bool4 operator& (bool4 a, bool4 b) { a.m = funcs::AandB(a.m, b.m); return a; }
HLML_INLINEF bool4 operator| (bool4 a, bool4 b) { a.m = funcs::AorB(a.m, b.m); return a; }
HLML_INLINEF bool4 operator^ (bool4 a, bool4 b) { a.m = funcs::AxorB(a.m, b.m); return a; }
HLML_INLINEF bool4& operator&= (bool4& a, bool4 b) { a = a & b; return a; }
HLML_INLINEF bool4& operator|= (bool4& a, bool4 b) { a = a | b; return a; }
HLML_INLINEF bool4& operator^= (bool4& a, bool4 b) { a = a ^ b; return a; }
HLML_INLINEF u32 mask (bool4 v) { return bool4::flagsall & funcs::movemask(v.m); }
HLML_INLINEF b8 all (bool4 v) { return bool4::flagsall == mask(v); }
HLML_INLINEF b8 any (bool4 v) { return mask(v); }
HLML_INLINEF b8 none (bool4 v) { return !any(v); }
}