hlsf wrong alloc solved

This commit is contained in:
Youmu Liu
2025-11-24 17:00:10 +08:00
parent 67a4ac385f
commit b7b960a604
12 changed files with 357 additions and 290 deletions
+11 -8
View File
@@ -2,8 +2,8 @@
// -----------------------------------------------------------------------
// file="Program"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -61,12 +61,15 @@ namespace StgSharp
{
try
{
World.Initialize().UseModule<NumericalModule>().UseModule<GraphicModule>().InitializeModule();
World.Initialize()
.UseModule<NumericalModule>()
.UseModule<GraphicModule>()
.InitializeModule();
// TestRender();
// 原有的矩阵测试代码
HlsfStressTest.Run();
/*
HybridLayerSegregatedFitAllocator hlsf = new HybridLayerSegregatedFitAllocator((nuint)(64 * (ulong)10000 * 10000));
Matrix<float> m = Matrix.FromHlsf<float>(1000, 1000, hlsf);
@@ -87,7 +90,7 @@ namespace StgSharp
GC.Collect();
}
// MatrixCompute.Mul(n, 12, n);
MatrixCompute.Mul(n, 12, n);
for (int i = 0; i < 20; i++)
{
for (int j = 0; j < 20; j++) {
@@ -96,13 +99,13 @@ namespace StgSharp
Console.WriteLine();
}
/**/
/**/
/*
}
catch (Exception ex)
{
Console.WriteLine(ex);
Console.ReadLine();
/**/
/*
World.WriteLog($"{ex}", LogType.Error);
Dialogue.PostError(ex);
/**/