Files
Misaki.HighPerformance/Misaki.HighPerformance.LowLevel/Buffer/AllocationOption.cs
Misaki ac73e28f26 Refactor and enhance math, memory, and utilities
Refactored `sincos` usage in `quaternion` to use tuple-based
returns for improved readability. Introduced a `random` struct
with methods for generating random values of various types
and dimensions, including ranges and directions. Added a
`DynamicArray` class for dynamic resizing and manipulation
of collections. Enhanced `SlotMap` with new methods for
safe access and updates.

Updated `uint` vector types with `NumericConvertable`
attributes for better type interoperability. Removed the
`MathUtilities` class and refactored `adj` and `adjInverse`
methods for encapsulation. Improved memory management
with `StackAllocator` and `UnsafeArray` enhancements.

Added geometry utilities like `AABB`, `OBB`, `Plane`, and
`SphereBounds` for 3D operations. Updated project
configuration for versioning and NuGet packaging.
Performed general code cleanup, improved validation, and
aligned with modern C# practices.
2025-09-23 22:57:12 +09:00

37 lines
1.1 KiB
C#

namespace Misaki.HighPerformance.LowLevel.Buffer;
[Flags]
public enum AllocationOption : byte
{
None = 0,
/// <summary>
/// Allocator for initialized memory.
/// </summary>
Clear = 1 << 0,
/// <summary>
/// Allocator for untracked memory.
/// </summary>
/// <remarks>
/// Use this option carefully, as the allocation manager will not track the memory.
/// No warning will be given if the memory is not freed.
/// </remarks>
UnTracked = 1 << 1,
}
public enum Allocator : byte
{
// Make the first allocator as invalid because we don't want to user create a default collection without passing any parameters
Invalid,
/// <summary>
/// Allocator for temporary allocations. Allocations are released after use automatically.
/// </summary>
Temp,
/// <summary>
/// Allocator for persistent allocations. Allocations are not released after use.
/// </summary>
Persistent,
/// <summary>
/// Allocator for stack allocations. Must have at least one active stack scope. Allocations are released when the stack scope is exited.
/// </summary>
Stack
}