using System; using System.Diagnostics.Contracts; using System.Runtime.InteropServices; #pragma warning disable CS0169, IDE0051 // Remove unused private member namespace Ryujinx.Common.Memory { public struct Array1 : IArray where T : unmanaged { T _e0; public readonly int Length => 1; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array2 : IArray where T : unmanaged { T _e0; Array1 _other; public readonly int Length => 2; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array3 : IArray where T : unmanaged { T _e0; Array2 _other; public readonly int Length => 3; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array4 : IArray where T : unmanaged { T _e0; Array3 _other; public readonly int Length => 4; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array5 : IArray where T : unmanaged { T _e0; Array4 _other; public readonly int Length => 5; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array6 : IArray where T : unmanaged { T _e0; Array5 _other; public readonly int Length => 6; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array7 : IArray where T : unmanaged { T _e0; Array6 _other; public readonly int Length => 7; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array8 : IArray where T : unmanaged { T _e0; Array7 _other; public readonly int Length => 8; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array9 : IArray where T : unmanaged { T _e0; Array8 _other; public readonly int Length => 9; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array10 : IArray where T : unmanaged { T _e0; Array9 _other; public readonly int Length => 10; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array11 : IArray where T : unmanaged { T _e0; Array10 _other; public readonly int Length => 11; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array12 : IArray where T : unmanaged { T _e0; Array11 _other; public readonly int Length => 12; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array13 : IArray where T : unmanaged { T _e0; Array12 _other; public readonly int Length => 13; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array14 : IArray where T : unmanaged { T _e0; Array13 _other; public readonly int Length => 14; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array15 : IArray where T : unmanaged { T _e0; Array14 _other; public readonly int Length => 15; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array16 : IArray where T : unmanaged { T _e0; Array15 _other; public readonly int Length => 16; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array17 : IArray where T : unmanaged { T _e0; Array16 _other; public readonly int Length => 17; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array18 : IArray where T : unmanaged { T _e0; Array17 _other; public readonly int Length => 18; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array19 : IArray where T : unmanaged { T _e0; Array18 _other; public readonly int Length => 19; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array20 : IArray where T : unmanaged { T _e0; Array19 _other; public readonly int Length => 20; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array21 : IArray where T : unmanaged { T _e0; Array20 _other; public readonly int Length => 21; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array22 : IArray where T : unmanaged { T _e0; Array21 _other; public readonly int Length => 22; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array23 : IArray where T : unmanaged { T _e0; Array22 _other; public readonly int Length => 23; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array24 : IArray where T : unmanaged { T _e0; Array23 _other; public readonly int Length => 24; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array25 : IArray where T : unmanaged { T _e0; Array24 _other; public readonly int Length => 25; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array26 : IArray where T : unmanaged { T _e0; Array25 _other; public readonly int Length => 26; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array27 : IArray where T : unmanaged { T _e0; Array26 _other; public readonly int Length => 27; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array28 : IArray where T : unmanaged { T _e0; Array27 _other; public readonly int Length => 28; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array29 : IArray where T : unmanaged { T _e0; Array28 _other; public readonly int Length => 29; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array30 : IArray where T : unmanaged { T _e0; Array29 _other; public readonly int Length => 30; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array31 : IArray where T : unmanaged { T _e0; Array30 _other; public readonly int Length => 31; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array32 : IArray where T : unmanaged { T _e0; Array31 _other; public readonly int Length => 32; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array33 : IArray where T : unmanaged { T _e0; Array32 _other; public readonly int Length => 33; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array34 : IArray where T : unmanaged { T _e0; Array33 _other; public readonly int Length => 34; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array35 : IArray where T : unmanaged { T _e0; Array34 _other; public readonly int Length => 35; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array36 : IArray where T : unmanaged { T _e0; Array35 _other; public readonly int Length => 36; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array37 : IArray where T : unmanaged { T _e0; Array36 _other; public readonly int Length => 37; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array38 : IArray where T : unmanaged { T _e0; Array37 _other; public readonly int Length => 38; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array39 : IArray where T : unmanaged { T _e0; Array38 _other; public readonly int Length => 39; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array40 : IArray where T : unmanaged { T _e0; Array39 _other; public readonly int Length => 40; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array41 : IArray where T : unmanaged { T _e0; Array40 _other; public readonly int Length => 41; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array42 : IArray where T : unmanaged { T _e0; Array41 _other; public readonly int Length => 42; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array43 : IArray where T : unmanaged { T _e0; Array42 _other; public readonly int Length => 43; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array44 : IArray where T : unmanaged { T _e0; Array43 _other; public readonly int Length => 44; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array45 : IArray where T : unmanaged { T _e0; Array44 _other; public readonly int Length => 45; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array46 : IArray where T : unmanaged { T _e0; Array45 _other; public readonly int Length => 46; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array47 : IArray where T : unmanaged { T _e0; Array46 _other; public readonly int Length => 47; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array48 : IArray where T : unmanaged { T _e0; Array47 _other; public readonly int Length => 48; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array49 : IArray where T : unmanaged { T _e0; Array48 _other; public readonly int Length => 49; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array50 : IArray where T : unmanaged { T _e0; Array49 _other; public readonly int Length => 50; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array51 : IArray where T : unmanaged { T _e0; Array50 _other; public readonly int Length => 51; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array52 : IArray where T : unmanaged { T _e0; Array51 _other; public readonly int Length => 52; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array53 : IArray where T : unmanaged { T _e0; Array52 _other; public readonly int Length => 53; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array54 : IArray where T : unmanaged { T _e0; Array53 _other; public readonly int Length => 54; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array55 : IArray where T : unmanaged { T _e0; Array54 _other; public readonly int Length => 55; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array56 : IArray where T : unmanaged { T _e0; Array55 _other; public readonly int Length => 56; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array57 : IArray where T : unmanaged { T _e0; Array56 _other; public readonly int Length => 57; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array58 : IArray where T : unmanaged { T _e0; Array57 _other; public readonly int Length => 58; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array59 : IArray where T : unmanaged { T _e0; Array58 _other; public readonly int Length => 59; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array60 : IArray where T : unmanaged { T _e0; Array59 _other; public readonly int Length => 60; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array61 : IArray where T : unmanaged { T _e0; Array60 _other; public readonly int Length => 61; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array62 : IArray where T : unmanaged { T _e0; Array61 _other; public readonly int Length => 62; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array63 : IArray where T : unmanaged { T _e0; Array62 _other; public readonly int Length => 63; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array64 : IArray where T : unmanaged { T _e0; Array63 _other; public readonly int Length => 64; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array65 : IArray where T : unmanaged { T _e0; Array64 _other; public readonly int Length => 65; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array73 : IArray where T : unmanaged { T _e0; Array64 _other; Array8 _other2; public readonly int Length => 73; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array96 : IArray where T : unmanaged { T _e0; Array64 _other; Array31 _other2; public readonly int Length => 96; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array127 : IArray where T : unmanaged { T _e0; Array64 _other; Array62 _other2; public readonly int Length => 127; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array128 : IArray where T : unmanaged { T _e0; Array64 _other; Array63 _other2; public readonly int Length => 128; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array256 : IArray where T : unmanaged { T _e0; Array128 _other; Array127 _other2; public readonly int Length => 256; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array140 : IArray where T : unmanaged { T _e0; Array64 _other; Array64 _other2; Array11 _other3; public readonly int Length => 140; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } public struct Array384 : IArray where T : unmanaged { T _e0; Array64 _other; Array64 _other2; Array64 _other3; Array64 _other4; Array64 _other5; Array63 _other6; public readonly int Length => 384; public ref T this[int index] => ref AsSpan()[index]; [Pure] public Span AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length); } } #pragma warning restore CS0169, IDE0051