Files
Misaki.HighPerformance/Misaki.HighPerformance.Test/Program.cs
Misaki a92ab93731 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.
2025-10-04 12:38:53 +09:00

41 lines
1.0 KiB
C#

//var threadCount = 8;
//var map = new ConcurrentSlotMap<int>();
//var barrier = new Barrier(threadCount);
//Parallel.For(0, threadCount, threadIndex =>
//{
// barrier.SignalAndWait();
// for (var i = 0; i < 1000; i++)
// {
// var id = map.Add(i + threadIndex * 1000, out var gen);
// if (i % 100 == 0)
// {
// map.Remove(id, gen);
// }
// }
//});
//Console.WriteLine($"Count should be {threadCount * 990}, actual: {map.Count}");
using Misaki.HighPerformance.Test.Benchmark;
BenchmarkDotNet.Running.BenchmarkRunner.Run<MathematicsBenchmark>();
//using Misaki.HighPerformance.LowLevel.Buffer;
//using Misaki.HighPerformance.LowLevel.Collections;
//using Misaki.HighPerformance.LowLevel.Utilities;
//using (AllocationManager.CreateStackScope())
//{
// var array = new UnsafeArray<int>(10, Allocator.Stack);
// for (var i = 0; i < array.Count; i++)
// {
// array[i] = i;
// }
// foreach (var item in array.AsSpan())
// {
// Console.WriteLine(item);
// }
//}