1451 lines
49 KiB
HTML
1451 lines
49 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Struct UnsafeList<T> | Misaki.HighPerformance </title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="title" content="Struct UnsafeList<T> | Misaki.HighPerformance ">
|
|
|
|
<meta name="description" content="A collection that allows for unsafe operations on a list of unmanaged types.">
|
|
<link rel="icon" href="../favicon.ico">
|
|
<link rel="stylesheet" href="../public/docfx.min.css">
|
|
<link rel="stylesheet" href="../public/main.css">
|
|
<meta name="docfx:navrel" content="../toc.html">
|
|
<meta name="docfx:tocrel" content="toc.html">
|
|
|
|
<meta name="docfx:rel" content="../">
|
|
|
|
|
|
|
|
<meta name="loc:inThisArticle" content="In this article">
|
|
<meta name="loc:searchResultsCount" content="{count} results for "{query}"">
|
|
<meta name="loc:searchNoResults" content="No results for "{query}"">
|
|
<meta name="loc:tocFilter" content="Filter by title">
|
|
<meta name="loc:nextArticle" content="Next">
|
|
<meta name="loc:prevArticle" content="Previous">
|
|
<meta name="loc:themeLight" content="Light">
|
|
<meta name="loc:themeDark" content="Dark">
|
|
<meta name="loc:themeAuto" content="Auto">
|
|
<meta name="loc:changeTheme" content="Change theme">
|
|
<meta name="loc:copy" content="Copy">
|
|
<meta name="loc:downloadPdf" content="Download PDF">
|
|
|
|
<script type="module" src="./../public/docfx.min.js"></script>
|
|
|
|
<script>
|
|
const theme = localStorage.getItem('theme') || 'auto'
|
|
document.documentElement.setAttribute('data-bs-theme', theme === 'auto' ? (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light') : theme)
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body class="tex2jax_ignore" data-layout="" data-yaml-mime="ManagedReference">
|
|
<header class="bg-body border-bottom">
|
|
<nav id="autocollapse" class="navbar navbar-expand-md" role="navigation">
|
|
<div class="container-xxl flex-nowrap">
|
|
<a class="navbar-brand" href="../index.html">
|
|
<img id="logo" class="svg" src="../logo.svg" alt="Misaki.HighPerformance">
|
|
Misaki.HighPerformance
|
|
</a>
|
|
<button class="btn btn-lg d-md-none border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navpanel" aria-controls="navpanel" aria-expanded="false" aria-label="Toggle navigation">
|
|
<i class="bi bi-three-dots"></i>
|
|
</button>
|
|
<div class="collapse navbar-collapse" id="navpanel">
|
|
<div id="navbar">
|
|
<form class="search" role="search" id="search">
|
|
<i class="bi bi-search"></i>
|
|
<input class="form-control" id="search-query" type="search" disabled placeholder="Search" autocomplete="off" aria-label="Search">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</nav>
|
|
</header>
|
|
|
|
<main class="container-xxl">
|
|
<div class="toc-offcanvas">
|
|
<div class="offcanvas-md offcanvas-start" tabindex="-1" id="tocOffcanvas" aria-labelledby="tocOffcanvasLabel">
|
|
<div class="offcanvas-header">
|
|
<h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" data-bs-target="#tocOffcanvas" aria-label="Close"></button>
|
|
</div>
|
|
<div class="offcanvas-body">
|
|
<nav class="toc" id="toc"></nav>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="content">
|
|
<div class="actionbar">
|
|
<button class="btn btn-lg border-0 d-md-none" type="button" data-bs-toggle="offcanvas" data-bs-target="#tocOffcanvas" aria-controls="tocOffcanvas" aria-expanded="false" aria-label="Show table of contents">
|
|
<i class="bi bi-list"></i>
|
|
</button>
|
|
|
|
<nav id="breadcrumb"></nav>
|
|
</div>
|
|
|
|
<article data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1">
|
|
|
|
|
|
|
|
<h1 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1" class="text-break">
|
|
Struct UnsafeList<T>
|
|
</h1>
|
|
|
|
<div class="facts text-secondary">
|
|
<dl><dt>Namespace</dt><dd><a class="xref" href="Misaki.html">Misaki</a>.<a class="xref" href="Misaki.HighPerformance.html">HighPerformance</a>.<a class="xref" href="Misaki.HighPerformance.LowLevel.html">LowLevel</a>.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.html">Collections</a></dd></dl>
|
|
<dl><dt>Assembly</dt><dd>Misaki.HighPerformance.LowLevel.dll</dd></dl>
|
|
</div>
|
|
|
|
<div class="markdown summary"><p>A collection that allows for unsafe operations on a list of unmanaged types.</p>
|
|
</div>
|
|
<div class="markdown conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public struct UnsafeList<T> : IUnsafeCollection<T>, IUnsafeCollection, IDisposable where T : unmanaged</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
<h4 class="section">Type Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>T</code></dt>
|
|
<dd><p>Represents a type that can be stored in the collection, constrained to unmanaged types for performance and safety.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<dl class="typelist implements">
|
|
<dt>Implements</dt>
|
|
<dd>
|
|
<div><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.Contracts.IUnsafeCollection-1.html">IUnsafeCollection</a><T></div>
|
|
<div><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.Contracts.IUnsafeCollection.html">IUnsafeCollection</a></div>
|
|
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
<dl class="typelist inheritedMembers">
|
|
<dt>Inherited Members</dt>
|
|
<dd>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.equals">ValueType.Equals(object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.gethashcode">ValueType.GetHashCode()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.valuetype.tostring">ValueType.ToString()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object, object)</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>
|
|
</div>
|
|
<div>
|
|
<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object, object)</a>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="constructors">Constructors
|
|
</h2>
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1__ctor_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.#ctor*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1__ctor" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.#ctor">
|
|
UnsafeList()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Initializes a new instance of UnsafeList with a default size of 1 and a persistent allocation handle.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public UnsafeList()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1__ctor_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.#ctor*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1__ctor_System_Int32_Misaki_HighPerformance_LowLevel_Buffer_AllocationHandle_Misaki_HighPerformance_LowLevel_Buffer_AllocationOption_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.#ctor(System.Int32,Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle,Misaki.HighPerformance.LowLevel.Buffer.AllocationOption)">
|
|
UnsafeList(int, AllocationHandle, AllocationOption)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Initializes a new instance of UnsafeList with a specified number of initial capacity and an allocation handle.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public UnsafeList(int capacity, AllocationHandle handle, AllocationOption allocationOption = AllocationOption.None)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>capacity</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>Specifies the number of initial capacity to allocate in the list, which must be greater than zero.</p>
|
|
</dd>
|
|
<dt><code>handle</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationHandle.html">AllocationHandle</a></dt>
|
|
<dd><p>A reference to an AllocationHandle that manages the memory allocation for the array.</p>
|
|
</dd>
|
|
<dt><code>allocationOption</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationOption.html">AllocationOption</a></dt>
|
|
<dd><p>Specifies how the memory should be allocated.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="properties">Properties
|
|
</h2>
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Capacity_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Capacity*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Capacity" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Capacity">
|
|
Capacity
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly int Capacity { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Count_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Count*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Count" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Count">
|
|
Count
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Gets the number of elements in a collection.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly int Count { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_IsCreated_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.IsCreated*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_IsCreated" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.IsCreated">
|
|
IsCreated
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Indicates whether the object has been created. Returns true if the object is created, otherwise false.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly bool IsCreated { get; }</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_IsCreated_remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>If MHP_ENABLE_STACKTRACE is not defined, this property will only check if the underlying pointer is not null, which may not be sufficient to determine if the collection is fully initialized and ready for use.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Item_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Item*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Item_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Item(System.Int32)">
|
|
this[int]
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly ref T this[int index] { get; }</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">T</span></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Item_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Item*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Item_System_UInt32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Item(System.UInt32)">
|
|
this[uint]
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly ref T this[uint index] { get; }</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.uint32">uint</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Property Value</h4>
|
|
<dl class="parameters">
|
|
<dt><span class="xref">T</span></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h2 class="section" id="methods">Methods
|
|
</h2>
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Add_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Add*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Add__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Add(`0@)">
|
|
Add(scoped in T)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Adds a new element to the end of the list, resizing the internal array if necessary.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Add(scoped in T value)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>value</code> <span class="xref">T</span></dt>
|
|
<dd><p>The element to be added to the list.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddNoResize_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddNoResize*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddNoResize__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddNoResize(`0@)">
|
|
AddNoResize(scoped in T)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Adds the specified value to the collection without resizing the underlying storage.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void AddNoResize(scoped in T value)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>value</code> <span class="xref">T</span></dt>
|
|
<dd><p>The value to add to the collection.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddRange_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddRange*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddRange_System_ReadOnlySpan__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddRange(System.ReadOnlySpan{`0})">
|
|
AddRange(ReadOnlySpan<T>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Adds a range of elements to the collection.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void AddRange(ReadOnlySpan<T> values)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>values</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.readonlyspan-1">ReadOnlySpan</a><T></dt>
|
|
<dd><p>A span containing the elements to add.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddRange_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddRange*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddRange__0__System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddRange(`0*,System.Int32)">
|
|
AddRange(T*, int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Adds a range of elements from a pointer to the collection.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void AddRange(T* ptr, int count)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>ptr</code> T*</dt>
|
|
<dd><p>Points to the source data to be copied into the collection.</p>
|
|
</dd>
|
|
<dt><code>count</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>Indicates the number of elements to be added from the source data.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddRangeNoResize_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddRangeNoResize*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddRangeNoResize_System_ReadOnlySpan__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddRangeNoResize(System.ReadOnlySpan{`0})">
|
|
AddRangeNoResize(ReadOnlySpan<T>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Adds the elements of the specified collection to the current list without resizing the underlying storage.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void AddRangeNoResize(ReadOnlySpan<T> collection)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>collection</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.readonlyspan-1">ReadOnlySpan</a><T></dt>
|
|
<dd><p>A read-only span containing the elements to add. The span must not exceed the available capacity.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddRangeNoResize_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddRangeNoResize*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AddRangeNoResize__0__System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AddRangeNoResize(`0*,System.Int32)">
|
|
AddRangeNoResize(T*, int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Adds a range of elements from a pointer to the collection without resizing the underlying storage.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void AddRangeNoResize(T* ptr, int count)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>ptr</code> T*</dt>
|
|
<dd><p>Points to the source data to be copied into the collection.</p>
|
|
</dd>
|
|
<dt><code>count</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>Indicates the number of elements to be added from the source data.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsParallelReader_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsParallelReader*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsParallelReader" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsParallelReader">
|
|
AsParallelReader()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Provides a parallel reader for the current list, enabling thread-safe read operations.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public UnsafeList<T>.ParallelReader AsParallelReader()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.html">UnsafeList</a><T>.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.ParallelReader.html">ParallelReader</a></dt>
|
|
<dd><p>A <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.ParallelReader.html">UnsafeList<T>.ParallelReader</a> instance that can be used to read items from the list in a thread-safe manner.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsParallelReader_remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>The list must live at least as long as the parallel reader, and the parallel reader must not be used after the list is disposed.
|
|
For example, if you need to access the list in job system and wait that job in another stack frame, please always allocate the list struct itself on heap.
|
|
Otherwise the parallel reader will be invalid after the stack frame that creates the list is popped, even if the list's internal array is still valid.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsParallelWriter_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsParallelWriter*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsParallelWriter" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsParallelWriter">
|
|
AsParallelWriter()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Provides a parallel writer for the current list, enabling thread-safe additions to the list.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public UnsafeList<T>.ParallelWriter AsParallelWriter()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.html">UnsafeList</a><T>.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.ParallelWriter.html">ParallelWriter</a></dt>
|
|
<dd><p>A <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.ParallelWriter.html">UnsafeList<T>.ParallelWriter</a> instance that can be used to add items to the list in a thread-safe manner.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsParallelWriter_remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>The list must live at least as long as the parallel writer, and the parallel writer must not be used after the list is disposed.
|
|
For example, if you need to access the list in job system and wait that job in another stack frame, please always allocate the list struct itself on heap.
|
|
Otherwise the parallel writer will be invalid after the stack frame that creates the list is popped, even if the list's internal array is still valid.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsReadOnly_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsReadOnly*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsReadOnly" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsReadOnly">
|
|
AsReadOnly()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Converts the current list to a read-only collection that provides unsafe access to its elements.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly ReadOnlyUnsafeCollection<T> AsReadOnly()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.ReadOnlyUnsafeCollection-1.html">ReadOnlyUnsafeCollection</a><T></dt>
|
|
<dd><p>A new <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.ReadOnlyUnsafeCollection-1.html">ReadOnlyUnsafeCollection<T></a> instance that allows for read-only access to the list's elements without copying.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsSpan_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsSpan*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsSpan" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsSpan">
|
|
AsSpan()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly Span<T> AsSpan()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.span-1">Span</a><T></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsSpan_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsSpan*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsSpan_System_Int32_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsSpan(System.Int32,System.Int32)">
|
|
AsSpan(int, int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly Span<T> AsSpan(int start, int length)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>start</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
<dt><code>length</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.span-1">Span</a><T></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsUnsafeArray_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsUnsafeArray*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsUnsafeArray" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.AsUnsafeArray">
|
|
AsUnsafeArray()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Converts the current list to an UnsafeArray representation.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly UnsafeArray<T> AsUnsafeArray()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeArray-1.html">UnsafeArray</a><T></dt>
|
|
<dd><p>A new <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeArray-1.html">UnsafeArray<T></a> instance.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_AsUnsafeArray_remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>The returned <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeArray-1.html">UnsafeArray<T></a> shares the same underlying data as the list and does not own the memory.</p>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Clear_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Clear*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Clear" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Clear">
|
|
Clear()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Removes all elements from the collection. The collection will be empty after this operation.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Clear()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_CopyFrom_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.CopyFrom*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_CopyFrom_System_ReadOnlySpan__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.CopyFrom(System.ReadOnlySpan{`0})">
|
|
CopyFrom(ReadOnlySpan<T>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Copies elements from a source span to a destination unsafe collection, ensuring both have the same size.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void CopyFrom(ReadOnlySpan<T> source)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>source</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.readonlyspan-1">ReadOnlySpan</a><T></dt>
|
|
<dd><p>Represents the span containing the elements to be copied to the unsafe collection.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_CopyFrom_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.CopyFrom*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_CopyFrom_System_ReadOnlySpan__0__System_Int32_System_Int32_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.CopyFrom(System.ReadOnlySpan{`0},System.Int32,System.Int32,System.Int32)">
|
|
CopyFrom(ReadOnlySpan<T>, int, int, int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Copies a specified range of elements from a source span to a destination collection.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void CopyFrom(ReadOnlySpan<T> source, int sourceIndex, int destinationIndex, int length)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>source</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.readonlyspan-1">ReadOnlySpan</a><T></dt>
|
|
<dd><p>The span containing the elements to be copied.</p>
|
|
</dd>
|
|
<dt><code>sourceIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The starting index in the source span from which to begin copying.</p>
|
|
</dd>
|
|
<dt><code>destinationIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The starting index in the destination collection where the elements will be placed.</p>
|
|
</dd>
|
|
<dt><code>length</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The number of elements to copy from the source span to the destination collection.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
|
|
<dd><p>Thrown when the specified range exceeds the bounds of the source span or destination collection.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_CopyTo_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.CopyTo*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_CopyTo_System_Span__0__" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.CopyTo(System.Span{`0})">
|
|
CopyTo(Span<T>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Copies elements from a source UnsafeCollection to a destination Span, ensuring both have the same size.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly void CopyTo(Span<T> destination)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>destination</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.span-1">Span</a><T></dt>
|
|
<dd><p>Represents the target span where elements are copied to.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_CopyTo_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.CopyTo*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_CopyTo_System_Span__0__System_Int32_System_Int32_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.CopyTo(System.Span{`0},System.Int32,System.Int32,System.Int32)">
|
|
CopyTo(Span<T>, int, int, int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Copies a range of elements from a source collection to a destination span, ensuring both are adequately sized.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly void CopyTo(Span<T> destination, int sourceIndex, int destinationIndex, int length)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>destination</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.span-1">Span</a><T></dt>
|
|
<dd><p>The span where the elements will be copied to.</p>
|
|
</dd>
|
|
<dt><code>sourceIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The starting index in the source collection for the copy operation.</p>
|
|
</dd>
|
|
<dt><code>destinationIndex</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The starting index in the destination span where the elements will be placed.</p>
|
|
</dd>
|
|
<dt><code>length</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The number of elements to copy from the source to the destination.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
|
|
<dd><p>Thrown when the specified range exceeds the bounds of the source collection or destination span.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Dispose_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Dispose*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Dispose" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Dispose">
|
|
Dispose()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Dispose()</code></pre>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_GetEnumerator_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.GetEnumerator*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_GetEnumerator" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.GetEnumerator">
|
|
GetEnumerator()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">[UnscopedRef]
|
|
public UnsafeList<T>.Enumerator GetEnumerator()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.html">UnsafeList</a><T>.<a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.Enumerator.html">Enumerator</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_GetUnsafePtr_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.GetUnsafePtr*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_GetUnsafePtr" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.GetUnsafePtr">
|
|
GetUnsafePtr()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Returns a pointer to an unmanaged memory location. This pointer can be used for low-level memory operations.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly void* GetUnsafePtr()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.void">void</a>*</dt>
|
|
<dd><p>The method returns a void pointer to the unsafe memory location.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_RemoveAt_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.RemoveAt*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_RemoveAt_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.RemoveAt(System.Int32)">
|
|
RemoveAt(int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Removes the element at the specified index from the collection.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void RemoveAt(int index)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The zero-based index of the element to remove.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_RemoveAtSwapBack_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.RemoveAtSwapBack*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_RemoveAtSwapBack_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.RemoveAtSwapBack(System.Int32)">
|
|
RemoveAtSwapBack(int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void RemoveAtSwapBack(int index)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>index</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_RemoveRange_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.RemoveRange*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_RemoveRange_System_Int32_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.RemoveRange(System.Int32,System.Int32)">
|
|
RemoveRange(int, int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Removes a range of elements from the list starting at the specified index.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void RemoveRange(int start, int length)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>start</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The zero-based index at which to start removing elements.</p>
|
|
</dd>
|
|
<dt><code>length</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The number of elements to remove.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_RemoveRangeSwapBack_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.RemoveRangeSwapBack*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_RemoveRangeSwapBack_System_Int32_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.RemoveRangeSwapBack(System.Int32,System.Int32)">
|
|
RemoveRangeSwapBack(int, int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Removes a range of elements from the list starting at the specified index by swapping them with the last elements.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void RemoveRangeSwapBack(int start, int length)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>start</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The zero-based index at which to start removing elements.</p>
|
|
</dd>
|
|
<dt><code>length</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The number of elements to remove.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Resize_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Resize*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_Resize_System_Int32_Misaki_HighPerformance_LowLevel_Buffer_AllocationOption_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.Resize(System.Int32,Misaki.HighPerformance.LowLevel.Buffer.AllocationOption)">
|
|
Resize(int, AllocationOption)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Changes the size of a collection to the specified value.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void Resize(int newSize, AllocationOption option = AllocationOption.None)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>newSize</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>Specifies the new size to which the collection should be adjusted.</p>
|
|
</dd>
|
|
<dt><code>option</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Buffer.AllocationOption.html">AllocationOption</a></dt>
|
|
<dd><p>Specifies allocation options that may affect how memory is managed during the resize operation.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_ToList_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.ToList*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_ToList" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.ToList">
|
|
ToList()
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List<T></a> containing the elements.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public readonly List<T> ToList()</code></pre>
|
|
</div>
|
|
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List</a><T></dt>
|
|
<dd><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1">List<T></a> containing all elements.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_UnsafeSetCount_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.UnsafeSetCount*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_UnsafeSetCount_System_Int32_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.UnsafeSetCount(System.Int32)">
|
|
UnsafeSetCount(int)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"><p>Sets the count of the collection to a new value without modifying the underlying storage.</p>
|
|
</div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public void UnsafeSetCount(int newCount)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>newCount</code> <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></dt>
|
|
<dd><p>The new count value to set for the collection.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4 class="section" id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_UnsafeSetCount_System_Int32__remarks">Remarks</h4>
|
|
<div class="markdown level1 remarks"><p>This method will not initialize new elements, so it should be used with caution. The new count must be between 0 and the current capacity of the collection.</p>
|
|
</div>
|
|
|
|
<h4 class="section">Exceptions</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></dt>
|
|
<dd><p>Thrown when the new count is outside the valid range.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
|
|
|
|
<h2 class="section" id="operators">Operators
|
|
</h2>
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_op_Implicit_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.op_Implicit*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_op_Implicit_Misaki_HighPerformance_LowLevel_Collections_UnsafeList__0___Misaki_HighPerformance_LowLevel_Collections_ReadOnlyUnsafeCollection__0_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.op_Implicit(Misaki.HighPerformance.LowLevel.Collections.UnsafeList{`0})~Misaki.HighPerformance.LowLevel.Collections.ReadOnlyUnsafeCollection{`0}">
|
|
implicit operator ReadOnlyUnsafeCollection<T>(UnsafeList<T>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static implicit operator ReadOnlyUnsafeCollection<T>(UnsafeList<T> list)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>list</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.html">UnsafeList</a><T></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.ReadOnlyUnsafeCollection-1.html">ReadOnlyUnsafeCollection</a><T></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_op_Implicit_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.op_Implicit*"></a>
|
|
|
|
<h3 id="Misaki_HighPerformance_LowLevel_Collections_UnsafeList_1_op_Implicit_Misaki_HighPerformance_LowLevel_Collections_UnsafeList__0___System_Span__0_" data-uid="Misaki.HighPerformance.LowLevel.Collections.UnsafeList`1.op_Implicit(Misaki.HighPerformance.LowLevel.Collections.UnsafeList{`0})~System.Span{`0}">
|
|
implicit operator Span<T>(UnsafeList<T>)
|
|
|
|
</h3>
|
|
|
|
<div class="markdown level1 summary"></div>
|
|
<div class="markdown level1 conceptual"></div>
|
|
|
|
<div class="codewrapper">
|
|
<pre><code class="lang-csharp hljs">public static implicit operator Span<T>(UnsafeList<T> list)</code></pre>
|
|
</div>
|
|
|
|
<h4 class="section">Parameters</h4>
|
|
<dl class="parameters">
|
|
<dt><code>list</code> <a class="xref" href="Misaki.HighPerformance.LowLevel.Collections.UnsafeList-1.html">UnsafeList</a><T></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
<h4 class="section">Returns</h4>
|
|
<dl class="parameters">
|
|
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.span-1">Span</a><T></dt>
|
|
<dd></dd>
|
|
</dl>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</article>
|
|
|
|
<div class="contribution d-print-none">
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="affix">
|
|
<nav id="affix"></nav>
|
|
</div>
|
|
</main>
|
|
|
|
<div class="container-xxl search-results" id="search-results"></div>
|
|
|
|
<footer class="border-top text-secondary">
|
|
<div class="container-xxl">
|
|
<div class="flex-fill">
|
|
<span>Made with <a href="https://dotnet.github.io/docfx">docfx</a></span>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</body>
|
|
</html>
|