diff options
Diffstat (limited to 'Ryujinx.Graphics.GAL/Multithreading/Model/PinnedSpan.cs')
-rw-r--r-- | Ryujinx.Graphics.GAL/Multithreading/Model/PinnedSpan.cs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/Ryujinx.Graphics.GAL/Multithreading/Model/PinnedSpan.cs b/Ryujinx.Graphics.GAL/Multithreading/Model/PinnedSpan.cs deleted file mode 100644 index 16e148c2..00000000 --- a/Ryujinx.Graphics.GAL/Multithreading/Model/PinnedSpan.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Ryujinx.Graphics.GAL.Multithreading.Model -{ - unsafe struct PinnedSpan<T> where T : unmanaged - { - private void* _ptr; - private int _size; - - public PinnedSpan(ReadOnlySpan<T> span) - { - _ptr = Unsafe.AsPointer(ref MemoryMarshal.GetReference(span)); - _size = span.Length; - } - - public ReadOnlySpan<T> Get() - { - return new ReadOnlySpan<T>(_ptr, _size * Unsafe.SizeOf<T>()); - } - } -} |