Daily update on 20230803 by nitload youmu, problem of parameter displacement solved, rewriting other linear math
This commit is contained in:
@@ -2,35 +2,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
|
||||
|
||||
|
||||
internal static unsafe partial class internalIO
|
||||
internal static partial class internalIO
|
||||
{
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "VecAddVec",
|
||||
CallingConvention =CallingConvention.Cdecl)]
|
||||
internal static extern M128 VecAddVec(in IntPtr ptr1, in IntPtr ptr2 /**/, in IntPtr ret/**/);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "VecSubVec",
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "load",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void VecSubVec(IntPtr ptr1, IntPtr ptr2,IntPtr ret);
|
||||
internal static extern IntPtr load_internal(float x,float y, float z, float w);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "VecMulVec",
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "addps",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void VecMulVec(IntPtr ptr1, IntPtr ptr2, IntPtr ret);
|
||||
internal static extern IntPtr addps_internal(IntPtr ptr1, IntPtr ptr2);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "initSSE")]
|
||||
internal static extern ulong InternalInitSSE();
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "subps",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr subps_internal(IntPtr ptr1, IntPtr ptr2);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "InitM128")]
|
||||
internal static unsafe extern IntPtr InternalInitM128(float x,float y,float z,float w);
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "mulps",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr mulps_internal(IntPtr ptr1, IntPtr ptr2);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "DeinitM128")]
|
||||
internal static unsafe extern void InternalDeinitM128(IntPtr m128Ptr);
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "mulps_const",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern IntPtr mulps_const_internal(IntPtr ptr, float value);
|
||||
|
||||
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "deinitM128",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void deinitM128_internal(IntPtr M128Ptr);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Math
|
||||
@@ -8,17 +10,25 @@ namespace StgSharp.Math
|
||||
{
|
||||
public enum Registor : byte
|
||||
{
|
||||
XMM0=0,
|
||||
XMM1=1,
|
||||
XMM2=2,
|
||||
XMM3=3,
|
||||
XMM4=4,
|
||||
XMM5=5,
|
||||
XMM6=6,
|
||||
XMM7=7
|
||||
XMM0 = 0,
|
||||
XMM1 = 1,
|
||||
XMM2 = 2,
|
||||
XMM3 = 3,
|
||||
XMM4 = 4,
|
||||
XMM5 = 5,
|
||||
XMM6 = 6,
|
||||
XMM7 = 7
|
||||
}
|
||||
|
||||
static SSE()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public static Vec4d addps(Vec4d vec1, Vec4d vec2)
|
||||
{
|
||||
return new Vec4d(
|
||||
internalIO.addps_internal(vec1._m128Ptr,vec2._m128Ptr)
|
||||
) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user