daily update on 20241226 by nitload youmu

This commit is contained in:
Nitload
2024-12-26 03:09:46 +08:00
parent 7c8d462ca5
commit 592ad55d57
94 changed files with 3767 additions and 1484 deletions
@@ -42,6 +42,7 @@ namespace StgSharp.Data.Intrinsic
[StructLayout( LayoutKind.Sequential )]
internal unsafe struct IntrinsicContext
{
public delegate* unmanaged[Cdecl]<ColumnSet2*, ColumnSet2*, ColumnSet2*, void> add_mat_2;
public delegate* unmanaged[Cdecl]<ColumnSet3*, ColumnSet3*, ColumnSet3*, void> add_mat_3;
public delegate* unmanaged[Cdecl]<ColumnSet4*, ColumnSet4*, ColumnSet4*, void> add_mat_4;
@@ -31,6 +31,7 @@
using StgSharp.Data.Intrinsic;
using System;
using System.Reflection;
using System.Runtime.InteropServices;
namespace StgSharp
@@ -51,5 +52,25 @@ namespace StgSharp
private static extern int LoadIntrinsicFunction(
IntrinsicContext* context );
internal static void InitIntrinsicContext()
{
int statCode;
fixed (IntrinsicContext* cptr = &_intrinsicContext)
{
statCode = LoadIntrinsicFunction(cptr);
}
switch (statCode)
{
case 0:
Dialogue.PostError(new PlatformNotSupportedException("No SIMD instructions supported on current hardware platform"));
Environment.Exit(-1);
break;
default:
break;
}
}
}
}