Double add sub mul sc-mul ok

This commit is contained in:
Youmu Liu
2025-12-31 18:15:43 +08:00
parent 6484307b8a
commit 0e93787fa2
18 changed files with 1210 additions and 944 deletions
+12 -7
View File
@@ -50,19 +50,22 @@ namespace StgSharp
.UseModule<GraphicModule>()
.InitializeModule();
TestRender();
/*
// TestRender();
/**/
HybridLayerSegregatedFitAllocator hlsf;
unchecked {
hlsf = new((nuint)(64 * (ulong)10000 * 10000));
}
Matrix<float> m = Matrix<float>.Create(4000, 4000, MatrixLayout.DenseRectangle, hlsf);
Matrix<double> m = Matrix<double>.Create(4000, 4000, MatrixLayout.DenseRectangle,
hlsf);
MatrixCompute.Fill(m, 1.0f);
Matrix<float> n = Matrix<float>.Create(4000, 4000, MatrixLayout.DenseRectangle, hlsf);
Matrix<double> n = Matrix<double>.Create(4000, 4000, MatrixLayout.DenseRectangle,
hlsf);
MatrixCompute.Fill(n, 1.0f);
Matrix<float> p = Matrix<float>.Create(4000, 4000, MatrixLayout.DenseRectangle, hlsf);
Matrix<double> p = Matrix<double>.Create(4000, 4000, MatrixLayout.DenseRectangle,
hlsf);
MatrixCompute.Fill(p, 0.0f);
// MatrixCompute.Fill(p, 0.0f);
/*
for (int i = 0; i < 10; i++)
{
@@ -77,7 +80,9 @@ namespace StgSharp
Console.WriteLine($"{i}");
GC.Collect();
}
/*
/**/
Console.WriteLine("===================================================");
MatrixCompute.Mul(n, m, p);
for (int i = 0; i < 20; i++)
{