daily update on 20241226 by nitload youmu
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user