daily update on 20230822 by nitload youmu

This commit is contained in:
Nitload
2023-08-22 23:01:20 +08:00
parent 969406c4e4
commit 8aac9fee87
111 changed files with 3205 additions and 11145 deletions
+58 -10
View File
@@ -1,25 +1,70 @@
using StgSharp.Math;
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics.X86;
namespace StgSharp
{
internal static class Program
{
internal unsafe static void Main(string[] args)
{
Matrix4x4 m = new Matrix4x4(
0,1,2,3,
4,5,6,7,
0,1,2,3,
4,5,6,7
/**/
Matrix4x4 matrix = new Matrix4x4(
1,1,-1,2,
-1,-1,-4,1,
2,4,-6,1,
1,2,4,2
);
for (int i = 0; i < 1000; i++)
Console.WriteLine(matrix.Det());
/*
System.Numerics.Matrix4x4 m = new System.Numerics.Matrix4x4(
0,1,2,3,
0,0,1,2,
0,0,0,0,
1,2,5,6
);
int cycle = 1000;
int time = 10000;
for (int t = 0; t < cycle; t++)
{
Matrix4x4 ret = m;
Stopwatch sw = Stopwatch.StartNew();
sw.Start();
for (int i = 0; i < time; i++)
{
Matrix4x4 mat = matrix * matrix;
}
sw.Stop();
TimeSpan timeSpan = sw.Elapsed;
Console.WriteLine(timeSpan.TotalMilliseconds);
Stopwatch sw2 = new Stopwatch();
sw2.Start();
for (int i = 0; i < time; i++)
{
System.Numerics.Matrix4x4 mat = m * m;
}
sw2.Stop();
TimeSpan timeSpan1 = sw2.Elapsed;
Console.WriteLine(timeSpan1.TotalMilliseconds);
Console.WriteLine();
}
//Console.WriteLine(m + m);
/**/
/*
System.Numerics.Matrix4x4 smt1 = new System.Numerics.Matrix4x4(
@@ -42,11 +87,13 @@ namespace StgSharp
for (int t = 0; t < 1000; t++)
{
s.Reset();
s.Start();
for (int i = 0; i < cycle; i++)
{
System.Numerics.Matrix4x4 ret = smt1* smt1;
System.Numerics.Matrix4x4 ret = smt1 * smt1;
}
s.Stop();
@@ -58,13 +105,14 @@ namespace StgSharp
for (int i = 0; i < cycle; i++)
{
Matrix4x4 ret = VectorCalc.Multiple(gmt1,gmt1);
Matrix4x4 ret = VectorCalc.Multiple(gmt1, gmt1);
}
s.Stop();
TimeSpan span1 = s.Elapsed;
Console.WriteLine(span1.TotalMilliseconds);
Console.WriteLine(t);
Console.WriteLine();
@@ -1 +1 @@
075d88573ab31945065a5d479a17cfb28f3bce57
1be9af1044b775e9c8191a9195ea3b3e03344c42
@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
@@ -0,0 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyTitleAttribute("StgSharpDebug")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。
@@ -0,0 +1 @@
c240d4b9dd7134ccd2554a8eb3a5407fd9a8d4f8
@@ -0,0 +1,11 @@
is_global = true
build_property.TargetFramework = net6.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = StgSharp
build_property.ProjectDir = D:\NitloadIndustry\研究项目\1-Flagship\TH2020\ProjectFile\源代码\StgSharpDebug\