Fix package dependency problem
All checks were successful
Publish NuGet Packages / publish (push) Successful in 1m47s
All checks were successful
Publish NuGet Packages / publish (push) Successful in 1m47s
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
global using static Misaki.HighPerformance.LowLevel.Utilities.MemoryUtility;
|
||||
|
||||
|
||||
global using static Misaki.HighPerformance.LowLevel.Utilities.MemoryUtility;
|
||||
global using unsafe AllocFunc = delegate*<void*, nuint, nuint, Misaki.HighPerformance.LowLevel.Buffer.AllocationOption, void*>;
|
||||
global using unsafe FreeFunc = delegate*<void*, void*, void>;
|
||||
global using unsafe ReallocFunc = delegate*<void*, void*, nuint, nuint, nuint, Misaki.HighPerformance.LowLevel.Buffer.AllocationOption, void*>;
|
||||
global using unsafe FreeFunc = delegate*<void*, void*, void>;
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Misaki.HighPerformance.LowLevel.Buffer;
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Misaki.HighPerformance.LowLevel.Buffer;
|
||||
/// Represents an allocated memory block with metadata.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public unsafe readonly struct MemoryBlock
|
||||
public readonly unsafe struct MemoryBlock
|
||||
{
|
||||
/// <summary>
|
||||
/// Pointer to the actual allocated memory.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
|
||||
namespace Misaki.HighPerformance.LowLevel.Collections.Contracts;
|
||||
|
||||
@@ -7,7 +7,7 @@ public unsafe interface IUnsafeCollection : IDisposable
|
||||
/// <summary>
|
||||
/// Indicates whether the object has been created. Returns true if the object is created, otherwise false.
|
||||
/// </summary>
|
||||
public bool IsCreated
|
||||
bool IsCreated
|
||||
{
|
||||
get;
|
||||
}
|
||||
@@ -15,13 +15,13 @@ public unsafe interface IUnsafeCollection : IDisposable
|
||||
/// <summary>
|
||||
/// Removes all elements from the collection. The collection will be empty after this operation.
|
||||
/// </summary>
|
||||
public void Clear();
|
||||
void Clear();
|
||||
|
||||
/// <summary>
|
||||
/// Returns a pointer to an unmanaged memory location. This pointer can be used for low-level memory operations.
|
||||
/// </summary>
|
||||
/// <returns>The method returns a void pointer to the unsafe memory location.</returns>
|
||||
public void* GetUnsafePtr();
|
||||
void* GetUnsafePtr();
|
||||
}
|
||||
|
||||
public unsafe interface IUnsafeCollection<T> : IUnsafeCollection, IEnumerable<T>
|
||||
@@ -30,7 +30,7 @@ public unsafe interface IUnsafeCollection<T> : IUnsafeCollection, IEnumerable<T>
|
||||
/// <summary>
|
||||
/// Gets the number of elements in a collection. The value is read-only.
|
||||
/// </summary>
|
||||
public int Count
|
||||
int Count
|
||||
{
|
||||
get;
|
||||
}
|
||||
@@ -40,7 +40,7 @@ public unsafe interface IUnsafeCollection<T> : IUnsafeCollection, IEnumerable<T>
|
||||
/// </summary>
|
||||
/// <remarks>This is to adjust the element count of the collection, not the size of the underlying buffer in memory.</remarks>
|
||||
/// <param name="newSize">Specifies the new size to which the collection should be adjusted.</param>
|
||||
public void Resize(int newSize, AllocationOption option);
|
||||
void Resize(int newSize, AllocationOption option);
|
||||
}
|
||||
|
||||
public unsafe interface IUnTypedCollection : IUnsafeCollection
|
||||
@@ -48,11 +48,11 @@ public unsafe interface IUnTypedCollection : IUnsafeCollection
|
||||
/// <summary>
|
||||
/// The total size of the buffer in bytes.
|
||||
/// </summary>
|
||||
public uint Size
|
||||
uint Size
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public ref T GetElementAt<T>(uint index)
|
||||
ref T GetElementAt<T>(uint index)
|
||||
where T : unmanaged;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
using Misaki.HighPerformance.LowLevel.Collections.Contracts;
|
||||
using Misaki.HighPerformance.LowLevel.Contracts;
|
||||
using Misaki.HighPerformance.LowLevel.Utilities;
|
||||
@@ -93,7 +93,7 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(capacity), "Capacity must be greater than zero.");
|
||||
}
|
||||
|
||||
|
||||
_data = new UnsafeArray<SlotData>(capacity, ref handle, allocationOption);
|
||||
_freeSlots = new UnsafeQueue<int>(capacity, ref handle, allocationOption);
|
||||
_count = 0;
|
||||
@@ -266,7 +266,7 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
|
||||
|
||||
ref var slot = ref _data[slotIndex];
|
||||
|
||||
if (!slot.isValid|| slot.generation != generation)
|
||||
if (!slot.isValid || slot.generation != generation)
|
||||
{
|
||||
exist = false;
|
||||
return ref Unsafe.NullRef<T>();
|
||||
@@ -292,7 +292,7 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
|
||||
_count = 0;
|
||||
}
|
||||
|
||||
public unsafe readonly void* GetUnsafePtr()
|
||||
public readonly unsafe void* GetUnsafePtr()
|
||||
{
|
||||
return _data.GetUnsafePtr();
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
using Misaki.HighPerformance.LowLevel.Collections.Contracts;
|
||||
using Misaki.HighPerformance.LowLevel.Contracts;
|
||||
using Misaki.HighPerformance.LowLevel.Utilities;
|
||||
@@ -61,7 +61,7 @@ public unsafe struct UnsafeSparseSet<T> : IUnsafeCollection<T>
|
||||
get => Current;
|
||||
}
|
||||
|
||||
public unsafe readonly void Dispose()
|
||||
public readonly unsafe void Dispose()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
namespace Misaki.HighPerformance.LowLevel.Contracts;
|
||||
namespace Misaki.HighPerformance.LowLevel.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// A structure that encapsulates function pointers for memory allocation operations.
|
||||
/// </summary>
|
||||
public unsafe readonly struct AllocationHandle
|
||||
public readonly unsafe struct AllocationHandle
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a pointer to the allocator instance associated with this allocation handle.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
using Misaki.HighPerformance.LowLevel.Buffer;
|
||||
using Misaki.HighPerformance.LowLevel.Collections;
|
||||
using Misaki.HighPerformance.LowLevel.Collections.Contracts;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -9,7 +9,7 @@ namespace Misaki.HighPerformance.LowLevel.Utilities;
|
||||
/// Provides extension methods for copying elements between unsafe collections and spans, converting collections to
|
||||
/// arrays or lists, and searching for values.
|
||||
/// </summary>
|
||||
public unsafe static class UnsafeCollectionExtensions
|
||||
public static unsafe class UnsafeCollectionExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Copies elements from a source UnsafeCollection to a destination Span, ensuring both have the same size.
|
||||
|
||||
Reference in New Issue
Block a user