StructArrayHelpers.cs
1 using System; 2 using System.Diagnostics.Contracts; 3 using System.Runtime.InteropServices; 4 5 #pragma warning disable CS0169, IDE0051 // Remove unused private member 6 namespace Ryujinx.Common.Memory 7 { 8 public struct Array1<T> : IArray<T> where T : unmanaged 9 { 10 T _e0; 11 public readonly int Length => 1; 12 public ref T this[int index] => ref AsSpan()[index]; 13 14 [Pure] 15 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 16 } 17 18 public struct Array2<T> : IArray<T> where T : unmanaged 19 { 20 T _e0; 21 Array1<T> _other; 22 public readonly int Length => 2; 23 public ref T this[int index] => ref AsSpan()[index]; 24 25 [Pure] 26 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 27 } 28 29 public struct Array3<T> : IArray<T> where T : unmanaged 30 { 31 T _e0; 32 Array2<T> _other; 33 public readonly int Length => 3; 34 public ref T this[int index] => ref AsSpan()[index]; 35 36 [Pure] 37 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 38 } 39 40 public struct Array4<T> : IArray<T> where T : unmanaged 41 { 42 T _e0; 43 Array3<T> _other; 44 public readonly int Length => 4; 45 public ref T this[int index] => ref AsSpan()[index]; 46 47 [Pure] 48 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 49 } 50 51 public struct Array5<T> : IArray<T> where T : unmanaged 52 { 53 T _e0; 54 Array4<T> _other; 55 public readonly int Length => 5; 56 public ref T this[int index] => ref AsSpan()[index]; 57 58 [Pure] 59 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 60 } 61 62 public struct Array6<T> : IArray<T> where T : unmanaged 63 { 64 T _e0; 65 Array5<T> _other; 66 public readonly int Length => 6; 67 public ref T this[int index] => ref AsSpan()[index]; 68 69 [Pure] 70 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 71 } 72 73 public struct Array7<T> : IArray<T> where T : unmanaged 74 { 75 T _e0; 76 Array6<T> _other; 77 public readonly int Length => 7; 78 public ref T this[int index] => ref AsSpan()[index]; 79 80 [Pure] 81 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 82 } 83 84 public struct Array8<T> : IArray<T> where T : unmanaged 85 { 86 T _e0; 87 Array7<T> _other; 88 public readonly int Length => 8; 89 public ref T this[int index] => ref AsSpan()[index]; 90 91 [Pure] 92 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 93 } 94 95 public struct Array9<T> : IArray<T> where T : unmanaged 96 { 97 T _e0; 98 Array8<T> _other; 99 public readonly int Length => 9; 100 public ref T this[int index] => ref AsSpan()[index]; 101 102 [Pure] 103 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 104 } 105 106 public struct Array10<T> : IArray<T> where T : unmanaged 107 { 108 T _e0; 109 Array9<T> _other; 110 public readonly int Length => 10; 111 public ref T this[int index] => ref AsSpan()[index]; 112 113 [Pure] 114 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 115 } 116 117 public struct Array11<T> : IArray<T> where T : unmanaged 118 { 119 T _e0; 120 Array10<T> _other; 121 public readonly int Length => 11; 122 public ref T this[int index] => ref AsSpan()[index]; 123 124 [Pure] 125 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 126 } 127 128 public struct Array12<T> : IArray<T> where T : unmanaged 129 { 130 T _e0; 131 Array11<T> _other; 132 public readonly int Length => 12; 133 public ref T this[int index] => ref AsSpan()[index]; 134 135 [Pure] 136 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 137 } 138 139 public struct Array13<T> : IArray<T> where T : unmanaged 140 { 141 T _e0; 142 Array12<T> _other; 143 public readonly int Length => 13; 144 public ref T this[int index] => ref AsSpan()[index]; 145 146 [Pure] 147 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 148 } 149 150 public struct Array14<T> : IArray<T> where T : unmanaged 151 { 152 T _e0; 153 Array13<T> _other; 154 public readonly int Length => 14; 155 public ref T this[int index] => ref AsSpan()[index]; 156 157 [Pure] 158 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 159 } 160 161 public struct Array15<T> : IArray<T> where T : unmanaged 162 { 163 T _e0; 164 Array14<T> _other; 165 public readonly int Length => 15; 166 public ref T this[int index] => ref AsSpan()[index]; 167 168 [Pure] 169 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 170 } 171 172 public struct Array16<T> : IArray<T> where T : unmanaged 173 { 174 T _e0; 175 Array15<T> _other; 176 public readonly int Length => 16; 177 public ref T this[int index] => ref AsSpan()[index]; 178 179 [Pure] 180 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 181 } 182 183 public struct Array17<T> : IArray<T> where T : unmanaged 184 { 185 T _e0; 186 Array16<T> _other; 187 public readonly int Length => 17; 188 public ref T this[int index] => ref AsSpan()[index]; 189 190 [Pure] 191 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 192 } 193 194 public struct Array18<T> : IArray<T> where T : unmanaged 195 { 196 T _e0; 197 Array17<T> _other; 198 public readonly int Length => 18; 199 public ref T this[int index] => ref AsSpan()[index]; 200 201 [Pure] 202 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 203 } 204 205 public struct Array19<T> : IArray<T> where T : unmanaged 206 { 207 T _e0; 208 Array18<T> _other; 209 public readonly int Length => 19; 210 public ref T this[int index] => ref AsSpan()[index]; 211 212 [Pure] 213 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 214 } 215 216 public struct Array20<T> : IArray<T> where T : unmanaged 217 { 218 T _e0; 219 Array19<T> _other; 220 public readonly int Length => 20; 221 public ref T this[int index] => ref AsSpan()[index]; 222 223 [Pure] 224 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 225 } 226 227 public struct Array21<T> : IArray<T> where T : unmanaged 228 { 229 T _e0; 230 Array20<T> _other; 231 public readonly int Length => 21; 232 public ref T this[int index] => ref AsSpan()[index]; 233 234 [Pure] 235 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 236 } 237 238 public struct Array22<T> : IArray<T> where T : unmanaged 239 { 240 T _e0; 241 Array21<T> _other; 242 public readonly int Length => 22; 243 public ref T this[int index] => ref AsSpan()[index]; 244 245 [Pure] 246 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 247 } 248 249 public struct Array23<T> : IArray<T> where T : unmanaged 250 { 251 T _e0; 252 Array22<T> _other; 253 public readonly int Length => 23; 254 public ref T this[int index] => ref AsSpan()[index]; 255 256 [Pure] 257 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 258 } 259 260 public struct Array24<T> : IArray<T> where T : unmanaged 261 { 262 T _e0; 263 Array23<T> _other; 264 265 public readonly int Length => 24; 266 public ref T this[int index] => ref AsSpan()[index]; 267 268 [Pure] 269 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 270 } 271 272 public struct Array25<T> : IArray<T> where T : unmanaged 273 { 274 T _e0; 275 Array24<T> _other; 276 277 public readonly int Length => 25; 278 public ref T this[int index] => ref AsSpan()[index]; 279 280 [Pure] 281 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 282 } 283 284 public struct Array26<T> : IArray<T> where T : unmanaged 285 { 286 T _e0; 287 Array25<T> _other; 288 289 public readonly int Length => 26; 290 public ref T this[int index] => ref AsSpan()[index]; 291 292 [Pure] 293 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 294 } 295 296 public struct Array27<T> : IArray<T> where T : unmanaged 297 { 298 T _e0; 299 Array26<T> _other; 300 301 public readonly int Length => 27; 302 public ref T this[int index] => ref AsSpan()[index]; 303 304 [Pure] 305 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 306 } 307 308 public struct Array28<T> : IArray<T> where T : unmanaged 309 { 310 T _e0; 311 Array27<T> _other; 312 313 public readonly int Length => 28; 314 public ref T this[int index] => ref AsSpan()[index]; 315 316 [Pure] 317 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 318 } 319 320 public struct Array29<T> : IArray<T> where T : unmanaged 321 { 322 T _e0; 323 Array28<T> _other; 324 325 public readonly int Length => 29; 326 public ref T this[int index] => ref AsSpan()[index]; 327 328 [Pure] 329 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 330 } 331 332 public struct Array30<T> : IArray<T> where T : unmanaged 333 { 334 T _e0; 335 Array29<T> _other; 336 337 public readonly int Length => 30; 338 public ref T this[int index] => ref AsSpan()[index]; 339 340 [Pure] 341 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 342 } 343 344 public struct Array31<T> : IArray<T> where T : unmanaged 345 { 346 T _e0; 347 Array30<T> _other; 348 349 public readonly int Length => 31; 350 public ref T this[int index] => ref AsSpan()[index]; 351 352 [Pure] 353 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 354 } 355 356 public struct Array32<T> : IArray<T> where T : unmanaged 357 { 358 T _e0; 359 Array31<T> _other; 360 361 public readonly int Length => 32; 362 public ref T this[int index] => ref AsSpan()[index]; 363 364 [Pure] 365 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 366 } 367 368 public struct Array33<T> : IArray<T> where T : unmanaged 369 { 370 T _e0; 371 Array32<T> _other; 372 373 public readonly int Length => 33; 374 public ref T this[int index] => ref AsSpan()[index]; 375 376 [Pure] 377 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 378 } 379 380 public struct Array34<T> : IArray<T> where T : unmanaged 381 { 382 T _e0; 383 Array33<T> _other; 384 385 public readonly int Length => 34; 386 public ref T this[int index] => ref AsSpan()[index]; 387 388 [Pure] 389 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 390 } 391 392 public struct Array35<T> : IArray<T> where T : unmanaged 393 { 394 T _e0; 395 Array34<T> _other; 396 397 public readonly int Length => 35; 398 public ref T this[int index] => ref AsSpan()[index]; 399 400 [Pure] 401 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 402 } 403 404 public struct Array36<T> : IArray<T> where T : unmanaged 405 { 406 T _e0; 407 Array35<T> _other; 408 409 public readonly int Length => 36; 410 public ref T this[int index] => ref AsSpan()[index]; 411 412 [Pure] 413 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 414 } 415 416 public struct Array37<T> : IArray<T> where T : unmanaged 417 { 418 T _e0; 419 Array36<T> _other; 420 421 public readonly int Length => 37; 422 public ref T this[int index] => ref AsSpan()[index]; 423 424 [Pure] 425 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 426 } 427 428 public struct Array38<T> : IArray<T> where T : unmanaged 429 { 430 T _e0; 431 Array37<T> _other; 432 433 public readonly int Length => 38; 434 public ref T this[int index] => ref AsSpan()[index]; 435 436 [Pure] 437 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 438 } 439 440 public struct Array39<T> : IArray<T> where T : unmanaged 441 { 442 T _e0; 443 Array38<T> _other; 444 445 public readonly int Length => 39; 446 public ref T this[int index] => ref AsSpan()[index]; 447 448 [Pure] 449 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 450 } 451 452 public struct Array40<T> : IArray<T> where T : unmanaged 453 { 454 T _e0; 455 Array39<T> _other; 456 457 public readonly int Length => 40; 458 public ref T this[int index] => ref AsSpan()[index]; 459 460 [Pure] 461 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 462 } 463 464 public struct Array41<T> : IArray<T> where T : unmanaged 465 { 466 T _e0; 467 Array40<T> _other; 468 469 public readonly int Length => 41; 470 public ref T this[int index] => ref AsSpan()[index]; 471 472 [Pure] 473 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 474 } 475 476 public struct Array42<T> : IArray<T> where T : unmanaged 477 { 478 T _e0; 479 Array41<T> _other; 480 481 public readonly int Length => 42; 482 public ref T this[int index] => ref AsSpan()[index]; 483 484 [Pure] 485 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 486 } 487 488 public struct Array43<T> : IArray<T> where T : unmanaged 489 { 490 T _e0; 491 Array42<T> _other; 492 493 public readonly int Length => 43; 494 public ref T this[int index] => ref AsSpan()[index]; 495 496 [Pure] 497 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 498 } 499 500 public struct Array44<T> : IArray<T> where T : unmanaged 501 { 502 T _e0; 503 Array43<T> _other; 504 505 public readonly int Length => 44; 506 public ref T this[int index] => ref AsSpan()[index]; 507 508 [Pure] 509 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 510 } 511 512 public struct Array45<T> : IArray<T> where T : unmanaged 513 { 514 T _e0; 515 Array44<T> _other; 516 517 public readonly int Length => 45; 518 public ref T this[int index] => ref AsSpan()[index]; 519 520 [Pure] 521 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 522 } 523 524 public struct Array46<T> : IArray<T> where T : unmanaged 525 { 526 T _e0; 527 Array45<T> _other; 528 529 public readonly int Length => 46; 530 public ref T this[int index] => ref AsSpan()[index]; 531 532 [Pure] 533 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 534 } 535 536 public struct Array47<T> : IArray<T> where T : unmanaged 537 { 538 T _e0; 539 Array46<T> _other; 540 541 public readonly int Length => 47; 542 public ref T this[int index] => ref AsSpan()[index]; 543 544 [Pure] 545 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 546 } 547 548 public struct Array48<T> : IArray<T> where T : unmanaged 549 { 550 T _e0; 551 Array47<T> _other; 552 553 public readonly int Length => 48; 554 public ref T this[int index] => ref AsSpan()[index]; 555 556 [Pure] 557 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 558 } 559 560 public struct Array49<T> : IArray<T> where T : unmanaged 561 { 562 T _e0; 563 Array48<T> _other; 564 565 public readonly int Length => 49; 566 public ref T this[int index] => ref AsSpan()[index]; 567 568 [Pure] 569 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 570 } 571 572 public struct Array50<T> : IArray<T> where T : unmanaged 573 { 574 T _e0; 575 Array49<T> _other; 576 577 public readonly int Length => 50; 578 public ref T this[int index] => ref AsSpan()[index]; 579 580 [Pure] 581 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 582 } 583 584 public struct Array51<T> : IArray<T> where T : unmanaged 585 { 586 T _e0; 587 Array50<T> _other; 588 589 public readonly int Length => 51; 590 public ref T this[int index] => ref AsSpan()[index]; 591 592 [Pure] 593 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 594 } 595 596 public struct Array52<T> : IArray<T> where T : unmanaged 597 { 598 T _e0; 599 Array51<T> _other; 600 601 public readonly int Length => 52; 602 public ref T this[int index] => ref AsSpan()[index]; 603 604 [Pure] 605 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 606 } 607 608 public struct Array53<T> : IArray<T> where T : unmanaged 609 { 610 T _e0; 611 Array52<T> _other; 612 613 public readonly int Length => 53; 614 public ref T this[int index] => ref AsSpan()[index]; 615 616 [Pure] 617 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 618 } 619 620 public struct Array54<T> : IArray<T> where T : unmanaged 621 { 622 T _e0; 623 Array53<T> _other; 624 625 public readonly int Length => 54; 626 public ref T this[int index] => ref AsSpan()[index]; 627 628 [Pure] 629 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 630 } 631 632 public struct Array55<T> : IArray<T> where T : unmanaged 633 { 634 T _e0; 635 Array54<T> _other; 636 637 public readonly int Length => 55; 638 public ref T this[int index] => ref AsSpan()[index]; 639 640 [Pure] 641 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 642 } 643 644 public struct Array56<T> : IArray<T> where T : unmanaged 645 { 646 T _e0; 647 Array55<T> _other; 648 649 public readonly int Length => 56; 650 public ref T this[int index] => ref AsSpan()[index]; 651 652 [Pure] 653 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 654 } 655 656 public struct Array57<T> : IArray<T> where T : unmanaged 657 { 658 T _e0; 659 Array56<T> _other; 660 661 public readonly int Length => 57; 662 public ref T this[int index] => ref AsSpan()[index]; 663 664 [Pure] 665 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 666 } 667 668 public struct Array58<T> : IArray<T> where T : unmanaged 669 { 670 T _e0; 671 Array57<T> _other; 672 673 public readonly int Length => 58; 674 public ref T this[int index] => ref AsSpan()[index]; 675 676 [Pure] 677 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 678 } 679 680 public struct Array59<T> : IArray<T> where T : unmanaged 681 { 682 T _e0; 683 Array58<T> _other; 684 685 public readonly int Length => 59; 686 public ref T this[int index] => ref AsSpan()[index]; 687 688 [Pure] 689 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 690 } 691 692 public struct Array60<T> : IArray<T> where T : unmanaged 693 { 694 T _e0; 695 Array59<T> _other; 696 public readonly int Length => 60; 697 public ref T this[int index] => ref AsSpan()[index]; 698 699 [Pure] 700 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 701 } 702 703 public struct Array61<T> : IArray<T> where T : unmanaged 704 { 705 T _e0; 706 Array60<T> _other; 707 public readonly int Length => 61; 708 public ref T this[int index] => ref AsSpan()[index]; 709 710 [Pure] 711 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 712 } 713 714 public struct Array62<T> : IArray<T> where T : unmanaged 715 { 716 T _e0; 717 Array61<T> _other; 718 public readonly int Length => 62; 719 public ref T this[int index] => ref AsSpan()[index]; 720 721 [Pure] 722 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 723 } 724 725 public struct Array63<T> : IArray<T> where T : unmanaged 726 { 727 T _e0; 728 Array62<T> _other; 729 public readonly int Length => 63; 730 public ref T this[int index] => ref AsSpan()[index]; 731 732 [Pure] 733 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 734 } 735 736 public struct Array64<T> : IArray<T> where T : unmanaged 737 { 738 T _e0; 739 Array63<T> _other; 740 public readonly int Length => 64; 741 public ref T this[int index] => ref AsSpan()[index]; 742 743 [Pure] 744 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 745 } 746 747 public struct Array65<T> : IArray<T> where T : unmanaged 748 { 749 T _e0; 750 Array64<T> _other; 751 public readonly int Length => 65; 752 public ref T this[int index] => ref AsSpan()[index]; 753 754 [Pure] 755 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 756 } 757 758 public struct Array73<T> : IArray<T> where T : unmanaged 759 { 760 T _e0; 761 Array64<T> _other; 762 Array8<T> _other2; 763 public readonly int Length => 73; 764 public ref T this[int index] => ref AsSpan()[index]; 765 766 [Pure] 767 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 768 } 769 770 public struct Array96<T> : IArray<T> where T : unmanaged 771 { 772 T _e0; 773 Array64<T> _other; 774 Array31<T> _other2; 775 public readonly int Length => 96; 776 public ref T this[int index] => ref AsSpan()[index]; 777 778 [Pure] 779 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 780 } 781 782 public struct Array127<T> : IArray<T> where T : unmanaged 783 { 784 T _e0; 785 Array64<T> _other; 786 Array62<T> _other2; 787 public readonly int Length => 127; 788 public ref T this[int index] => ref AsSpan()[index]; 789 790 [Pure] 791 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 792 } 793 794 public struct Array128<T> : IArray<T> where T : unmanaged 795 { 796 T _e0; 797 Array64<T> _other; 798 Array63<T> _other2; 799 public readonly int Length => 128; 800 public ref T this[int index] => ref AsSpan()[index]; 801 802 [Pure] 803 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 804 } 805 806 public struct Array256<T> : IArray<T> where T : unmanaged 807 { 808 T _e0; 809 Array128<T> _other; 810 Array127<T> _other2; 811 public readonly int Length => 256; 812 public ref T this[int index] => ref AsSpan()[index]; 813 814 [Pure] 815 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 816 } 817 818 public struct Array140<T> : IArray<T> where T : unmanaged 819 { 820 T _e0; 821 Array64<T> _other; 822 Array64<T> _other2; 823 Array11<T> _other3; 824 public readonly int Length => 140; 825 public ref T this[int index] => ref AsSpan()[index]; 826 827 [Pure] 828 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 829 } 830 831 public struct Array384<T> : IArray<T> where T : unmanaged 832 { 833 T _e0; 834 Array64<T> _other; 835 Array64<T> _other2; 836 Array64<T> _other3; 837 Array64<T> _other4; 838 Array64<T> _other5; 839 Array63<T> _other6; 840 public readonly int Length => 384; 841 public ref T this[int index] => ref AsSpan()[index]; 842 843 [Pure] 844 public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); 845 } 846 } 847 #pragma warning restore CS0169, IDE0051