daily update on 20230730 by nitload youmu, 5th day of params displacement
This commit is contained in:
@@ -6,20 +6,31 @@ using System.Text;
|
||||
|
||||
namespace StgSharp
|
||||
{
|
||||
|
||||
|
||||
|
||||
internal static unsafe partial class internalIO
|
||||
{
|
||||
[DllImport("StgSharpGraphic.dll",EntryPoint = "VecAddVec",
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "VecAddVec",
|
||||
CallingConvention =CallingConvention.Cdecl)]
|
||||
internal static extern M128 VecAddVec(M128 vec1, M128 vec2);
|
||||
internal static extern M128 VecAddVec(in IntPtr ptr1, in IntPtr ptr2 /**/, in IntPtr ret/**/);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll",EntryPoint = "VecSubVec")]
|
||||
internal static extern M128 VecSubVec(M128 vec1, M128 vec2);
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "VecSubVec",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void VecSubVec(IntPtr ptr1, IntPtr ptr2,IntPtr ret);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll",EntryPoint = "VecMulVec")]
|
||||
internal static extern float VecMulVec(M128 vec1, M128 vec2);
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "VecMulVec",
|
||||
CallingConvention = CallingConvention.Cdecl)]
|
||||
internal static extern void VecMulVec(IntPtr ptr1, IntPtr ptr2, IntPtr ret);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "InitBigM128Map")]
|
||||
internal static unsafe extern long internalInitBigM128Map(int floatCount);
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "initSSE")]
|
||||
internal static extern ulong InternalInitSSE();
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "InitM128")]
|
||||
internal static unsafe extern IntPtr InternalInitM128(float x,float y,float z,float w);
|
||||
|
||||
[DllImport("StgSharpGraphic.dll", EntryPoint = "DeinitM128")]
|
||||
internal static unsafe extern void InternalDeinitM128(IntPtr m128Ptr);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
using StgSharp;
|
||||
using StgSharp.Control;
|
||||
using StgSharp.Logic;
|
||||
using System.Data;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public class M128Map
|
||||
public unsafe class M128Map
|
||||
{
|
||||
public readonly long mapID;
|
||||
|
||||
internal long mapPtr;
|
||||
internal readonly StgSharp.LinkedListNode<long> _unusedM128Header;
|
||||
private const int mapSize = 30 * 30;
|
||||
|
||||
internal StgSharp.LinkedList<long> m128Map =
|
||||
new StgSharp.LinkedList<long>();
|
||||
@@ -23,15 +26,16 @@ namespace StgSharp.Math
|
||||
|
||||
public M128Map()
|
||||
{
|
||||
long M128Ptr = internalIO.internalInitBigM128Map(4*30*30);
|
||||
m128Map.Add(0);
|
||||
mapPtr = (long)(Marshal.AllocHGlobal(sizeof(M128)*mapSize)+15);
|
||||
|
||||
long firstM128ptr = (mapPtr / 16 + 1) * 16;
|
||||
|
||||
m128Map.Add(0);
|
||||
_unusedM128Header = m128Map._hook._next;
|
||||
|
||||
for (int i = 1; i < 80*80/4; i++)
|
||||
for (int i = 0; i < 4*30*30*4; i+=16)
|
||||
{
|
||||
m128Map.Add(M128Ptr);
|
||||
M128Ptr += 4;
|
||||
m128Map.Add(firstM128ptr+i);
|
||||
}
|
||||
|
||||
mapID = Calc.RandomSeed();
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
public static unsafe partial class SSE
|
||||
{
|
||||
public enum Registor : byte
|
||||
{
|
||||
XMM0=0,
|
||||
XMM1=1,
|
||||
XMM2=2,
|
||||
XMM3=3,
|
||||
XMM4=4,
|
||||
XMM5=5,
|
||||
XMM6=6,
|
||||
XMM7=7
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,34 @@ using System.Text;
|
||||
|
||||
namespace StgSharp.Math
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
internal struct M128ptrCache
|
||||
{
|
||||
internal ulong ptr0;
|
||||
internal ulong ptr1;
|
||||
internal ulong ptr2;
|
||||
internal ulong ptr3;
|
||||
internal ulong ptr4;
|
||||
internal ulong ptr5;
|
||||
internal ulong ptr6;
|
||||
internal ulong ptr7;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return
|
||||
$"{ptr0}\t" +
|
||||
$"{ptr1}\t" +
|
||||
$"{ptr2}\t" +
|
||||
$"{ptr3}\t" +
|
||||
$"{ptr4}\t" +
|
||||
$"{ptr5}\t" +
|
||||
$"{ptr6}\t" +
|
||||
$"{ptr7}\t" +
|
||||
$"";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[StructLayout(LayoutKind.Explicit, Size = 16, Pack = 16)]
|
||||
internal struct M128
|
||||
{
|
||||
@@ -24,15 +52,18 @@ namespace StgSharp.Math
|
||||
[FieldOffset(0)] internal long double_0;
|
||||
[FieldOffset(8)] internal long double_1;
|
||||
|
||||
internal M128(float s0, float s1, float s2, float s3)
|
||||
internal M128(float x,float y,float z,float w)
|
||||
{
|
||||
single_0 = s0;
|
||||
single_1 = s1;
|
||||
single_2 = s2;
|
||||
single_3 = s3;
|
||||
single_0 = x;
|
||||
single_1 = y;
|
||||
single_2 = z;
|
||||
single_3 = w;
|
||||
}
|
||||
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{single_0}\t{single_1}\t{single_2}\t{single_3}";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
using StgSharp.Math;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace StgSharp.Control
|
||||
{
|
||||
public static unsafe partial class TimeLine
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user