-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitboard_match.rs
340 lines (331 loc) · 21.7 KB
/
bitboard_match.rs
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
#[cfg(test)]
use proptest::prelude::*;
#[cfg(test)]
#[derive(Debug)]
pub struct RuntimeBitBoard {
pub n: usize,
pub m: usize,
pub row: usize,
pub col: usize,
pub value: u64,
}
/////////////////////////////////////////////////////////////////////////////////////////////
impl Arbitrary for RuntimeBitBoard {
type Parameters = ();
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy {
(1usize..65)
.prop_flat_map(|n| {
(1usize..=64 / n).prop_flat_map(move |m| {
let max_shift = std::cmp::min(n * m, 64);
(
0..n,
0..m,
0u64..=(1u64
.checked_shl(max_shift as u32)
.map(|x| x - 1)
.unwrap_or(u64::MAX)),
)
.prop_map(move |(row, col, value)| RuntimeBitBoard {
n,
m,
row,
col,
value,
})
})
})
.boxed()
}
type Strategy = BoxedStrategy<Self>;
}
/////////////////////////////////////////////////////////////////////////////////////////////
// There is probably a better way to do this.
macro_rules! match_bitboard {
($b:expr, $func:expr) => {
type _B<const N: usize, const M: usize> = BitBoard<N, M>;
match ($b.n, $b.m) {
(1, 1) => $func(_B::<1, 1>::new($b.value), $b.row, $b.col),
(1, 2) => $func(_B::<1, 2>::new($b.value), $b.row, $b.col),
(1, 3) => $func(_B::<1, 3>::new($b.value), $b.row, $b.col),
(1, 4) => $func(_B::<1, 4>::new($b.value), $b.row, $b.col),
(1, 5) => $func(_B::<1, 5>::new($b.value), $b.row, $b.col),
(1, 6) => $func(_B::<1, 6>::new($b.value), $b.row, $b.col),
(1, 7) => $func(_B::<1, 7>::new($b.value), $b.row, $b.col),
(1, 8) => $func(_B::<1, 8>::new($b.value), $b.row, $b.col),
(1, 9) => $func(_B::<1, 9>::new($b.value), $b.row, $b.col),
(1, 10) => $func(_B::<1, 10>::new($b.value), $b.row, $b.col),
(1, 11) => $func(_B::<1, 11>::new($b.value), $b.row, $b.col),
(1, 12) => $func(_B::<1, 12>::new($b.value), $b.row, $b.col),
(1, 13) => $func(_B::<1, 13>::new($b.value), $b.row, $b.col),
(1, 14) => $func(_B::<1, 14>::new($b.value), $b.row, $b.col),
(1, 15) => $func(_B::<1, 15>::new($b.value), $b.row, $b.col),
(1, 16) => $func(_B::<1, 16>::new($b.value), $b.row, $b.col),
(1, 17) => $func(_B::<1, 17>::new($b.value), $b.row, $b.col),
(1, 18) => $func(_B::<1, 18>::new($b.value), $b.row, $b.col),
(1, 19) => $func(_B::<1, 19>::new($b.value), $b.row, $b.col),
(1, 20) => $func(_B::<1, 20>::new($b.value), $b.row, $b.col),
(1, 21) => $func(_B::<1, 21>::new($b.value), $b.row, $b.col),
(1, 22) => $func(_B::<1, 22>::new($b.value), $b.row, $b.col),
(1, 23) => $func(_B::<1, 23>::new($b.value), $b.row, $b.col),
(1, 24) => $func(_B::<1, 24>::new($b.value), $b.row, $b.col),
(1, 25) => $func(_B::<1, 25>::new($b.value), $b.row, $b.col),
(1, 26) => $func(_B::<1, 26>::new($b.value), $b.row, $b.col),
(1, 27) => $func(_B::<1, 27>::new($b.value), $b.row, $b.col),
(1, 28) => $func(_B::<1, 28>::new($b.value), $b.row, $b.col),
(1, 29) => $func(_B::<1, 29>::new($b.value), $b.row, $b.col),
(1, 30) => $func(_B::<1, 30>::new($b.value), $b.row, $b.col),
(1, 31) => $func(_B::<1, 31>::new($b.value), $b.row, $b.col),
(1, 32) => $func(_B::<1, 32>::new($b.value), $b.row, $b.col),
(1, 33) => $func(_B::<1, 33>::new($b.value), $b.row, $b.col),
(1, 34) => $func(_B::<1, 34>::new($b.value), $b.row, $b.col),
(1, 35) => $func(_B::<1, 35>::new($b.value), $b.row, $b.col),
(1, 36) => $func(_B::<1, 36>::new($b.value), $b.row, $b.col),
(1, 37) => $func(_B::<1, 37>::new($b.value), $b.row, $b.col),
(1, 38) => $func(_B::<1, 38>::new($b.value), $b.row, $b.col),
(1, 39) => $func(_B::<1, 39>::new($b.value), $b.row, $b.col),
(1, 40) => $func(_B::<1, 40>::new($b.value), $b.row, $b.col),
(1, 41) => $func(_B::<1, 41>::new($b.value), $b.row, $b.col),
(1, 42) => $func(_B::<1, 42>::new($b.value), $b.row, $b.col),
(1, 43) => $func(_B::<1, 43>::new($b.value), $b.row, $b.col),
(1, 44) => $func(_B::<1, 44>::new($b.value), $b.row, $b.col),
(1, 45) => $func(_B::<1, 45>::new($b.value), $b.row, $b.col),
(1, 46) => $func(_B::<1, 46>::new($b.value), $b.row, $b.col),
(1, 47) => $func(_B::<1, 47>::new($b.value), $b.row, $b.col),
(1, 48) => $func(_B::<1, 48>::new($b.value), $b.row, $b.col),
(1, 49) => $func(_B::<1, 49>::new($b.value), $b.row, $b.col),
(1, 50) => $func(_B::<1, 50>::new($b.value), $b.row, $b.col),
(1, 51) => $func(_B::<1, 51>::new($b.value), $b.row, $b.col),
(1, 52) => $func(_B::<1, 52>::new($b.value), $b.row, $b.col),
(1, 53) => $func(_B::<1, 53>::new($b.value), $b.row, $b.col),
(1, 54) => $func(_B::<1, 54>::new($b.value), $b.row, $b.col),
(1, 55) => $func(_B::<1, 55>::new($b.value), $b.row, $b.col),
(1, 56) => $func(_B::<1, 56>::new($b.value), $b.row, $b.col),
(1, 57) => $func(_B::<1, 57>::new($b.value), $b.row, $b.col),
(1, 58) => $func(_B::<1, 58>::new($b.value), $b.row, $b.col),
(1, 59) => $func(_B::<1, 59>::new($b.value), $b.row, $b.col),
(1, 60) => $func(_B::<1, 60>::new($b.value), $b.row, $b.col),
(1, 61) => $func(_B::<1, 61>::new($b.value), $b.row, $b.col),
(1, 62) => $func(_B::<1, 62>::new($b.value), $b.row, $b.col),
(1, 63) => $func(_B::<1, 63>::new($b.value), $b.row, $b.col),
(1, 64) => $func(_B::<1, 64>::new($b.value), $b.row, $b.col),
(2, 1) => $func(_B::<2, 1>::new($b.value), $b.row, $b.col),
(2, 2) => $func(_B::<2, 2>::new($b.value), $b.row, $b.col),
(2, 3) => $func(_B::<2, 3>::new($b.value), $b.row, $b.col),
(2, 4) => $func(_B::<2, 4>::new($b.value), $b.row, $b.col),
(2, 5) => $func(_B::<2, 5>::new($b.value), $b.row, $b.col),
(2, 6) => $func(_B::<2, 6>::new($b.value), $b.row, $b.col),
(2, 7) => $func(_B::<2, 7>::new($b.value), $b.row, $b.col),
(2, 8) => $func(_B::<2, 8>::new($b.value), $b.row, $b.col),
(2, 9) => $func(_B::<2, 9>::new($b.value), $b.row, $b.col),
(2, 10) => $func(_B::<2, 10>::new($b.value), $b.row, $b.col),
(2, 11) => $func(_B::<2, 11>::new($b.value), $b.row, $b.col),
(2, 12) => $func(_B::<2, 12>::new($b.value), $b.row, $b.col),
(2, 13) => $func(_B::<2, 13>::new($b.value), $b.row, $b.col),
(2, 14) => $func(_B::<2, 14>::new($b.value), $b.row, $b.col),
(2, 15) => $func(_B::<2, 15>::new($b.value), $b.row, $b.col),
(2, 16) => $func(_B::<2, 16>::new($b.value), $b.row, $b.col),
(2, 17) => $func(_B::<2, 17>::new($b.value), $b.row, $b.col),
(2, 18) => $func(_B::<2, 18>::new($b.value), $b.row, $b.col),
(2, 19) => $func(_B::<2, 19>::new($b.value), $b.row, $b.col),
(2, 20) => $func(_B::<2, 20>::new($b.value), $b.row, $b.col),
(2, 21) => $func(_B::<2, 21>::new($b.value), $b.row, $b.col),
(2, 22) => $func(_B::<2, 22>::new($b.value), $b.row, $b.col),
(2, 23) => $func(_B::<2, 23>::new($b.value), $b.row, $b.col),
(2, 24) => $func(_B::<2, 24>::new($b.value), $b.row, $b.col),
(2, 25) => $func(_B::<2, 25>::new($b.value), $b.row, $b.col),
(2, 26) => $func(_B::<2, 26>::new($b.value), $b.row, $b.col),
(2, 27) => $func(_B::<2, 27>::new($b.value), $b.row, $b.col),
(2, 28) => $func(_B::<2, 28>::new($b.value), $b.row, $b.col),
(2, 29) => $func(_B::<2, 29>::new($b.value), $b.row, $b.col),
(2, 30) => $func(_B::<2, 30>::new($b.value), $b.row, $b.col),
(2, 31) => $func(_B::<2, 31>::new($b.value), $b.row, $b.col),
(2, 32) => $func(_B::<2, 32>::new($b.value), $b.row, $b.col),
(3, 1) => $func(_B::<3, 1>::new($b.value), $b.row, $b.col),
(3, 2) => $func(_B::<3, 2>::new($b.value), $b.row, $b.col),
(3, 3) => $func(_B::<3, 3>::new($b.value), $b.row, $b.col),
(3, 4) => $func(_B::<3, 4>::new($b.value), $b.row, $b.col),
(3, 5) => $func(_B::<3, 5>::new($b.value), $b.row, $b.col),
(3, 6) => $func(_B::<3, 6>::new($b.value), $b.row, $b.col),
(3, 7) => $func(_B::<3, 7>::new($b.value), $b.row, $b.col),
(3, 8) => $func(_B::<3, 8>::new($b.value), $b.row, $b.col),
(3, 9) => $func(_B::<3, 9>::new($b.value), $b.row, $b.col),
(3, 10) => $func(_B::<3, 10>::new($b.value), $b.row, $b.col),
(3, 11) => $func(_B::<3, 11>::new($b.value), $b.row, $b.col),
(3, 12) => $func(_B::<3, 12>::new($b.value), $b.row, $b.col),
(3, 13) => $func(_B::<3, 13>::new($b.value), $b.row, $b.col),
(3, 14) => $func(_B::<3, 14>::new($b.value), $b.row, $b.col),
(3, 15) => $func(_B::<3, 15>::new($b.value), $b.row, $b.col),
(3, 16) => $func(_B::<3, 16>::new($b.value), $b.row, $b.col),
(3, 17) => $func(_B::<3, 17>::new($b.value), $b.row, $b.col),
(3, 18) => $func(_B::<3, 18>::new($b.value), $b.row, $b.col),
(3, 19) => $func(_B::<3, 19>::new($b.value), $b.row, $b.col),
(3, 20) => $func(_B::<3, 20>::new($b.value), $b.row, $b.col),
(3, 21) => $func(_B::<3, 21>::new($b.value), $b.row, $b.col),
(4, 1) => $func(_B::<4, 1>::new($b.value), $b.row, $b.col),
(4, 2) => $func(_B::<4, 2>::new($b.value), $b.row, $b.col),
(4, 3) => $func(_B::<4, 3>::new($b.value), $b.row, $b.col),
(4, 4) => $func(_B::<4, 4>::new($b.value), $b.row, $b.col),
(4, 5) => $func(_B::<4, 5>::new($b.value), $b.row, $b.col),
(4, 6) => $func(_B::<4, 6>::new($b.value), $b.row, $b.col),
(4, 7) => $func(_B::<4, 7>::new($b.value), $b.row, $b.col),
(4, 8) => $func(_B::<4, 8>::new($b.value), $b.row, $b.col),
(4, 9) => $func(_B::<4, 9>::new($b.value), $b.row, $b.col),
(4, 10) => $func(_B::<4, 10>::new($b.value), $b.row, $b.col),
(4, 11) => $func(_B::<4, 11>::new($b.value), $b.row, $b.col),
(4, 12) => $func(_B::<4, 12>::new($b.value), $b.row, $b.col),
(4, 13) => $func(_B::<4, 13>::new($b.value), $b.row, $b.col),
(4, 14) => $func(_B::<4, 14>::new($b.value), $b.row, $b.col),
(4, 15) => $func(_B::<4, 15>::new($b.value), $b.row, $b.col),
(4, 16) => $func(_B::<4, 16>::new($b.value), $b.row, $b.col),
(5, 1) => $func(_B::<5, 1>::new($b.value), $b.row, $b.col),
(5, 2) => $func(_B::<5, 2>::new($b.value), $b.row, $b.col),
(5, 3) => $func(_B::<5, 3>::new($b.value), $b.row, $b.col),
(5, 4) => $func(_B::<5, 4>::new($b.value), $b.row, $b.col),
(5, 5) => $func(_B::<5, 5>::new($b.value), $b.row, $b.col),
(5, 6) => $func(_B::<5, 6>::new($b.value), $b.row, $b.col),
(5, 7) => $func(_B::<5, 7>::new($b.value), $b.row, $b.col),
(5, 8) => $func(_B::<5, 8>::new($b.value), $b.row, $b.col),
(5, 9) => $func(_B::<5, 9>::new($b.value), $b.row, $b.col),
(5, 10) => $func(_B::<5, 10>::new($b.value), $b.row, $b.col),
(5, 11) => $func(_B::<5, 11>::new($b.value), $b.row, $b.col),
(5, 12) => $func(_B::<5, 12>::new($b.value), $b.row, $b.col),
(6, 1) => $func(_B::<6, 1>::new($b.value), $b.row, $b.col),
(6, 2) => $func(_B::<6, 2>::new($b.value), $b.row, $b.col),
(6, 3) => $func(_B::<6, 3>::new($b.value), $b.row, $b.col),
(6, 4) => $func(_B::<6, 4>::new($b.value), $b.row, $b.col),
(6, 5) => $func(_B::<6, 5>::new($b.value), $b.row, $b.col),
(6, 6) => $func(_B::<6, 6>::new($b.value), $b.row, $b.col),
(6, 7) => $func(_B::<6, 7>::new($b.value), $b.row, $b.col),
(6, 8) => $func(_B::<6, 8>::new($b.value), $b.row, $b.col),
(6, 9) => $func(_B::<6, 9>::new($b.value), $b.row, $b.col),
(6, 10) => $func(_B::<6, 10>::new($b.value), $b.row, $b.col),
(7, 1) => $func(_B::<7, 1>::new($b.value), $b.row, $b.col),
(7, 2) => $func(_B::<7, 2>::new($b.value), $b.row, $b.col),
(7, 3) => $func(_B::<7, 3>::new($b.value), $b.row, $b.col),
(7, 4) => $func(_B::<7, 4>::new($b.value), $b.row, $b.col),
(7, 5) => $func(_B::<7, 5>::new($b.value), $b.row, $b.col),
(7, 6) => $func(_B::<7, 6>::new($b.value), $b.row, $b.col),
(7, 7) => $func(_B::<7, 7>::new($b.value), $b.row, $b.col),
(7, 8) => $func(_B::<7, 8>::new($b.value), $b.row, $b.col),
(7, 9) => $func(_B::<7, 9>::new($b.value), $b.row, $b.col),
(8, 1) => $func(_B::<8, 1>::new($b.value), $b.row, $b.col),
(8, 2) => $func(_B::<8, 2>::new($b.value), $b.row, $b.col),
(8, 3) => $func(_B::<8, 3>::new($b.value), $b.row, $b.col),
(8, 4) => $func(_B::<8, 4>::new($b.value), $b.row, $b.col),
(8, 5) => $func(_B::<8, 5>::new($b.value), $b.row, $b.col),
(8, 6) => $func(_B::<8, 6>::new($b.value), $b.row, $b.col),
(8, 7) => $func(_B::<8, 7>::new($b.value), $b.row, $b.col),
(8, 8) => $func(_B::<8, 8>::new($b.value), $b.row, $b.col),
(9, 1) => $func(_B::<9, 1>::new($b.value), $b.row, $b.col),
(9, 2) => $func(_B::<9, 2>::new($b.value), $b.row, $b.col),
(9, 3) => $func(_B::<9, 3>::new($b.value), $b.row, $b.col),
(9, 4) => $func(_B::<9, 4>::new($b.value), $b.row, $b.col),
(9, 5) => $func(_B::<9, 5>::new($b.value), $b.row, $b.col),
(9, 6) => $func(_B::<9, 6>::new($b.value), $b.row, $b.col),
(9, 7) => $func(_B::<9, 7>::new($b.value), $b.row, $b.col),
(10, 1) => $func(_B::<10, 1>::new($b.value), $b.row, $b.col),
(10, 2) => $func(_B::<10, 2>::new($b.value), $b.row, $b.col),
(10, 3) => $func(_B::<10, 3>::new($b.value), $b.row, $b.col),
(10, 4) => $func(_B::<10, 4>::new($b.value), $b.row, $b.col),
(10, 5) => $func(_B::<10, 5>::new($b.value), $b.row, $b.col),
(10, 6) => $func(_B::<10, 6>::new($b.value), $b.row, $b.col),
(11, 1) => $func(_B::<11, 1>::new($b.value), $b.row, $b.col),
(11, 2) => $func(_B::<11, 2>::new($b.value), $b.row, $b.col),
(11, 3) => $func(_B::<11, 3>::new($b.value), $b.row, $b.col),
(11, 4) => $func(_B::<11, 4>::new($b.value), $b.row, $b.col),
(11, 5) => $func(_B::<11, 5>::new($b.value), $b.row, $b.col),
(12, 1) => $func(_B::<12, 1>::new($b.value), $b.row, $b.col),
(12, 2) => $func(_B::<12, 2>::new($b.value), $b.row, $b.col),
(12, 3) => $func(_B::<12, 3>::new($b.value), $b.row, $b.col),
(12, 4) => $func(_B::<12, 4>::new($b.value), $b.row, $b.col),
(12, 5) => $func(_B::<12, 5>::new($b.value), $b.row, $b.col),
(13, 1) => $func(_B::<13, 1>::new($b.value), $b.row, $b.col),
(13, 2) => $func(_B::<13, 2>::new($b.value), $b.row, $b.col),
(13, 3) => $func(_B::<13, 3>::new($b.value), $b.row, $b.col),
(13, 4) => $func(_B::<13, 4>::new($b.value), $b.row, $b.col),
(14, 1) => $func(_B::<14, 1>::new($b.value), $b.row, $b.col),
(14, 2) => $func(_B::<14, 2>::new($b.value), $b.row, $b.col),
(14, 3) => $func(_B::<14, 3>::new($b.value), $b.row, $b.col),
(14, 4) => $func(_B::<14, 4>::new($b.value), $b.row, $b.col),
(15, 1) => $func(_B::<15, 1>::new($b.value), $b.row, $b.col),
(15, 2) => $func(_B::<15, 2>::new($b.value), $b.row, $b.col),
(15, 3) => $func(_B::<15, 3>::new($b.value), $b.row, $b.col),
(15, 4) => $func(_B::<15, 4>::new($b.value), $b.row, $b.col),
(16, 1) => $func(_B::<16, 1>::new($b.value), $b.row, $b.col),
(16, 2) => $func(_B::<16, 2>::new($b.value), $b.row, $b.col),
(16, 3) => $func(_B::<16, 3>::new($b.value), $b.row, $b.col),
(16, 4) => $func(_B::<16, 4>::new($b.value), $b.row, $b.col),
(17, 1) => $func(_B::<17, 1>::new($b.value), $b.row, $b.col),
(17, 2) => $func(_B::<17, 2>::new($b.value), $b.row, $b.col),
(17, 3) => $func(_B::<17, 3>::new($b.value), $b.row, $b.col),
(18, 1) => $func(_B::<18, 1>::new($b.value), $b.row, $b.col),
(18, 2) => $func(_B::<18, 2>::new($b.value), $b.row, $b.col),
(18, 3) => $func(_B::<18, 3>::new($b.value), $b.row, $b.col),
(19, 1) => $func(_B::<19, 1>::new($b.value), $b.row, $b.col),
(19, 2) => $func(_B::<19, 2>::new($b.value), $b.row, $b.col),
(19, 3) => $func(_B::<19, 3>::new($b.value), $b.row, $b.col),
(20, 1) => $func(_B::<20, 1>::new($b.value), $b.row, $b.col),
(20, 2) => $func(_B::<20, 2>::new($b.value), $b.row, $b.col),
(20, 3) => $func(_B::<20, 3>::new($b.value), $b.row, $b.col),
(21, 1) => $func(_B::<21, 1>::new($b.value), $b.row, $b.col),
(21, 2) => $func(_B::<21, 2>::new($b.value), $b.row, $b.col),
(21, 3) => $func(_B::<21, 3>::new($b.value), $b.row, $b.col),
(22, 1) => $func(_B::<22, 1>::new($b.value), $b.row, $b.col),
(22, 2) => $func(_B::<22, 2>::new($b.value), $b.row, $b.col),
(23, 1) => $func(_B::<23, 1>::new($b.value), $b.row, $b.col),
(23, 2) => $func(_B::<23, 2>::new($b.value), $b.row, $b.col),
(24, 1) => $func(_B::<24, 1>::new($b.value), $b.row, $b.col),
(24, 2) => $func(_B::<24, 2>::new($b.value), $b.row, $b.col),
(25, 1) => $func(_B::<25, 1>::new($b.value), $b.row, $b.col),
(25, 2) => $func(_B::<25, 2>::new($b.value), $b.row, $b.col),
(26, 1) => $func(_B::<26, 1>::new($b.value), $b.row, $b.col),
(26, 2) => $func(_B::<26, 2>::new($b.value), $b.row, $b.col),
(27, 1) => $func(_B::<27, 1>::new($b.value), $b.row, $b.col),
(27, 2) => $func(_B::<27, 2>::new($b.value), $b.row, $b.col),
(28, 1) => $func(_B::<28, 1>::new($b.value), $b.row, $b.col),
(28, 2) => $func(_B::<28, 2>::new($b.value), $b.row, $b.col),
(29, 1) => $func(_B::<29, 1>::new($b.value), $b.row, $b.col),
(29, 2) => $func(_B::<29, 2>::new($b.value), $b.row, $b.col),
(30, 1) => $func(_B::<30, 1>::new($b.value), $b.row, $b.col),
(30, 2) => $func(_B::<30, 2>::new($b.value), $b.row, $b.col),
(31, 1) => $func(_B::<31, 1>::new($b.value), $b.row, $b.col),
(31, 2) => $func(_B::<31, 2>::new($b.value), $b.row, $b.col),
(32, 1) => $func(_B::<32, 1>::new($b.value), $b.row, $b.col),
(32, 2) => $func(_B::<32, 2>::new($b.value), $b.row, $b.col),
(33, 1) => $func(_B::<33, 1>::new($b.value), $b.row, $b.col),
(34, 1) => $func(_B::<34, 1>::new($b.value), $b.row, $b.col),
(35, 1) => $func(_B::<35, 1>::new($b.value), $b.row, $b.col),
(36, 1) => $func(_B::<36, 1>::new($b.value), $b.row, $b.col),
(37, 1) => $func(_B::<37, 1>::new($b.value), $b.row, $b.col),
(38, 1) => $func(_B::<38, 1>::new($b.value), $b.row, $b.col),
(39, 1) => $func(_B::<39, 1>::new($b.value), $b.row, $b.col),
(40, 1) => $func(_B::<40, 1>::new($b.value), $b.row, $b.col),
(41, 1) => $func(_B::<41, 1>::new($b.value), $b.row, $b.col),
(42, 1) => $func(_B::<42, 1>::new($b.value), $b.row, $b.col),
(43, 1) => $func(_B::<43, 1>::new($b.value), $b.row, $b.col),
(44, 1) => $func(_B::<44, 1>::new($b.value), $b.row, $b.col),
(45, 1) => $func(_B::<45, 1>::new($b.value), $b.row, $b.col),
(46, 1) => $func(_B::<46, 1>::new($b.value), $b.row, $b.col),
(47, 1) => $func(_B::<47, 1>::new($b.value), $b.row, $b.col),
(48, 1) => $func(_B::<48, 1>::new($b.value), $b.row, $b.col),
(49, 1) => $func(_B::<49, 1>::new($b.value), $b.row, $b.col),
(50, 1) => $func(_B::<50, 1>::new($b.value), $b.row, $b.col),
(51, 1) => $func(_B::<51, 1>::new($b.value), $b.row, $b.col),
(52, 1) => $func(_B::<52, 1>::new($b.value), $b.row, $b.col),
(53, 1) => $func(_B::<53, 1>::new($b.value), $b.row, $b.col),
(54, 1) => $func(_B::<54, 1>::new($b.value), $b.row, $b.col),
(55, 1) => $func(_B::<55, 1>::new($b.value), $b.row, $b.col),
(56, 1) => $func(_B::<56, 1>::new($b.value), $b.row, $b.col),
(57, 1) => $func(_B::<57, 1>::new($b.value), $b.row, $b.col),
(58, 1) => $func(_B::<58, 1>::new($b.value), $b.row, $b.col),
(59, 1) => $func(_B::<59, 1>::new($b.value), $b.row, $b.col),
(60, 1) => $func(_B::<60, 1>::new($b.value), $b.row, $b.col),
(61, 1) => $func(_B::<61, 1>::new($b.value), $b.row, $b.col),
(62, 1) => $func(_B::<62, 1>::new($b.value), $b.row, $b.col),
(63, 1) => $func(_B::<63, 1>::new($b.value), $b.row, $b.col),
(64, 1) => $func(_B::<64, 1>::new($b.value), $b.row, $b.col),
_ => panic!("Unsupported dimensions: ({}, {})", $b.n, $b.m),
}
};
}
pub(crate) use match_bitboard;