forked from MeloNX/MeloNX
* Impl first attempt to LDN * Make this work. - Endianness swap on all IPs. - Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever. - Mac addresses are now randomly assigned on the server. (fixes joining lobbies) - Fixed the "connected" handler for stations to actually find a - Added info retrieval when connected to a station. - Users that disconnect are now removed from rooms they were in. (still need to broadcast tho) - The communication service does a bit better with being closed now. - Some locking around the game instance dictionary. * We may just be "initialized". Ignore this for now. * Lots of WIP * Add Disconnect packet * Improve signalling of internal events. * Fix scan. * Fix some more stupid things. * Enable NoDelay on all sockets. * Add station accept policy, disconnect function. * Limit max number of games. * Split out networking stuff from HLE, so it can be swapped. * Update logging calls. * Missed a spot. * Call SignalDisconnect instead of SetState * Add comment to GetNetworkInfo * Update configuration + UI Now has its own tab, more options. * Refactoring IUserLocalCommunicationService ( Expected new issues :'( ) * some cleanup * More fix * Correctly handle errors when connecting. * Disable *Private call and clean symbols * Structs cleanup * Big cleanup * Fix InvalidHandle (in MK8D and other games) * Add Reject and Private Network support (v1) RyuLdn Version bumped to 1. * Add Initialize Packet Allows users to keep Mac Addresses assigned by the server. * Add SetWirelessControllerRestriction and some cleanup * LDN-2 Initial Rebase Make this work. - Endianness swap on all IPs. - Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever. - Fixed the "connected" handler for stations to actually find a - The communication service does a bit better with being closed now. - Some locking around the game instance dictionary. We may just be "initialized". Ignore this for now. Lots of WIP Implement scan filter. Improve signalling of internal events. Fix scan. Fix 0 width data, scan reply end delay removed. Fix some more stupid things. Enable NoDelay on all sockets. Add station accept policy, disconnect function. Limit max number of games. Split out networking stuff from HLE, so it can be swapped. Update logging calls. Missed a spot. SetAdvertiseData when open, don't return games that have accept policy 1 Update configuration + UI Now has its own tab, more options. Don't Keepalive, it causes problems. Refactoring IUserLocalCommunicationService ( Expected new issues :'( ) some cleanup More fix Correctly handle errors when connecting. Disable *Private call and clean symbols Structs cleanup Big cleanup Fix InvalidHandle (in MK8D and other games) Add Reject and Private Network support (v1) Disable TcpNoDelay option on linux. Add SetWirelessControllerRestriction and some cleanup Misc cleanup, implement broadcast flag. * Misc Changes * Fix GetNetworkInfo * Fix some small issues * Implement GetNetworkInfoLatestUpdate * Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF * Fix ARMS Scan (and other games using wrong LocalCommunicationId * Fix latest update when host leaves * Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId" This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75. * Fix the localCommunicationId = -1 * Don't set Connect flag for nodes already in the room before joining. * Make IUserLocalCommunicationService disposable * Don't dispose if there's no client. * LDN-2-2 Rebase Make this work. - Endianness swap on all IPs. - Use local network IP for connections, rather than 127.0.0.1. This is to be changed when tunnelling or whatever. - Fixed the "connected" handler for stations to actually find a - The communication service does a bit better with being closed now. - Some locking around the game instance dictionary. We may just be "initialized". Ignore this for now. Put sockets behind an interface, so that they can be swapped for something proxyable Lots of WIP Implement scan filter. Improve signalling of internal events. Fix scan. Fix 0 width data, scan reply end delay removed. Fix some more stupid things. Enable NoDelay on all sockets. Add station accept policy, disconnect function. Limit max number of games. Split out networking stuff from HLE, so it can be swapped. Update logging calls. Missed a spot. SetAdvertiseData when open, don't return games that have accept policy 1 Update configuration + UI Now has its own tab, more options. Don't Keepalive, it causes problems. Refactoring IUserLocalCommunicationService ( Expected new issues :'( ) some cleanup More fix Correctly handle errors when connecting. Disable *Private call and clean symbols Structs cleanup Big cleanup Fix InvalidHandle (in MK8D and other games) Add Reject and Private Network support (v1) Disable TcpNoDelay option on linux. Add SetWirelessControllerRestriction and some cleanup Misc cleanup, implement broadcast flag. Misc Changes Fix GetNetworkInfo Fix some small issues Disable LAN by default til the config is added. Fix Splatoon 2 - Stub nfp IUser::StartDetection / IUser::StopDetection. - Stub ntc IEnsureNetworkClockAvailabilityService and needed calls. Cleanup previous fixes Stub IAudioInManager/IAudioIn for Splatoon 2 LAN Add LAN settings to multiplayer tab LAN Play > LAN Mode Implement GetNetworkInfoLatestUpdate Hotfix when LocalCommunicationId = 0xFFFFFFFFFFFFFFFF Fix ARMS Scan (and other games using wrong LocalCommunicationId Fix latest update when host leaves Revert "Fix ARMS Scan (and other games using wrong LocalCommunicationId" This reverts commit 519c283d3993e2fdfafb8ac6b4e0a98231f6fb75. Fix the localCommunicationId = -1 Don't set Connect flag for nodes already in the room before joining. Make IUserLocalCommunicationService disposable Fix crash when using LAN mode on linux. Actually use that call Don't dispose if there's no client. Fix the settings window crash Fix configurationFileUpdated * Make LDN compatible with Ryujinx/Ryujinx#3805 * Ava: Add Ldn options to SettingsNetworkTab * Ava: Add update events for multiplayer options * Apply formatting * Remove LdnHelper * ldn: Fix hardcoded /24 subnet mask * Fix naming rule violations * Add missing summary doc tag * Remove NetCoreServer dependency * Address code style issues and typos Co-authored-by: gdkchan <gab.dark.100@gmail.com> * Call CloseStation/CloseAccessPoint to reduce code duplication * Fix typo Co-authored-by: gdkchan <gab.dark.100@gmail.com> * Fix missing trailing commas * Extract AddressList from AddressEntry * Use AcceptPolicy as a type for LdnNetworkInfo.StationAcceptPolicy * Add Flags attribute to ScanFilterFlag * Rename struct members for LdnNetworkInfo * Remove extra line Co-authored-by: Ac_K <Acoustik666@gmail.com> * Extract NetworkErrorMessage from NetworkError * Fix missing trailing commas --------- Co-authored-by: Ac_K <Acoustik666@gmail.com> Co-authored-by: riperiperi <rhy3756547@hotmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com>
825 lines
22 KiB
C#
825 lines
22 KiB
C#
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<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
public readonly int Length => 1;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array2<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array1<T> _other;
|
|
public readonly int Length => 2;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array3<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array2<T> _other;
|
|
public readonly int Length => 3;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array4<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array3<T> _other;
|
|
public readonly int Length => 4;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array5<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array4<T> _other;
|
|
public readonly int Length => 5;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array6<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array5<T> _other;
|
|
public readonly int Length => 6;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array7<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array6<T> _other;
|
|
public readonly int Length => 7;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array8<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array7<T> _other;
|
|
public readonly int Length => 8;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array9<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array8<T> _other;
|
|
public readonly int Length => 9;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array10<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array9<T> _other;
|
|
public readonly int Length => 10;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array11<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array10<T> _other;
|
|
public readonly int Length => 11;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array12<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array11<T> _other;
|
|
public readonly int Length => 12;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array13<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array12<T> _other;
|
|
public readonly int Length => 13;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array14<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array13<T> _other;
|
|
public readonly int Length => 14;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array15<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array14<T> _other;
|
|
public readonly int Length => 15;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array16<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array15<T> _other;
|
|
public readonly int Length => 16;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array17<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array16<T> _other;
|
|
public readonly int Length => 17;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array18<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array17<T> _other;
|
|
public readonly int Length => 18;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array19<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array18<T> _other;
|
|
public readonly int Length => 19;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array20<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array19<T> _other;
|
|
public readonly int Length => 20;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array21<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array20<T> _other;
|
|
public readonly int Length => 21;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array22<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array21<T> _other;
|
|
public readonly int Length => 22;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array23<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array22<T> _other;
|
|
public readonly int Length => 23;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array24<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array23<T> _other;
|
|
|
|
public readonly int Length => 24;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array25<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array24<T> _other;
|
|
|
|
public readonly int Length => 25;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array26<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array25<T> _other;
|
|
|
|
public readonly int Length => 26;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array27<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array26<T> _other;
|
|
|
|
public readonly int Length => 27;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array28<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array27<T> _other;
|
|
|
|
public readonly int Length => 28;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array29<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array28<T> _other;
|
|
|
|
public readonly int Length => 29;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array30<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array29<T> _other;
|
|
|
|
public readonly int Length => 30;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array31<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array30<T> _other;
|
|
|
|
public readonly int Length => 31;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array32<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array31<T> _other;
|
|
|
|
public readonly int Length => 32;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array33<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array32<T> _other;
|
|
|
|
public readonly int Length => 33;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array34<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array33<T> _other;
|
|
|
|
public readonly int Length => 34;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array35<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array34<T> _other;
|
|
|
|
public readonly int Length => 35;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array36<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array35<T> _other;
|
|
|
|
public readonly int Length => 36;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array37<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array36<T> _other;
|
|
|
|
public readonly int Length => 37;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array38<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array37<T> _other;
|
|
|
|
public readonly int Length => 38;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array39<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array38<T> _other;
|
|
|
|
public readonly int Length => 39;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array40<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array39<T> _other;
|
|
|
|
public readonly int Length => 40;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array41<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array40<T> _other;
|
|
|
|
public readonly int Length => 41;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array42<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array41<T> _other;
|
|
|
|
public readonly int Length => 42;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array43<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array42<T> _other;
|
|
|
|
public readonly int Length => 43;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array44<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array43<T> _other;
|
|
|
|
public readonly int Length => 44;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array45<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array44<T> _other;
|
|
|
|
public readonly int Length => 45;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array46<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array45<T> _other;
|
|
|
|
public readonly int Length => 46;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array47<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array46<T> _other;
|
|
|
|
public readonly int Length => 47;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array48<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array47<T> _other;
|
|
|
|
public readonly int Length => 48;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array49<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array48<T> _other;
|
|
|
|
public readonly int Length => 49;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array50<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array49<T> _other;
|
|
|
|
public readonly int Length => 50;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array51<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array50<T> _other;
|
|
|
|
public readonly int Length => 51;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array52<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array51<T> _other;
|
|
|
|
public readonly int Length => 52;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array53<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array52<T> _other;
|
|
|
|
public readonly int Length => 53;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array54<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array53<T> _other;
|
|
|
|
public readonly int Length => 54;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array55<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array54<T> _other;
|
|
|
|
public readonly int Length => 55;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array56<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array55<T> _other;
|
|
|
|
public readonly int Length => 56;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array57<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array56<T> _other;
|
|
|
|
public readonly int Length => 57;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array58<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array57<T> _other;
|
|
|
|
public readonly int Length => 58;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array59<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array58<T> _other;
|
|
|
|
public readonly int Length => 59;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array60<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array59<T> _other;
|
|
public readonly int Length => 60;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array61<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array60<T> _other;
|
|
public readonly int Length => 61;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array62<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array61<T> _other;
|
|
public readonly int Length => 62;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array63<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array62<T> _other;
|
|
public readonly int Length => 63;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array64<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array63<T> _other;
|
|
public readonly int Length => 64;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array73<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array64<T> _other;
|
|
Array8<T> _other2;
|
|
public readonly int Length => 73;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array127<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array64<T> _other;
|
|
Array62<T> _other2;
|
|
public readonly int Length => 127;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array128<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array64<T> _other;
|
|
Array63<T> _other2;
|
|
public readonly int Length => 128;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array256<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array128<T> _other;
|
|
Array127<T> _other2;
|
|
public readonly int Length => 256;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array140<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array64<T> _other;
|
|
Array64<T> _other2;
|
|
Array11<T> _other3;
|
|
public readonly int Length => 140;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
|
|
public struct Array384<T> : IArray<T> where T : unmanaged
|
|
{
|
|
T _e0;
|
|
Array64<T> _other;
|
|
Array64<T> _other2;
|
|
Array64<T> _other3;
|
|
Array64<T> _other4;
|
|
Array64<T> _other5;
|
|
Array63<T> _other6;
|
|
public readonly int Length => 384;
|
|
public ref T this[int index] => ref AsSpan()[index];
|
|
|
|
[Pure]
|
|
public Span<T> AsSpan() => MemoryMarshal.CreateSpan(ref _e0, Length);
|
|
}
|
|
}
|
|
#pragma warning restore CS0169, IDE0051
|