Skip to content

Commit

Permalink
Support all array sizes up to U512 (#67)
Browse files Browse the repository at this point in the history
This expands support for array sizes between 256-512, supporting all
sizes in this range rather than just multiples of 16.

Alternative to #65
  • Loading branch information
tarcieri authored Mar 17, 2024
1 parent ce4b180 commit cc455b4
Showing 1 changed file with 245 additions and 4 deletions.
249 changes: 245 additions & 4 deletions src/sizes.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
//! Macros for defining various array sizes, and their associated invocations.
//!
//! We support the following array sizes:
//! We support the following array sizes by default:
//!
//! - 0-256
//! - 272-1024 (multiples of 16)
//! - when the `extra-sizes` feature is enabled: 1040-4096 (multiples of 32)
//! - 0-512
//! - 528-1024 (multiples of 16)
//!
//! When the `extra-sizes` feature is enabled: 1040-4096 (multiples of 32)
use super::{ArraySize, AssocArraySize};
use typenum::consts::*;
Expand Down Expand Up @@ -286,21 +287,261 @@ impl_array_sizes! {
254 => U254,
255 => U255,
256 => U256,
257 => U257,
258 => U258,
259 => U259,
260 => U260,
261 => U261,
262 => U262,
263 => U263,
264 => U264,
265 => U265,
266 => U266,
267 => U267,
268 => U268,
269 => U269,
270 => U270,
271 => U271,
272 => U272,
273 => U273,
274 => U274,
275 => U275,
276 => U276,
277 => U277,
278 => U278,
279 => U279,
280 => U280,
281 => U281,
282 => U282,
283 => U283,
284 => U284,
285 => U285,
286 => U286,
287 => U287,
288 => U288,
289 => U289,
290 => U290,
291 => U291,
292 => U292,
293 => U293,
294 => U294,
295 => U295,
296 => U296,
297 => U297,
298 => U298,
299 => U299,
300 => U300,
301 => U301,
302 => U302,
303 => U303,
304 => U304,
305 => U305,
306 => U306,
307 => U307,
308 => U308,
309 => U309,
310 => U310,
311 => U311,
312 => U312,
313 => U313,
314 => U314,
315 => U315,
316 => U316,
317 => U317,
318 => U318,
319 => U319,
320 => U320,
321 => U321,
322 => U322,
323 => U323,
324 => U324,
325 => U325,
326 => U326,
327 => U327,
328 => U328,
329 => U329,
330 => U330,
331 => U331,
332 => U332,
333 => U333,
334 => U334,
335 => U335,
336 => U336,
337 => U337,
338 => U338,
339 => U339,
340 => U340,
341 => U341,
342 => U342,
343 => U343,
344 => U344,
345 => U345,
346 => U346,
347 => U347,
348 => U348,
349 => U349,
350 => U350,
351 => U351,
352 => U352,
353 => U353,
354 => U354,
355 => U355,
356 => U356,
357 => U357,
358 => U358,
359 => U359,
360 => U360,
361 => U361,
362 => U362,
363 => U363,
364 => U364,
365 => U365,
366 => U366,
367 => U367,
368 => U368,
369 => U369,
370 => U370,
371 => U371,
372 => U372,
373 => U373,
374 => U374,
375 => U375,
376 => U376,
377 => U377,
378 => U378,
379 => U379,
380 => U380,
381 => U381,
382 => U382,
383 => U383,
384 => U384,
385 => U385,
386 => U386,
387 => U387,
388 => U388,
389 => U389,
390 => U390,
391 => U391,
392 => U392,
393 => U393,
394 => U394,
395 => U395,
396 => U396,
397 => U397,
398 => U398,
399 => U399,
400 => U400,
401 => U401,
402 => U402,
403 => U403,
404 => U404,
405 => U405,
406 => U406,
407 => U407,
408 => U408,
409 => U409,
410 => U410,
411 => U411,
412 => U412,
413 => U413,
414 => U414,
415 => U415,
416 => U416,
417 => U417,
418 => U418,
419 => U419,
420 => U420,
421 => U421,
422 => U422,
423 => U423,
424 => U424,
425 => U425,
426 => U426,
427 => U427,
428 => U428,
429 => U429,
430 => U430,
431 => U431,
432 => U432,
433 => U433,
434 => U434,
435 => U435,
436 => U436,
437 => U437,
438 => U438,
439 => U439,
440 => U440,
441 => U441,
442 => U442,
443 => U443,
444 => U444,
445 => U445,
446 => U446,
447 => U447,
448 => U448,
449 => U449,
450 => U450,
451 => U451,
452 => U452,
453 => U453,
454 => U454,
455 => U455,
456 => U456,
457 => U457,
458 => U458,
459 => U459,
460 => U460,
461 => U461,
462 => U462,
463 => U463,
464 => U464,
465 => U465,
466 => U466,
467 => U467,
468 => U468,
469 => U469,
470 => U470,
471 => U471,
472 => U472,
473 => U473,
474 => U474,
475 => U475,
476 => U476,
477 => U477,
478 => U478,
479 => U479,
480 => U480,
481 => U481,
482 => U482,
483 => U483,
484 => U484,
485 => U485,
486 => U486,
487 => U487,
488 => U488,
489 => U489,
490 => U490,
491 => U491,
492 => U492,
493 => U493,
494 => U494,
495 => U495,
496 => U496,
497 => U497,
498 => U498,
499 => U499,
500 => U500,
501 => U501,
502 => U502,
503 => U503,
504 => U504,
505 => U505,
506 => U506,
507 => U507,
508 => U508,
509 => U509,
510 => U510,
511 => U511,
512 => U512,
528 => U528,
544 => U544,
Expand Down

0 comments on commit cc455b4

Please sign in to comment.