Refactor and enhance math utilities and code generation
Refactored `StbImage` classes to be publicly accessible. Updated namespaces and introduced `NumericTypeAttribute` for metadata. Enhanced `VectorGenerator` with new utility methods (`any`, `all`, `length`, etc.) and improved code generation. Consolidated vector operations in `math` utilities. Refactored `Plane` and `svd` classes for better encapsulation and readability. Improved `DynamicArray` with `uint` indexer support and cleaner loops. Added SIMD-based benchmarking placeholders in `MathematicsBenchmark`. Removed redundant code and unused files, including `IUnsafeSet.cs`. Updated project file to include `CodeGen` as an analyzer. Introduced `SupportedVectorMath` and `SupportedMatrixMath` enums for better operation definitions. Improved code style, fixed minor bugs, and cleaned up unused code in `Program.cs`. Enhanced maintainability and readability across the codebase.
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using Misaki.HighPerformance.LowLevel.Utilities;
|
||||
using System.Drawing;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Misaki.HighPerformance.LowLevel.Buffer;
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
namespace Misaki.HighPerformance.LowLevel.Collections.Contracts;
|
||||
internal class IUnsafeSet<T>
|
||||
where T : unmanaged, IEquatable<T>
|
||||
{
|
||||
}
|
||||
@@ -66,7 +66,7 @@ public unsafe interface IAllocator
|
||||
/// <summary>
|
||||
/// Gets a reference to the allocation handle associated with this allocator.
|
||||
/// </summary>
|
||||
public ref AllocationHandle Handle
|
||||
ref AllocationHandle Handle
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public unsafe struct HashMapHelper<TKey> : IDisposable
|
||||
public KeyValuePair<TKey, TValue> GetCurrent<TValue>()
|
||||
where TValue : unmanaged
|
||||
{
|
||||
return new KeyValuePair<TKey, TValue>(buffer->_keys[index], UnsafeUtilities.ReadArrayElement<TValue>(buffer->_buffer, index));
|
||||
return new KeyValuePair<TKey, TValue>(buffer->_keys[index], UnsafeUtilities.ReadArrayElementRef<TValue>(buffer->_buffer, index));
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
|
||||
Reference in New Issue
Block a user