new mat proc std

This commit is contained in:
Youmu Liu
2026-02-28 18:08:26 +08:00
parent 55cf3934bb
commit 6e07e67835
153 changed files with 91360 additions and 4547 deletions
+117
View File
@@ -0,0 +1,117 @@
<Project>
<!-- ═════════════════════════════���══════════════════════════ -->
<!-- 全局属性:所有 C# 项目共享 -->
<!-- ════════════════════════════════════════════════════════ -->
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<LangVersion>Preview</LangVersion>
<Nullable>enable</Nullable>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<AnalysisLevel>preview-all</AnalysisLevel>
<Platforms>x64;ARM64</Platforms>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<!-- 包信息 -->
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Nitload-NSI/StgSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/Nitload-NSI/StgSharp.git</RepositoryUrl>
</PropertyGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- Configuration × Platform 属性 -->
<!-- 在这里统一定义,各项目 csproj 不再重复 -->
<!-- ════════════════════════════════════════════════════════ -->
<PropertyGroup Condition="$(Configuration.Contains('Debug'))">
<Optimize>False</Optimize>
<DebugType>portable</DebugType>
<Deterministic>False</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='PerformanceDebug'">
<Optimize>True</Optimize>
<DebugType>none</DebugType>
<Deterministic>False</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<Optimize>True</Optimize>
<DebugType>none</DebugType>
<Deterministic>False</Deterministic>
</PropertyGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- 路径约定 -->
<!-- ════════════════════════════════════════════════════════ -->
<PropertyGroup>
<!-- 解决方案根目录(自动向上查找本文件来确定) -->
<SolutionRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildProjectDirectory), 'Directory.Build.props'))\</SolutionRoot>
<!-- native 库名称 -->
<NativeLibName>StgSharp.Native</NativeLibName>
</PropertyGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- OS / Arch 检测(编译机器,用于本地调试) -->
<!-- ════════════════════════════════════════════════════════ -->
<PropertyGroup>
<IsWindows Condition="$([MSBuild]::IsOSPlatform('Windows'))">true</IsWindows>
<IsLinux Condition="$([MSBuild]::IsOSPlatform('Linux'))">true</IsLinux>
<IsOSX Condition="$([MSBuild]::IsOSPlatform('OSX'))">true</IsOSX>
<_OsTag Condition="'$(IsWindows)'=='true'">win</_OsTag>
<_OsTag Condition="'$(IsLinux)'=='true'">linux</_OsTag>
<_OsTag Condition="'$(IsOSX)'=='true'">osx</_OsTag>
</PropertyGroup>
<!-- C# 的 $(Platform) 就是 x64 / ARM64,直接用来拼 RID -->
<PropertyGroup>
<!-- 把 ARM64 统一成小写 arm64,x64 保持不变 -->
<_ArchTag Condition="'$(Platform)'=='x64'">x64</_ArchTag>
<_ArchTag Condition="'$(Platform)'=='ARM64'">arm64</_ArchTag>
<_ArchTag Condition="'$(_ArchTag)'==''">x64</_ArchTag>
<!-- 当前编译的 RID -->
<BuildRid>$(_OsTag)-$(_ArchTag)</BuildRid>
<!-- 分层的 build 输出目录 -->
<NativeBuildDir>$(SolutionRoot)build\$(BuildRid)\</NativeBuildDir>
</PropertyGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- Native 文件名后缀(跨平台) -->
<!-- ══════════════════════════��═════════════════════════════ -->
<PropertyGroup>
<_NativePrefix Condition="'$(_OsTag)'!='win'">lib</_NativePrefix>
<_NativePrefix Condition="'$(_OsTag)'=='win'"></_NativePrefix>
<_NativeExt Condition="'$(_OsTag)'=='win'">.dll</_NativeExt>
<_NativeExt Condition="'$(_OsTag)'=='linux'">.so</_NativeExt>
<_NativeExt Condition="'$(_OsTag)'=='osx'">.dylib</_NativeExt>
<_NativeSymExt Condition="'$(_OsTag)'=='win'">.pdb</_NativeSymExt>
<_NativeSymExt Condition="'$(_OsTag)'=='linux'">.so.dbg</_NativeSymExt>
<_NativeSymExt Condition="'$(_OsTag)'=='osx'">.dylib.dSYM</_NativeSymExt>
<NativeFileName>$(_NativePrefix)$(NativeLibName)$(_NativeExt)</NativeFileName>
<NativeSymbolFileName>$(_NativePrefix)$(NativeLibName)$(_NativeSymExt)</NativeSymbolFileName>
</PropertyGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- OS 条件编译符号 -->
<!-- ════════════════════════════════════════════════════════ -->
<PropertyGroup Condition="'$(IsWindows)'=='true'">
<DefineConstants>$(DefineConstants);WINDOWS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsOSX)'=='true'">
<DefineConstants>$(DefineConstants);OSX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'">
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
</PropertyGroup>
</Project>
+101
View File
@@ -0,0 +1,101 @@
<Project>
<!-- ════════════════════════════════════════════════════════ -->
<!-- 编译后:把 C# 输出拷贝到 build/<rid>/ 目录 -->
<!-- 替代原来的 xcopy PostBuild -->
<!-- ════════════════════════════════════════════════════════ -->
<Target Name="CopyOutputToBuildDir"
AfterTargets="Build"
Condition="'$(DisablePostBuildCopy)'!='true'">
<MakeDir Directories="$(NativeBuildDir)" />
<!-- 拷贝所有编译输出(DLL + PDB + XML + deps.json) -->
<ItemGroup>
<_OutputFiles Include="$(OutputPath)**\*.*"
Exclude="$(OutputPath)**\*.user" />
</ItemGroup>
<Copy SourceFiles="@(_OutputFiles)"
DestinationFolder="$(NativeBuildDir)%(RecursiveDir)"
SkipUnchangedFiles="true" />
<Message Importance="high"
Text="[StgSharp] $(MSBuildProjectName) → $(NativeBuildDir)" />
</Target>
<!-- ════════════════════════════════════════════════════════ -->
<!-- 调试时:从 build/<rid>/ 拷贝 native DLL 到项目输出目录 -->
<!-- 这样 F5 调试时 P/Invoke 能找到 native -->
<!-- ════════════════════════════════════════════════════════ -->
<Target Name="CopyNativeToProjectOutput"
AfterTargets="Build">
<!-- native 库文件 -->
<ItemGroup>
<_NativeLibFile Include="$(NativeBuildDir)$(NativeFileName)"
Condition="Exists('$(NativeBuildDir)$(NativeFileName)')" />
</ItemGroup>
<!-- Debug 模式下还拷贝符号文件 -->
<ItemGroup Condition="$(Configuration.Contains('Debug'))">
<_NativeSymFile Include="$(NativeBuildDir)$(NativeSymbolFileName)"
Condition="Exists('$(NativeBuildDir)$(NativeSymbolFileName)')" />
</ItemGroup>
<Copy SourceFiles="@(_NativeLibFile);@(_NativeSymFile)"
DestinationFolder="$(OutputPath)"
SkipUnchangedFiles="true"
Condition="'@(_NativeLibFile)'!='' Or '@(_NativeSymFile)'!=''" />
<Message Importance="high"
Text="[StgSharp] Native $(NativeFileName) ($(BuildRid)) → $(OutputPath)"
Condition="'@(_NativeLibFile)'!=''" />
<Warning Text="[StgSharp] Native library not found at $(NativeBuildDir)$(NativeFileName). Build StgSharp.Native first!"
Condition="!Exists('$(NativeBuildDir)$(NativeFileName)')" />
</Target>
<!-- ════════════════════════════════════════════════════════ -->
<!-- NuGet 打包:把所有已存在的 RID native 放进 runtimes/ -->
<!-- 只在 StgSharp.Common 里生效(通过 IsNativeHost 属性) -->
<!-- ════════════════════════════════════════════════════════ -->
<Target Name="CollectNativeForPack"
BeforeTargets="GenerateNuspec"
Condition="'$(IsNativeHost)'=='true'">
<ItemGroup>
<!-- 扫描 build/ 下所有 RID 子目录中的 native 文件 -->
<_PackNative Include="$(SolutionRoot)build\win-x64\$(NativeLibName).dll"
Condition="Exists('$(SolutionRoot)build\win-x64\$(NativeLibName).dll')"
PackagePath="runtimes\win-x64\native" Pack="true" />
<_PackNative Include="$(SolutionRoot)build\win-arm64\$(NativeLibName).dll"
Condition="Exists('$(SolutionRoot)build\win-arm64\$(NativeLibName).dll')"
PackagePath="runtimes\win-arm64\native" Pack="true" />
<_PackNative Include="$(SolutionRoot)build\linux-x64\lib$(NativeLibName).so"
Condition="Exists('$(SolutionRoot)build\linux-x64\lib$(NativeLibName).so')"
PackagePath="runtimes\linux-x64\native" Pack="true" />
<_PackNative Include="$(SolutionRoot)build\linux-arm64\lib$(NativeLibName).so"
Condition="Exists('$(SolutionRoot)build\linux-arm64\lib$(NativeLibName).so')"
PackagePath="runtimes\linux-arm64\native" Pack="true" />
<_PackNative Include="$(SolutionRoot)build\linux-ppc64le\lib$(NativeLibName).so"
Condition="Exists('$(SolutionRoot)build\linux-ppc64le\lib$(NativeLibName).so')"
PackagePath="runtimes\linux-ppc64le\native" Pack="true" />
<_PackNative Include="$(SolutionRoot)build\osx-x64\lib$(NativeLibName).dylib"
Condition="Exists('$(SolutionRoot)build\osx-x64\lib$(NativeLibName).dylib')"
PackagePath="runtimes\osx-x64\native" Pack="true" />
<_PackNative Include="$(SolutionRoot)build\osx-arm64\lib$(NativeLibName).dylib"
Condition="Exists('$(SolutionRoot)build\osx-arm64\lib$(NativeLibName).dylib')"
PackagePath="runtimes\osx-arm64\native" Pack="true" />
<None Include="@(_PackNative)" />
</ItemGroup>
</Target>
</Project>
@@ -1,13 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup>
<SolutionDir Condition="'$(SolutionDir)'=='' Or '$(SolutionDir)'=='*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
@@ -1,62 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="BattleField"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Mathematics;
using StgSharp.Mathematics.Graphics;
using System;
using System.Collections.Generic;
using System.Text;
// TODO 这玩意如何加载一个渲染流程以获得各个图元还没搞清楚
namespace StgSharp.Controls
{
public class BattleField : ControllingItem
{
public bool IsEntity => true;
public ReadOnlySpan<Vec4> TextureBox
{
get => throw new NotImplementedException();
}
public Rectangle BoundingBox { get; set; }
public Vec2 Position { get; set; }
public IEnumerator<PlainGeometryMesh> GetEnumerator()
{
throw new NotImplementedException();
}
}
}
@@ -1,149 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ButtonGroup"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Mathematics;
using StgSharp.Mathematics.Graphics;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Transactions;
namespace StgSharp.Controls
{
public abstract class KeyboardButtonGroup : ControllingItem
{
private List<TriggerButton> buttonList;
private TriggerButton current;
public KeyboardButtonGroup()
{
buttonList = new List<TriggerButton>();
}
public bool IsEntity
{
get => false;
}
public ReadOnlySpan<Vec4> TextureBox
{
get => throw new NotSupportedException();
}
public Rectangle BoundingBox { get; set; }
public TriggerButton CurrentButton
{
get => current;
}
public Vec2 Position { get; set; }
protected List<TriggerButton> AllButton
{
get => buttonList;
}
public void AddButton(TriggerButton button)
{
buttonList.Add(button);
}
public abstract void Confirm();
public IEnumerator<PlainGeometryMesh> GetEnumerator()
{
foreach (TriggerButton item in buttonList) {
yield return item.Single();
}
}
public void MoveDown()
{
TriggerButton button = current;
while ((button.Down != null) && button.Down.IsDisabled) {
button = button.Right;
}
if (current == button) {
return;
}
current.DeHighlight();
button.Enable();
current = button;
}
public void MoveLeft()
{
TriggerButton button = current;
while ((button.Left != null) && button.Left.IsDisabled) {
button = button.Left;
}
if (current == button) {
return;
}
current.DeHighlight();
button.Enable();
current = button;
}
public void MoveRight()
{
TriggerButton button = current;
while ((button.Right != null) && button.Right.IsDisabled) {
button = button.Right;
}
if (current == button) {
return;
}
current.DeHighlight();
button.Enable();
current = button;
}
public void MoveUp()
{
TriggerButton button = current;
while ((button.Up != null) && button.Up.IsDisabled) {
button = button.Right;
}
if (current == button) {
return;
}
current.DeHighlight();
button.Enable();
current = button;
}
}
}
@@ -1,109 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="CharacterIndexImage"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Mathematics;
using StgSharp.Mathematics.Graphics;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;
namespace StgSharp.Controls
{
public class CharacterLineIndexImage : ControllingItem
{
private char[] displayIndex;
private char defaultChar;
private Dictionary<char, PlainGeometryMesh> texIndex;
private int length;
private PlainGeometryMesh _tittleMesh;
public CharacterLineIndexImage(
int length,
char defaultChar,
PlainGeometryMesh tittleMesh,
IEnumerable<(char, PlainGeometryMesh)> indexEnumeration)
{
this.length = length;
displayIndex = new char[length];
_tittleMesh = tittleMesh;
texIndex = indexEnumeration.ToDictionary(item => item.Item1, item => item.Item2);
}
public bool IsEntity
{
get => true;
}
public ReadOnlySpan<Vec4> TextureBox
{
get => throw new NotSupportedException();
}
public Rectangle BoundingBox
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public Vec2 Position
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
public void Display(string message)
{
if (string.IsNullOrEmpty(message)) {
message = string.Empty;
}
string result = (message.Length >= length) ?
message.Substring(message.Length - displayIndex.Length) :
message.PadLeft(
length, defaultChar);
displayIndex = result.ToCharArray();
}
public IEnumerator<PlainGeometryMesh> GetEnumerator()
{
yield return _tittleMesh;
foreach (char item in displayIndex) {
yield return texIndex[item];
}
}
}
}
@@ -1,56 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ControllingIntem"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Mathematics.Graphics;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Controls
{
public interface ControllingItem : IEnumerable<PlainGeometryMesh>
{
public abstract bool IsEntity { get; }
public abstract ReadOnlySpan<Vec4> TextureBox { get; }
public abstract Rectangle BoundingBox { get; set; }
public abstract Vec2 Position { get; set; }
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
}
@@ -1,70 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="DecorationBox.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Mathematics.Graphics;
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace StgSharp.Controls
{
public class DecorationBox : ControllingItem
{
private PlainGeometryMesh renderMesh;
public DecorationBox(Rectangle bound, Image texture, Vec2[] texCoord)
{
renderMesh = new PlainGeometryMesh(
BoundingBox, new TextureProvider(texture, texCoord));
}
public bool IsEntity => true;
public ReadOnlySpan<Vec4> TextureBox
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => renderMesh.TextureCoord;
}
public Rectangle BoundingBox { get; set; }
public Vec2 Position { get; set; }
public IEnumerator<PlainGeometryMesh> GetEnumerator()
{
yield return renderMesh;
}
}
}
@@ -1,83 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="MarkingLable"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Controls;
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Mathematics;
using StgSharp.Mathematics.Graphics;
using StgSharp.Timing;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Text;
namespace StgSharp.Controls
{
public class MarkingLabel : ControllingItem
{
private PlainGeometryMesh marker;
private Vec2 _currentPosition, _movementVec;
public MarkingLabel(PlainGeometryMesh marker)
{
this.marker = marker;
}
public bool IsEntity => true;
public ReadOnlySpan<Vec4> TextureBox
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => marker.TextureCoord;
}
public Rectangle BoundingBox { get; set; }
public Vec2 Position { get; set; }
public IEnumerator<PlainGeometryMesh> GetEnumerator()
{
yield return marker;
}
public void Move(Vec2 movement)
{
throw new NotImplementedException();
}
public void MoveTo(Vec2 target)
{
Move(target - Position);
}
}
}
@@ -1,213 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="TriggerButton"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Controls;
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Mathematics;
using StgSharp.Mathematics.Graphics;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
namespace StgSharp.Controls
{
public delegate void RenderButtonTextureCallback(ButtonStatus status, float beginTime, in TextureProvider texture);
public enum ButtonStatus
{
Error = 0b0,
Disable = 0b1,
Enable = 0b10,
Highlight = 0b100,
Confirm = 0b1000,
DisableToEnable = Disable | Enable,
EnableToDisable = -(Enable | DisableToEnable),
EnableToHighlight = Enable | Highlight,
HighlightToEnable = -(Enable | Highlight),
HighlightToDisable = -(Highlight | Disable),
}
public class TriggerButton : ControllingItem
{
private Action? confirmCallback;
private Action? disableCallback;
#nullable enable
private Action? enableCallback;
private float _statusBeginTime;
private RenderButtonTextureCallback _renderButton;
private TextureProvider _texture;
#nullable restore
public TriggerButton()
{
CurrentStatus = ButtonStatus.Disable;
}
public event Action ConfirmEvent
{
add { confirmCallback += value; }
remove { confirmCallback -= value; }
}
public event Action DisableEvent
{
add { disableCallback += value; }
remove { disableCallback -= value; }
}
public event Action EnableEvent
{
add { enableCallback += value; }
remove { enableCallback -= value; }
}
public event RenderButtonTextureCallback RenderButtonTexture
{
add
{
if (_renderButton == null)
{
_renderButton = value;
} else
{
_renderButton += value;
}
}
remove
{
if (_renderButton != null) {
_renderButton -= value;
}
}
}
public bool IsHighLighted { get; internal set; }
public bool IsDisabled { get; internal set; }
public bool IsEntity => true;
public ReadOnlySpan<Vec4> TextureBox
{
get => MemoryMarshal.Cast<Vec2, Vec4>(_texture.TextureCoordinate);
}
public Rectangle BoundingBox { get; set; }
public TriggerButton Left { get; internal set; }
public TriggerButton Right { get; internal set; }
public TriggerButton Up { get; internal set; }
public TriggerButton Down { get; internal set; }
public Vec2 Position { get; set; }
internal TextureProvider Texture
{
get => _texture;
set => _texture = value;
}
protected ButtonStatus CurrentStatus { get; set; }
public void DeHighlight()
{
if (CurrentStatus == ButtonStatus.Highlight) {
CurrentStatus = ButtonStatus.HighlightToEnable;
}
}
public void Disable()
{
CurrentStatus = CurrentStatus switch
{
ButtonStatus.Enable => ButtonStatus.EnableToDisable,
ButtonStatus.Highlight => ButtonStatus.HighlightToDisable,
_ => CurrentStatus,
};
if (disableCallback != null) {
disableCallback();
}
}
public void Enable()
{
if (CurrentStatus == ButtonStatus.Disable)
{
CurrentStatus = ButtonStatus.DisableToEnable;
} else
{
return;
}
if (enableCallback != null) {
enableCallback();
}
}
public IEnumerator<PlainGeometryMesh> GetEnumerator()
{
_renderButton(CurrentStatus, _statusBeginTime, in _texture);
yield return new PlainGeometryMesh(this.BoundingBox, _texture);
}
public void Highlight()
{
if (CurrentStatus == ButtonStatus.Enable)
{
CurrentStatus |= ButtonStatus.EnableToHighlight;
} else
{
return;
}
if (confirmCallback != null) {
confirmCallback();
}
}
internal void Init(ButtonStatus status)
{
if (CurrentStatus == ButtonStatus.Error) {
CurrentStatus = status;
}
}
}//----------------------------------- End of class --------------------------------------------
}
-234
View File
@@ -1,234 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="KeyEnum"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Graphics;
using StgSharp.Graphics.OpenGL;
using System;
namespace StgSharp
{
public enum KeyboardKey : int
{
UNKNOWN = -1,
None = 0,
Space = 32,
Apostrophe = 39/*'*/,
Comma = 44/*,*/,
Minus = 45/*-*/,
Period = 46/*.*/,
Slash = 47/*/*/,
Zero = 48,
One = 49,
Two = 50,
Three = 51,
Four = 52,
Five = 53,
Six = 54,
Seven = 55,
Eight = 56,
Nine = 57,
Semicolon = 59/*,*/,
Equal = 61/*=*/,
A = 65,
B = 66,
C = 67,
D = 68,
E = 69,
F = 70,
G = 71,
H = 72,
I = 73,
J = 74,
K = 75,
L = 76,
M = 77,
N = 78,
O = 79,
P = 80,
Q = 81,
R = 82,
S = 83,
T = 84,
U = 85,
V = 86,
W = 87,
X = 88,
Y = 89,
Z = 90,
LeftBracket = 91/*[*/,
BACKSLASH = 92/*\*/,
RightBracket = 93/*]*/,
GraveAccent = 96/*`*/,
World1 = 161/*non-US#1*/,
World2 = 162/*non-US#2*/,
Esc = 256,
Enter = 257,
Tab = 258,
Backspace = 259,
Insert = 260,
Delete = 261,
Right = 262,
Left = 263,
Down = 264,
Up = 265,
PgUp = 266,
PgDown = 267,
Home = 268,
End = 269,
CapsLock = 280,
ScrollLock = 281,
NumLock = 282,
PrintScreen = 283,
Pause = 284,
F1 = 290,
F2 = 291,
F3 = 292,
F4 = 293,
F5 = 294,
F6 = 295,
F7 = 296,
F8 = 297,
F9 = 298,
F10 = 299,
F11 = 300,
F12 = 301,
F13 = 302,
F14 = 303,
F15 = 304,
F16 = 305,
F17 = 306,
F18 = 307,
F19 = 308,
F20 = 309,
F21 = 310,
F22 = 311,
F23 = 312,
F24 = 313,
F25 = 314,
NumPad0 = 320,
NumPad1 = 321,
NumPad2 = 322,
NumPad3 = 323,
NumPad4 = 324,
NumPad5 = 325,
NumPad6 = 326,
NumPad7 = 327,
NumPad8 = 328,
NumPad9 = 329,
NumPadDec = 330,
NumPadDiv = 331,
NumPadMul = 332,
NumPadSub = 333,
NumPadAdd = 334,
NumPadAnter = 335,
NumPadEqual = 336,
LeftShift = 340,
LeftControl = 341,
LeftAlt = 342,
LeftSuper = 343,
RightShift = 344,
RightControl = 345,
RightAlt = 346,
RightSuper = 347,
Menu = 348,
First = Space,
Last = Menu,
}
#pragma warning disable CA1707
#pragma warning disable CA1712
#pragma warning disable CA1008
#pragma warning disable CA1027
public enum Joystick : int
#pragma warning restore CA1027
{
Joystick_1 = FrameworkConstant. JOYSTICK_1,
Joystick_2 = FrameworkConstant. JOYSTICK_2,
Joystick_3 = FrameworkConstant. JOYSTICK_3,
Joystick_4 = FrameworkConstant. JOYSTICK_4,
Joystick_5 = FrameworkConstant. JOYSTICK_5,
Joystick_6 = FrameworkConstant. JOYSTICK_6,
Joystick_7 = FrameworkConstant. JOYSTICK_7,
Joystick_8 = FrameworkConstant. JOYSTICK_8,
Joystick_9 = FrameworkConstant. JOYSTICK_9,
Joystick_10 = FrameworkConstant.JOYSTICK_10,
Joystick_11 = FrameworkConstant.JOYSTICK_11,
Joystick_12 = FrameworkConstant.JOYSTICK_12,
Joystick_13 = FrameworkConstant.JOYSTICK_13,
Joystick_14 = FrameworkConstant.JOYSTICK_14,
Joystick_15 = FrameworkConstant.JOYSTICK_15,
Joystick_16 = FrameworkConstant.JOYSTICK_16,
First = Joystick_1,
Last = Joystick_16
}
[System.Flags]
public enum Mouse : int
{
Button1 = 0,
Button2 = 1,
Button3 = 2,
Button4 = 3,
Button5 = 4,
Button6 = 5,
Button7 = 6,
Button8 = 7,
First = Button1,
Last = Button8,
Left = Button1,
Right = Button2,
Middle = Button3
}
#pragma warning restore CA1707
#pragma warning restore CA1712
#pragma warning restore CA7008
internal enum InputEquipment
{
Keyboard,
Mouse,
Joystick
}
public enum KeyStatus : int
{
RELEASE = 0,
PRESS = 1
}
}
@@ -1,66 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="KeyEventAttribute"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp
{
[AttributeUsage(AttributeTargets.Method)]
public class KeyEventAttribute : Attribute
{
internal int _equipment;
internal int _keyStat;
internal int _keyTarget;
public KeyEventAttribute(KeyboardKey key, KeyStatus status)
{
_equipment = (int)InputEquipment.Keyboard;
_keyTarget = (int)key;
_keyStat = (int)status;
}
public KeyEventAttribute(Joystick joystick, KeyStatus status)
{
_equipment = (int)InputEquipment.Keyboard;
_keyTarget = (int)joystick;
_keyStat = (int)status;
}
public KeyEventAttribute(Mouse mouse, KeyStatus status)
{
_equipment = (int)InputEquipment.Keyboard;
_keyTarget = (int)mouse;
_keyStat = (int)status;
}
}
}
@@ -1,42 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="IClickTrigger"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Controlling.UsrActivity
{
public interface IClickTrigger
{
public int TargetKeyOrButtonID { get; }
public KeyStatus TriggeredStatus { get; }
}
}
@@ -1,86 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="JoystickTrigger"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Controlling.UsrActivity
{
public readonly struct JoystickTrigger : IClickTrigger, IEquatable<JoystickTrigger>
{
private readonly Joystick _stick;
private readonly KeyStatus _status;
public JoystickTrigger(Joystick targetKey, KeyStatus status)
{
this._stick = targetKey;
_status = status;
}
public int TargetKeyOrButtonID => (int)_stick;
public Joystick Stick
{
get => _stick;
}
public KeyStatus TriggeredStatus => _status;
public override bool Equals(object obj)
{
return base.Equals(obj);
}
public override int GetHashCode()
{
return ((int)_stick) + (17 * ((int)_status));
}
public override string ToString()
{
return $"Key {_stick} triggered when {_status}";
}
public static bool operator !=(JoystickTrigger left, JoystickTrigger right)
{
return !(left == right);
}
public static bool operator ==(JoystickTrigger left, JoystickTrigger right)
{
return (left._status == right._status) && (left._stick == right._stick);
}
bool IEquatable<JoystickTrigger>.Equals(JoystickTrigger other)
{
return other == this;
}
}
}
@@ -1,82 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="KeyTrigger"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Text;
namespace StgSharp.Controlling.UsrActivity
{
public readonly struct KeyTrigger : IClickTrigger, IEquatable<KeyTrigger>
{
private readonly KeyboardKey _targetKey;
private readonly KeyStatus _triggerStat;
public KeyTrigger(KeyboardKey targetKey, KeyStatus targetStat)
{
this._targetKey = targetKey;
this._triggerStat = targetStat;
}
public int TargetKeyOrButtonID => (int)_targetKey;
public KeyStatus TriggeredStatus => _triggerStat;
public override bool Equals(object obj)
{
return base.Equals(obj);
}
public override int GetHashCode()
{
return ((int)_targetKey) + (17 * ((int)_triggerStat));
}
public override string ToString()
{
return $"Key {_targetKey} triggered when {_triggerStat}";
}
public static bool operator !=(KeyTrigger left, KeyTrigger right)
{
return !(left == right);
}
public static bool operator ==(KeyTrigger left, KeyTrigger right)
{
return (left._triggerStat == right._triggerStat) && (left._targetKey == right._targetKey);
}
bool IEquatable<KeyTrigger>.Equals(KeyTrigger other)
{
return other == this;
}
}
}
@@ -1,69 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="MouseTrigger"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Mathematics;
using System;
using System.Collections.Generic;
using System.Diagnostics.SymbolStore;
using System.Text;
namespace StgSharp.Controlling.UsrActivity
{
public readonly struct MouseTrigger : IClickTrigger, IEquatable<MouseTrigger>
{
private readonly KeyStatus _status;
private readonly Mouse _mouse;
public MouseTrigger(Mouse mouse, KeyStatus status)
{
_mouse = mouse;
_status = status;
}
public int TargetKeyOrButtonID => (int)_mouse;
public KeyStatus TriggeredStatus => _status;
public bool Equals(MouseTrigger other)
{
return this == other;
}
public static bool operator !=(MouseTrigger left, MouseTrigger right)
{
return left._mouse != right._mouse || left._status != right._status;
}
public static bool operator ==(MouseTrigger left, MouseTrigger right)
{
return left._mouse == right._mouse && left._status == right._status;
}
}
}
@@ -1,88 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="TriggetFactory"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Mathematics;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Controlling.UsrActivity
{
public static class TriggetBuilder
{
private const int JoystickMax = (int)Joystick.Last + 1;
private const int JoystickMin = (int)Joystick.First - 1;
private const int KeyboardMax = (int)KeyboardKey.Last + 1;
private const int KeyboardMin = (int)KeyboardKey.First - 1;
private const int MouseMax = (int)Mouse.Last + 1;
private const int MouseMin = (int)Mouse.First - 1;
private static KeyTrigger keyboardtemp;
private static MouseTrigger mousetemp;
public static JoystickTrigger BuildJoystickClickTrigger(int keyCode, KeyStatus status)
{
if (keyCode > MouseMin && keyCode < MouseMax) {
return new JoystickTrigger((Joystick)keyCode, status);
}
throw new InvalidOperationException("Known key code or key is not on joystick.");
}
public static KeyTrigger BuildKeyboardClickTrigger(int keyCode, KeyStatus status)
{
if (keyCode > KeyboardMin && keyCode < KeyboardMax) {
return new KeyTrigger((KeyboardKey)keyCode, status);
}
throw new InvalidOperationException("Known key code or kay is not on keyboard.");
}
public static MouseTrigger BuildMouseClickTrigger(int keyCode, KeyStatus status)
{
if (keyCode >= MouseMin && keyCode <= MouseMax) {
return new MouseTrigger((Mouse)keyCode, status);
}
throw new InvalidOperationException("Known key code or key is not on mouse.");
}
public static IClickTrigger BuildTrigger(int keyCode, KeyStatus status)
{
if (keyCode > KeyboardMin && keyCode < KeyboardMax) {
return new KeyTrigger((KeyboardKey)keyCode, status);
}
if (keyCode > JoystickMin && keyCode < JoystickMax) {
return new JoystickTrigger((Joystick)keyCode, status);
}
if (keyCode >= MouseMin && keyCode <= MouseMax) {
return new MouseTrigger((Mouse)keyCode, status);
}
throw new InvalidOperationException("Known key code.");
}
}
}
+6 -4
View File
@@ -1,4 +1,4 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="IStaticModule"
// Project: StgSharp
@@ -40,12 +40,14 @@ namespace StgSharp
}
public class ModuleToInitializeCollection : IEnumerable<IStaticModule>, IStaticModule
public sealed class ModuleToInitializeCollection : IEnumerable<IStaticModule>, IStaticModule
{
private readonly List<IStaticModule> _modules = [];
internal ModuleToInitializeCollection(World.Initializer i)
internal ModuleToInitializeCollection(
World.Initializer i
)
{
_modules.Add(i);
}
@@ -62,7 +64,7 @@ namespace StgSharp
}
}
public ModuleToInitializeCollection UseModule<T>() where T: IStaticModule, new()
public ModuleToInitializeCollection UseModule<T>() where T : IStaticModule, new()
{
_modules.Add(new T());
return this;
@@ -1,49 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="globalKeyStat"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp
{
public static partial class World
{
private static ConcurrentDictionary<int, KeyStatus> keyListener
= new ConcurrentDictionary<int, KeyStatus>();
public static KeyStatus CheckKey(KeyboardKey key)
{
return keyListener.GetOrAdd((int)key, KeyStatus.RELEASE);
}
}
}
-199
View File
@@ -1,199 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ViewBase"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Graphics;
using StgSharp.Mathematics;
using StgSharp.MVVM.ViewModel;
using StgSharp.Timing;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Numerics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
namespace StgSharp.MVVM
{
/// <summary>
/// ViewBase is the base type for all view types, providing context binding and control
/// element binding. A complete view should contain one complete <see cref="ViewDesigner{T}"
/// />, <see cref="ViewRender{TView}" />, and <see cref="ViewResponder" />, which provide
/// layout descriptions of control elements, user responses, and rendering implementations in
/// the view. Data between instances of <see cref="ViewDesigner{T}" />, <see
/// cref="ViewRender{TView}" />, and <see cref="ViewResponder{T}" /> is shared through <see
/// cref="ViewBase" />.
/// </summary>
public abstract unsafe partial class ViewBase
{
private (int x, int y, int z) unitCubeSize;
private GetDataBindingEntryDelegate getDataBindingEntry;
private int usedFrame;
private IViewDesigner<ViewBase> _design;
private IViewRender<ViewBase> _render;
private IViewResponder<ViewBase> _responder;
private TimeSpanProvider time;
private ViewPort context;
private delegate bool GetDataBindingEntryDelegate(string name, out DataBindingEntry entry);
public DataBindingEntry this[string name]
{
get
{
if (getDataBindingEntry(name, out DataBindingEntry entry)) {
return entry;
}
if (TryGetObjectReference(name, out entry)) {
return entry;
}
throw new KeyNotFoundException();
}
}
public (int x, int y, int z) UnitCubeSize
{
get => unitCubeSize;
}
public bool Activated { get; internal set; }
public int Height
{
get => context.Height;
}
public int Width
{
get => context.Width;
}
public IntPtr Monitor => context.Monitor;
public IntPtr ViewHandle => context.ViewPortHandle;
public IViewDesigner<ViewBase> Designer
{
get => _design;
protected set => _design = value;
}
public string ContextName => context.Name;
public string SelfName { get; set; }
public ViewPort Port
{
get => context;
}
internal TimeSpanProvider TimeProvider
{
get => time;
}
protected internal IViewRender<ViewBase> Render
{
get => _render;
set => _render = value;
}
protected IViewResponder<ViewBase> Responder
{
get => _responder;
set => _responder = value;
}
public abstract void CustomizedInitialize([NotNull]ViewModelBase viewModelBinding);
/// <summary>
/// Get the status of a certain key on the keyboard.
/// </summary>
/// <param _label="key">
///
/// </param>
/// <returns>
/// <see cref="KeyStatus" /> representing if a key is pressed or released.
/// </returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public KeyStatus GetKeyStatus(KeyboardKey key)
{
return GraphicFramework.glfwGetKey(context.ViewPortHandle, (int)key);
}
public void InternalInitialize(string name, (int, int, int) cubeSize, [NotNull]ViewModelBase viewModelBinding)
{
SelfName = name;
unitCubeSize = cubeSize;
getDataBindingEntry = viewModelBinding.TryGetObjectReference;
context = viewModelBinding.ViewPortBinding;
time = viewModelBinding.frameTimeProvider;
CustomizedInitialize(viewModelBinding);
}
public abstract bool TryGetObjectReference(string name, out DataBindingEntry entry);
public void Use()
{
if (usedFrame == 0)
{
if (!ValidateInitialization()) {
throw new InvalidOperationException(
"This view is not correctly initialized before rendering.");
}
}
Show();
usedFrame++;
}
public bool ValidateInitialization()
{
return (_design != null) &&
(_render != null) &&
(getDataBindingEntry != null) &&
(_responder != null) &&
_design.ValidateInitializing() &&
_responder.ValidateInitializing() &&
_render.ValidateInitializing();
}
protected abstract void Show();
}
}
-144
View File
@@ -1,144 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ViewDesigner"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Controlling.UsrActivity;
using StgSharp.Controls;
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Mathematics;
using System;
using System.Collections.Generic;
using System.Net;
using System.Text;
namespace StgSharp.MVVM
{
public abstract partial class ViewBase
{
public interface IViewDesigner<out TView> where TView: ViewBase
{
abstract void CustomizedInitialize();
abstract void Initialize();
abstract bool ValidateInitializing();
}
/// <summary>
/// ViewDesigner provides descriptions of various controls in the view, binds the
/// controls to specific user actions and behaviors, and describes the layout and
/// interactions of each control.
/// </summary>
public abstract class ViewDesigner<TView> : IViewDesigner<TView> where TView: ViewBase
{
private KeyboardButtonGroup currentButtonGroup;
private List<ControllingItem> _controlList;
protected TView _binding;
public ViewDesigner(TView binding)
{
_binding = binding;
_controlList = new List<ControllingItem>();
}
protected TView Binding
{
get => _binding;
}
public CharacterLineIndexImage CreateCharacterLine(
int length,
char blankFilling,
PlainGeometryMesh tittle,
IEnumerable<(char, PlainGeometryMesh)> charList)
{
CharacterLineIndexImage ret = new CharacterLineIndexImage(
length, blankFilling, tittle, charList);
_controlList.Add(ret);
return ret;
}
public TriggerButton CreateKeyboardButton(
Rectangle bonding,
TextureProvider defaultAnimation,
bool isEnable)
{
TriggerButton ret = new TriggerButton();
ret.BoundingBox = bonding;
ret.Texture = defaultAnimation;
if (isEnable)
{
ret.IsDisabled = false;
ret.Enable();
} else
{
ret.IsDisabled = true;
ret.Disable();
}
currentButtonGroup.AddButton(ret);
return ret;
}
public TButtonGroup CreateKeyboardButtonGroup<TButtonGroup>(
IClickTrigger leftBidning,
IClickTrigger rightBinding,
IClickTrigger upBinding,
IClickTrigger downBinding,
IClickTrigger confirmBinding)
where TButtonGroup: KeyboardButtonGroup, new()
{
TButtonGroup ret = new TButtonGroup();
_controlList.Add(ret);
currentButtonGroup = ret;
_binding.Responder[leftBidning] = ret.MoveLeft;
_binding.Responder[rightBinding] = ret.MoveRight;
_binding.Responder[upBinding] = ret.MoveUp;
_binding.Responder[downBinding] = ret.MoveDown;
_binding.Responder[confirmBinding] = ret.Confirm;
return ret;
}
public abstract void CustomizedInitialize();
public void Initialize()
{
CustomizedInitialize();
}
public abstract bool ValidateInitializing();
}//---------------------------------- End of Class -----------------------------------------
}
}
-130
View File
@@ -1,130 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ViewRender"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Graphics;
using StgSharp.HighPerformance;
using System;
using System.Collections.Generic;
using System.Linq;
namespace StgSharp.MVVM
{
public abstract partial class ViewBase
{
protected internal interface IViewRender<out TView> where TView: ViewBase
{
RenderStream this[DataLabel renderName] { get; }
void CustomizedInitialize();
IEnumerator<ViewPort> GetEnumerator();
void Initialize();
bool ValidateInitializing();
}
protected abstract class ViewRender<TView> : IViewRender<TView> where TView: ViewBase
{
protected ViewRender(TView binding)
{
_binding = binding;
_render = new Dictionary<DataLabel, RenderStream>();
}
public RenderStream this[DataLabel renderName]
{
get => _render.TryGetValue(renderName, out RenderStream stream) ? stream : (null!);
protected set
{
if (_render.ContainsKey(renderName))
{
_render[renderName] = value;
} else
{
_render.Add(renderName, value);
}
}
}
public TView Binding => _binding;
protected ViewPort ContextBinding => _binding.context;
protected ViewDesigner<TView> Design => (_binding.Designer as ViewDesigner<TView>)!;
protected Dictionary<DataLabel, RenderStream> Render
{
get => _render;
}
protected ViewResponder<TView> Responder => (_binding.Responder as ViewResponder<TView>)!;
public T CreateRenderStream<T>() where T: RenderStream, new()
{
T ret = new T();
ret.Initialize(_binding.context, Binding.TimeProvider);
return ret;
}
public T CreateRenderStream<T>(ViewPort vp) where T: RenderStream, new()
{
T ret = new T();
ret.Initialize(vp, Binding.TimeProvider);
return ret;
}
public abstract void CustomizedInitialize();
public IEnumerator<ViewPort> GetEnumerator()
{
foreach (RenderStream item in Render.Values) {
yield return item.BindedViewPortContext;
}
}
public void Initialize()
{
CustomizedInitialize();
}
public abstract bool ValidateInitializing();
#pragma warning disable CS8618
private Dictionary<DataLabel, RenderStream> _render;
private TView _binding;
#pragma warning restore CS8618
}
}
}
-131
View File
@@ -1,131 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ViewResponder"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Controlling.UsrActivity;
using StgSharp.MVVM.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.MVVM
{
public partial class ViewBase
{
protected interface IViewResponder<out TVIew> where TVIew: ViewBase
{
Action? this[IClickTrigger trigger] { get; set; }
void CustomizedInitialize(Func<IClickTrigger, string, Action> keyRegister);
void Initialize(MethodLookUpDelegate methodGetter);
void ProcessUserInput();
bool ValidateInitializing();
}
protected abstract class ViewResponder<TView> : IViewResponder<TView> where TView: ViewBase
{
private bool _isInitialized;
private Dictionary<IClickTrigger, Action> keyCallbackIndex;
private Dictionary<string, Action> nameToCallbackMap;
private TView _binding;
protected ViewResponder(TView binding)
{
keyCallbackIndex = new Dictionary<IClickTrigger, Action>();
nameToCallbackMap = new Dictionary<string, Action>();
_binding = binding;
}
#pragma warning disable CA1043
public Action? this[IClickTrigger trigger]
#pragma warning restore CA1043
{
get => keyCallbackIndex.TryGetValue(trigger, out Action callback) ? callback : null;
set
{
if (keyCallbackIndex.TryGetValue(trigger, out Action callback))
{
callback += value;
} else
{
keyCallbackIndex.Add(
trigger, value ?? throw new ArgumentNullException(nameof(value)));
}
}
}
protected TView Binding => _binding;
public abstract void CustomizedInitialize(Func<IClickTrigger, string, Action> keyRegister);
public void Initialize(MethodLookUpDelegate methodGetter)
{
if (_isInitialized) {
return;
}
CustomizedInitialize((trigger, name) => {
if (!nameToCallbackMap.TryGetValue(name, out Action ret))
{
if (methodGetter(name, out Action lookup))
{
this[trigger] = lookup;
} else
{
throw new InvalidOperationException(
$"Cannot find method named {name} in binded view model");
}
}
return ret;
});
}
public void ProcessUserInput()
{
foreach (KeyValuePair<IClickTrigger, Action> pair in keyCallbackIndex)
{
if (GraphicFramework.glfwGetKey(_binding.ViewHandle,
pair.Key.TargetKeyOrButtonID) == pair.Key.TriggeredStatus) {
pair.Value();
}
}
}
public abstract bool ValidateInitializing();
}
}
}
@@ -1,148 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="DataBinding"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.HighPerformance;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
using System.Runtime.InteropServices;
namespace StgSharp.MVVM.ViewModel
{
#nullable enable
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate ref object BindingDataGetter();
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void BindingDataSetter(ref object value);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate bool MethodLookUpDelegate(string name, out Action callback);
public abstract partial class ViewModelBase
{
public bool MethodLookup(string methodName, out Action callback)
{
MethodInfo method = GetType().GetMethod(methodName)!;
if (method == null)
{
callback = null!;
return false;
}
try
{
callback = (Action)Delegate.CreateDelegate(typeof(Action), this, methodName);
return true;
}
catch (MissingMethodException)
{
callback = null!;
return false;
}
catch (MethodAccessException)
{
callback = null!;
return false;
}
catch (Exception)
{
throw;
}
}
}
[StructLayout(LayoutKind.Explicit)]
public unsafe struct DataBindingEntry
{
[FieldOffset(0)] private IntPtr getterPtr;
[FieldOffset(8)] private IntPtr setterPtr;
[FieldOffset(0)] private M128 _mask;
public DataBindingEntry(
[NotNull] BindingDataGetter gettingCallback,
[NotNull] BindingDataSetter settingCallback)
{
getterPtr = Marshal.GetFunctionPointerForDelegate(gettingCallback);
setterPtr = Marshal.GetFunctionPointerForDelegate(settingCallback);
}
public static DataBindingEntry NullBinding
{
get => new DataBindingEntry();
}
public bool Equals(DataBindingEntry other)
{
return (_mask == other._mask);
}
public override bool Equals(object obj)
{
if (obj is not DataBindingEntry other) {
return false;
}
return Equals(other);
}
public bool ExactEqual(DataBindingEntry other)
{
return (getterPtr == other.getterPtr) && (setterPtr == other.setterPtr);
}
public override int GetHashCode()
{
return _mask.GetHashCode();
}
public ref object GetValue()
{
return ref ((delegate* unmanaged[Cdecl]<ref object>)getterPtr)();
}
public void SetValue(ref object value)
{
((delegate* unmanaged[Cdecl]<ref object, void>)setterPtr)(ref value);
}
public static bool operator !=(DataBindingEntry left, DataBindingEntry right)
{
return left._mask != right._mask;
}
public static bool operator ==(DataBindingEntry left, DataBindingEntry right)
{
return left._mask == right._mask;
}
}
#nullable restore
}
@@ -1,146 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ShowViewPort"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Controls;
using StgSharp.Graphics;
using StgSharp.MVVM;
using StgSharp.Threading;
using StgSharp.Timing;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading;
namespace StgSharp.MVVM.ViewModel
{
public abstract partial class ViewModelBase
{
private volatile bool _closed = true;
private ViewBase _nextView, _currentView;
protected ViewBase CurrentView
{
get => _currentView;
set => _nextView = value;
}
/// <summary>
/// CustomizeInit this form and render it on screen, and respond with operation
/// </summary>
public unsafe void UseViewModel(
string viewEntryName
)
{
CustomizeInitialize();
UseViewInNextFrame(viewEntryName);
fpsCountProvider.TimeSpanRefreshed += CountFps;
fpsCountProvider.MissTimeSpanRefreshed += CountFps;
if (_nextView != _currentView) {
_ = Interlocked.Exchange(ref _currentView, _nextView);
}
Thread renderThread = new Thread((
token
) => {
try
{
ProcessFrameWithoutEvent();
}
catch (Exception ex)
{
DefaultLog.InternalWriteLog(
$"Critical error when rendering:\n" + $"{ex}", LogType.Error);
ShouldClose = true;
throw;
}
});
renderThread.Start();
/**/
while (_closed)
{
if (_nextView != _currentView) {
_ = Interlocked.Exchange(ref _currentView, _nextView);
}
GraphicFramework.glfwPollEvents();
frameTimeProvider.WaitNextSpan();
_closed = !ShouldClose;
}
/**/
renderThread.Join();
fpsCountProvider.Dispose();
frameTimeProvider.Dispose();
}
protected void UseViewInNextFrame(
string name
)
{
if (!allView.TryGetValue(name, out ViewBase v)) {
throw new KeyNotFoundException(
$"{$"Cannot find View named {name} "}{$"in current View Model of {GetType().FullName}"}");
}
CurrentView = v;
}
private void CountFps(
object sender,
EventArgs e
)
{
Interlocked.Exchange(ref _frameSpeed, _frameCount);
Interlocked.Exchange(ref _frameCount, 0);
}
private unsafe void PrivateShow()
{
if (0 == GraphicFramework.glfwWindowShouldClose(this.viewPortDisplay.ViewPortHandle))
{
CurrentView.Use();
RenderStream.PollEvents();
}
}
private void ProcessFrameWithoutEvent()
{
frameTimeProvider.TimeSpanRefreshed += (
_,
_
) => { };
while (_closed)
{
foreach (ViewPort context in CurrentView.Render) {
context.FlushSize();
}
CurrentView.Use();
frameTimeProvider.WaitNextSpan();
Interlocked.Add(ref _frameCount, 1);
}
}
}
}
@@ -1,54 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ViewManage"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Graphics;
using StgSharp.Graphics.OpenGL;
using StgSharp.MVVM;
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Text;
namespace StgSharp.MVVM.ViewModel
{
public partial class ViewModelBase
{
private Dictionary<string, ViewBase> allView;
public T CreateAndBindView<T>(string name, (int x, int y, int z) unitCubeSize) where T: ViewBase, new()
{
T ret = new T();
ret.SelfName = name;
ret.InternalInitialize(name, unitCubeSize, this);
allView.Add(name, ret);
return ret;
}
}
}
-271
View File
@@ -1,271 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ViewModel"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Common.Timing;
using StgSharp.Controlling.UsrActivity;
using StgSharp.Graphics;
using StgSharp.Graphics.OpenGL;
using StgSharp.Mathematics;
using StgSharp.Mathematics.Graphics;
using StgSharp.MVVM;
using StgSharp.MVVM.ViewModel;
using StgSharp.Threading;
using StgSharp.Timing;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Numerics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
namespace StgSharp.MVVM.ViewModel
{
public abstract partial class ViewModelBase
{
private FrameBufferSizeHandler _resizeCallback;
private int _frameCount;
private int _frameSpeed;
private ViewPort viewPortDisplay;
// internal IntPtr monitor;
internal TimeSpanProvider fpsCountProvider;
internal TimeSpanProvider frameTimeProvider;
internal Vector4 backgroundColor;
protected ViewModelBase(
int frameSpeed
)
{
viewPortDisplay = new ViewPort();
allView = [];
fpsCountProvider = new TimeSpanProvider(TimeSequence.CreateLinear(double.PositiveInfinity, 1.0 / frameSpeed), TimeSpanProvider.DefaultProvider);
_frameSpeed = 0;
_frameCount = 0;
long frameLength = (FrameSpeed > 0) ? (1000L * 1000L / FrameSpeed) : 0;
frameTimeProvider = new TimeSpanProvider(TimeSequence.CreateLinear(double.PositiveInfinity, 1.0 / frameSpeed), TimeSpanProvider.DefaultProvider);
SetFrameSizeCallback(DefaultFrameResizeCallback);
}
protected ViewModelBase(
double frameLength
)
{
viewPortDisplay = new ViewPort();
allView = [];
fpsCountProvider = new TimeSpanProvider(TimeSequence.CreateLinear(double.PositiveInfinity, frameLength), TimeSpanProvider.DefaultProvider);
_frameSpeed = 0;
_frameCount = 0;
long _frameLength = (FrameSpeed > 0) ? ((long)(1000 * frameLength)) : 0;
frameTimeProvider = new TimeSpanProvider(TimeSequence.CreateLinear(double.PositiveInfinity, frameLength), TimeSpanProvider.DefaultProvider);
SetFrameSizeCallback(DefaultFrameResizeCallback);
}
public ViewModelBase(
ViewPort vBinding,
int frameSpeed
)
{
viewPortDisplay = vBinding;
allView = [];
fpsCountProvider = new TimeSpanProvider(TimeSequence.CreateLinear(double.PositiveInfinity, 1.0), TimeSpanProvider.DefaultProvider);
_frameSpeed = 0;
_frameCount = 0;
long frameLength = (frameSpeed > 0) ? (1000L * 1000L / frameSpeed) : 0;
frameTimeProvider = new TimeSpanProvider(TimeSequence.CreateLinear(double.PositiveInfinity, 1.0 / frameSpeed), TimeSpanProvider.DefaultProvider);
SetFrameSizeCallback(DefaultFrameResizeCallback);
}
public ViewModelBase(
ViewPort vBinding,
double frameLength
)
{
viewPortDisplay = vBinding;
allView = [];
fpsCountProvider = new TimeSpanProvider(TimeSequence.CreateLinear(double.PositiveInfinity, 1.0), TimeSpanProvider.DefaultProvider);
_frameSpeed = 0;
_frameCount = 0;
long _frameLength = (FrameSpeed > 0) ? ((long)(1000 * frameLength)) : 0;
frameTimeProvider = new TimeSpanProvider(TimeSequence.CreateLinear(double.PositiveInfinity, frameLength), TimeSpanProvider.DefaultProvider);
SetFrameSizeCallback(DefaultFrameResizeCallback);
}
public DataBindingEntry this[
string name
]
{
get
{
if (this.TryGetObjectReference(name, out DataBindingEntry entry)) {
return entry;
}
throw new KeyNotFoundException();
}
}
public bool ShouldClose
{
get => GraphicFramework.glfwWindowShouldClose(viewPortDisplay.ViewPortHandle) != 0;
set => GraphicFramework.glfwSetWindowShouldClose(
viewPortDisplay.ViewPortHandle, value ? 1 : 0);
}
public int CurrentFrameCount => frameTimeProvider.CurrentSpan;
public int FrameSpeed => _frameSpeed;
/// <summary>
/// Height of this form, represent in <see cref="int" />
/// </summary>
public int Height
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => viewPortDisplay.Height;
}
/// <summary>
/// Width of this form, represent in <see cref="int" />
/// </summary>
public int Width
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => viewPortDisplay.Width;
}
public unsafe IntPtr WindowID
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => viewPortDisplay.ViewPortHandle;
}
public string Name
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => viewPortDisplay.Name;
}
/// <summary>
/// Width of this form, represent in <see cref="int" />
/// </summary>
public Vec2 Size
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => new Vec2(Width, Height);
}
public ViewPort ViewPortBinding
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => viewPortDisplay;
}
public abstract void CustomizeInitialize();
/// <summary>
/// Set the Size limit of current form
/// </summary>
/// <param _label="minSize">
/// Minimum Size of current form. In form of a <see cref="Vec2" /> of (width,height)
/// </param>
/// <param _label="maxSize">
/// Maximum Size of current form. In form of a <see cref="Vec2" /> of (width,height)
/// </param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void SetSizeLimit(
Vec2 minSize,
Vec2 maxSize
)
{
ThreadHelper.MainThreadAssert();
GraphicFramework.glfwSetWindowSizeLimits(this.viewPortDisplay.ViewPortHandle,
(int)minSize.X, (int)minSize.Y, (int)maxSize.X,
(int)maxSize.Y);
}
/// <summary>
/// Set the Size limit of current form
/// </summary>
/// <param _label="minWidth">
/// Minimum width of current form
/// </param>
/// <param _label="minHeight">
/// Minimum height of current form
/// </param>
/// <param _label="maxWidth">
/// Maximum width of current form
/// </param>
/// <param _label="maxHeight">
/// Maximum height of current form
/// </param>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void SetSizeLimit(
int minWidth,
int minHeight,
int maxWidth,
int maxHeight
)
{
ThreadHelper.MainThreadAssert();
GraphicFramework.glfwSetWindowSizeLimits(this.viewPortDisplay.ViewPortHandle, minWidth,
minHeight, maxWidth, maxHeight);
}
public abstract bool TryGetObjectReference(
string name,
out DataBindingEntry entry
);
protected unsafe void SetFrameSizeCallback(
FrameBufferSizeHandler callback
)
{
_resizeCallback = callback;
IntPtr handlerPtr = Marshal.GetFunctionPointerForDelegate(callback);
_ = GraphicFramework.glfwSetFrameBufferSizeCallback(
viewPortDisplay.ViewPortHandle, (delegate* unmanaged[Cdecl]<IntPtr, int, int, void>)handlerPtr);
}
private void DefaultFrameResizeCallback(
IntPtr windowHandle,
int width,
int height
)
{
ViewPort.GetExistedViewPort(windowHandle, out ViewPort vp);
vp.RequestFlushSizeInNextFrame(width, height);
// Console.WriteLine($"{width} {height}");
}
}
}
-119
View File
@@ -1,119 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ViewPort"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Concurrent;
using System.Diagnostics;
using System.Diagnostics.Contracts;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
namespace StgSharp.MVVM
{
public class ViewPort
{
private static readonly ConcurrentDictionary<IntPtr, ViewPort> _handleToViewPortIndex = [];
private int _width, _height, _newWidth, _newHeight;
internal ViewPort()
{
_newHeight = 600;
_newWidth = 800;
FlushSize();
Name = new StackFrame(1, false).
GetMethod()!.DeclaringType!.Name;
Monitor = IntPtr.Zero;
ViewPortHandle = GraphicFramework.glfwCreateWindow(
_newWidth, _newHeight, Encoding.UTF8.GetBytes(Name), Monitor, IntPtr.Zero);
if (ViewPortHandle == IntPtr.Zero) {
throw new InvalidOperationException("Unable to create viewport handle.");
}
_ = _handleToViewPortIndex.TryAdd(ViewPortHandle, this);
}
public ViewPort(int width, int height, string name, IntPtr monitor)
{
_newWidth = width;
_newHeight = height;
FlushSize();
Name = name;
Monitor = monitor;
ViewPortHandle = GraphicFramework.glfwCreateWindow(
_newWidth, _newHeight, Encoding.UTF8.GetBytes(Name), Monitor, IntPtr.Zero);
if (ViewPortHandle == IntPtr.Zero) {
throw new InvalidOperationException("Unable to create viewport handle.");
}
_ = _handleToViewPortIndex.TryAdd(ViewPortHandle, this);
}
public unsafe int Height
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => _height;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal set => Interlocked.Exchange(ref _height, value);
}
public unsafe int Width
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get => _width;
[MethodImpl(MethodImplOptions.AggressiveInlining)]
internal set => Interlocked.Exchange(ref _width, value);
}
public IntPtr GraphicHandle { get; internal set; }
public IntPtr Monitor { get; internal set; }
public IntPtr ViewPortHandle { get; private set; }
public string Name { get; set; }
// [BlueprintNodeExecution]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool GetExistedViewPort(IntPtr handle, out ViewPort port)
{
return _handleToViewPortIndex.TryGetValue(handle, out port);
}
internal unsafe void FlushSize()
{
_ = Interlocked.Exchange(ref _height, _newHeight);
_ = Interlocked.Exchange(ref _width, _newWidth);
}
internal void RequestFlushSizeInNextFrame(int width, int height)
{
_ = Interlocked.Exchange(ref _newHeight, height);
_ = Interlocked .Exchange(ref _newWidth, width);
}
}
}
@@ -1,56 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="ISimpleStateMachine"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.State
{
public interface ISimpleStateMachine<TStateNode, TStateLabel, TStateContext>
where TStateNode : SimpleStateMachineNode<TStateNode, TStateLabel, TStateContext>
where TStateLabel : unmanaged, IEquatable<TStateLabel>
where TStateContext : StateContext
{
TStateNode this[
TStateLabel label
] { get; }
ref readonly TStateNode GetCurrentStateNode();
void Reset();
bool TryMoveNext(
TStateContext ctx
);
}
}
@@ -1,60 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="SimpleStateMachineNode"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.State
{
public abstract class SimpleStateMachineNode<TSelf, TLabel, TStateContext>
where TSelf : SimpleStateMachineNode<TSelf, TLabel, TStateContext>
where TLabel : unmanaged, IEquatable<TLabel>
where TStateContext : StateContext
{
private readonly List<int> _jumpTable = [];
public ReadOnlySpan<int> AvailableNodes => CollectionsMarshal.AsSpan(_jumpTable);
public abstract bool IsValidateFrom(
TSelf former,
TStateContext context
);
public abstract bool TryTransaction(
ReadOnlySpan<TSelf> nodeSpan,
TStateContext context,
out TLabel label
);
}
}
-40
View File
@@ -1,40 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="StateContext.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.State
{
public abstract class StateContext { }
}
-75
View File
@@ -1,75 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="Bullet"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Geometries;
using StgSharp.Mathematics;
using StgSharp.Mathematics.Graphics;
using System;
namespace StgSharp.Gaming
{
public abstract class Bullet : IInstancing, IPlainEntity
{
protected Bullet(
PlainInstancingBuffer<Bullet> buffer,
GeometryMotion movement,
Vec2 beginPosition,
float angle,
float scale)
{
ArgumentNullException.ThrowIfNull(buffer);
GlobalBuffer = buffer;
BufferId = buffer.CreateInstanceID();
((IInstancing)this).Scale = scale;
((IInstancing)this).Coord = new Vec3(beginPosition, 0);
((IInstancing)this).Rotation = angle;
Motion = movement;
}
public GeometryMotion Motion { get; set; }
public IInstancingBuffer GlobalBuffer { get; set; }
public int BufferId { get; set; }
public Vec2 CenterPosition { get; set; }
public bool CollideWith(IPlainEntity entity)
{
throw new System.NotImplementedException();
}
Vec3 IInstancing.CenterPositionGlobal
{
get => throw new NotImplementedException();
set => throw new NotImplementedException();
}
}
}
-181
View File
@@ -1,181 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="CollisionTexture"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Graphics.OpenGL;
using StgSharp.Internal;
using StgSharp.Mathematics;
using StgSharp.Mathematics.Graphics;
using StgSharp.MVVM;
using System;
using System.Buffers;
using System.Collections.Generic;
using System.Linq;
using System.Resources;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Stg
{
public interface IOneDimensionalCollisionTexture2D
{
public void Init(
Radius angleStride,
string name
);
}
public sealed class OneDimensionalCollisionTexture2D_GL : glRender, IOneDimensionalCollisionTexture2D
{
private float[] textureOutput;
private ElementBuffer ebo;
private FrameBuffer fbo;
private RenderBuffer rbo;
private ShaderProgram generatingShader;
private TextureGL t;
private VertexArray vao;
private VertexBuffer vbo;
public OneDimensionalCollisionTexture2D_GL() { }
public override bool IsContextSharable => false;
public void GenerateCollisionTexture(
IEnumerable<IInstancingBuffer> bufferEnumeration
)
{
fbo.Bind(0);
GL.ClearColor(0, 0, 0, 1);
GL.Clear(MaskBufferBit.DEPTH | MaskBufferBit.COLOR);
generatingShader.Use();
vao.Bind(0);
foreach (IInstancingBuffer item in bufferEnumeration)
{
IGeometry g = item.TypicalShape;
if (g is not PlainGeometry) {
throw new InvalidOperationException(
"The current particle buffer contains non-planar geometry,");
}
ebo.Bind(0);
ebo.SetValue<int>(0, g.VertexIndices, BufferUsage.StreamDraw);
vbo.WriteVectorData<Vec4>(0, item.CoordAndRotationSpan, BufferUsage.StreamDraw);
vao.SetVertexAttribute(1, 3, TypeCode.Single, false, 4 * sizeof(float), 0);
vao.SetVertexAttribute(2, 1, TypeCode.Single, false, 4 * sizeof(float),
3 * sizeof(float));
vbo.WriteScalerData<float>(2, item.ScalingSpan, BufferUsage.StreamDraw);
vao.SetVertexAttribute(3, 1, TypeCode.Single, false, sizeof(float), 0);
vbo.WriteVectorData(1, g.VertexStream, BufferUsage.StreamDraw);
vao.SetVertexAttribute(0, 3, TypeCode.Single, false, 4 * sizeof(float), 0);
GL.DrawElementsInstanced(GeometryType.TRIANGLES, (g.VertexIndices.Length) / 3,
TypeCode.UInt32, IntPtr.Zero, item.ScalingSpan.Length);
}
t.Bind2D(0);
GL.GetTextureImage(Texture2DTarget.Texture2D, 0, ImageChannel.SingleColor,
PixelChannelLayout.Float, textureOutput);
VertexArray.BindNull();
}
public void Init(
Radius angleStride,
string name
)
{
primeArgs = new ViewPort(1, (int)((new Radius(Scalar.Pi)) / angleStride), name,
IntPtr.Zero);
PlatformSpecifiedInitialize();
CustomizeInit();
}
#pragma warning disable CS8618
protected override void CustomizeDeinit()
{
throw new NotImplementedException();
}
protected override void CustomizeInit()
{
generatingShader = CreateShaderProgram();
Shader vertexShader = CreateShaderSegment(ShaderType.Vertex, 1);
Shader fragmentShader = CreateShaderSegment(ShaderType.Fragment, 1);
vertexShader.Compile(0, BuiltInShader.CollisionTextureVertexShader);
fragmentShader.Compile(0, BuiltInShader.CollisionTextureFragmentShader);
vertexShader.AttachTo(0, generatingShader);
fragmentShader.AttachTo(0, generatingShader);
generatingShader.Link();
generatingShader.Use();
vbo = CreateVertexBuffer(3);
vao = CreateVertexArray(1);
ebo = CreateElementBuffer(1);
fbo = CreateFrameBuffer(1);
rbo = CreateRenderBuffer(1);
GL.SetRenderBufferStorage(RenderBufferInternalFormat.Depth24_Stencil8, this.Size);
t = CreateTexture(1);
t.Bind2D(0);
GL.TextureImage2d<byte>(Texture2DTarget.Texture2D, 0, ImageChannel.WithAlphaChannel,
Width, Height, ImageChannel.WithAlphaChannel,
PixelChannelLayout.Byte, Array.Empty<byte>());
t.Set2dWrapProperty(0, TextureWrap.Repeat, TextureWrap.Repeat);
t.Set2dFilterProperty(0, TextureFilter.Nearest, TextureFilter.Nearest);
GL.FrameBufferTexture2d(FrameBufferTarget.All, glAttachment.Color(0),
Texture2DTarget.Texture2D, t[0], 0);
GL.CombineFrameBufferRenderBuffer(FrameBufferAttachment.Color, rbo[0]);
textureOutput = new float[this.Width];
}
}
}
-35
View File
@@ -1,35 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="TimeLine"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Stg
{
public class TimeLine { }
}
@@ -1,51 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="TouhouBuilder"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Graphics;
using StgSharp.Touhou;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Stg.Touhou
{
public static class TouhouBuilder
{
/*
public static ViewBase BuildTouhouWorld()
{
TouhouForm form = new TouhouForm();
return form;
}
/**/
}
}
@@ -1,44 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="TouhouWindow"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.Graphics;
using StgSharp.MVVM;
using StgSharp.MVVM.ViewModel;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Touhou
{
public abstract class TouhouWindowMain : ViewModelBase
{
protected TouhouWindowMain(ViewPort vp) : base(vp, 60) { }
}
}
@@ -1,48 +0,0 @@
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// file="OpenningView"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using StgSharp.MVVM;
using StgSharp.MVVM.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp.Stg.Touhou
{
public abstract class OpenningView : ViewBase
{
public override void CustomizedInitialize(ViewModelBase viewModelBinding)
{
throw new NotImplementedException();
}
}
}
+20 -147
View File
@@ -1,153 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<LangVersion>Preview</LangVersion>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Platforms>x64;ARM64</Platforms>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<PackageLicenseExpression> MIT</PackageLicenseExpression>
<EnableNETAnalyzers>True</EnableNETAnalyzers>
<AnalysisLevel>preview-all</AnalysisLevel>
<OutputType>Library</OutputType>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
</PropertyGroup>
<PropertyGroup>
<OutputType>Library</OutputType>
<IsNativeHost>true</IsNativeHost>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup Condition="'$(IsWindows)'=='true'">
<ProjectReference Include="..\StgSharp.Native\$(NativeLibName).vcxproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<GlobalPropertiesToRemove>TargetFramework</GlobalPropertiesToRemove>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Optimize>True</Optimize>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Optimize>False</Optimize>
<DebugType>portable</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Deterministic>False</Deterministic>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Graphics\**" />
<EmbeddedResource Remove="Graphics\**" />
<None Remove="Graphics\**" />
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Optimize>False</Optimize>
<DebugType>portable</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Deterministic>False</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Benchmark|x64'">
<Optimize>True</Optimize>
<DebugType>embedded</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Deterministic>False</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Benchmark|ARM64'">
<Optimize>True</Optimize>
<DebugType>embedded</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Deterministic>False</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>none</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Deterministic>False</Deterministic>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'">
<DebugType>none</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Deterministic>False</Deterministic>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DebugType>none</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Deterministic>False</Deterministic>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|ARM64'">
<DebugType>none</DebugType>
<NoWarn>1701;1702;0649;1591;0169</NoWarn>
<Deterministic>False</Deterministic>
<Optimize>True</Optimize>
</PropertyGroup>
<PropertyGroup>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'=='true'">
<DefineConstants>WINDOWS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsOSX)'=='true'">
<DefineConstants>OSX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'">
<DefineConstants>LINUX</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Graphics\**" />
<EmbeddedResource Remove="Graphics\**" />
<None Remove="Graphics\**" />
</ItemGroup>
<ItemGroup>
<None Remove=".nuspec" />
<None Remove="StgSharp.Common.deps.json" />
<None Remove="StgSharp.Common.dll" />
<None Remove="StgSharp.Common.pdb" />
<None Remove="StgSharp.Common.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.0" />
</ItemGroup>
<ItemGroup>
<None Update="..\StgSharpGraphic">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
</Target>
<PropertyGroup>
<MySymbol>$(ColiisionTextureVertexShader)</MySymbol>
<MySymbol>$(ColiisionTextureFragmentShader)</MySymbol>
<SignAssembly>False</SignAssembly>
<ErrorReport>send</ErrorReport>
<PackageProjectUrl>https://github.com/Nitload-NSI/StgSharp</PackageProjectUrl>
<RepositoryUrl>https://github.com/Nitload-NSI/StgSharp.git</RepositoryUrl>
</PropertyGroup>
<PropertyGroup>
<SolutionDir Condition="'$(SolutionDir)'=='' Or '$(SolutionDir)'=='*Undefined*'">$(MSBuildProjectDirectory)\..\</SolutionDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='NoOps|AnyCPU'">
<Deterministic>False</Deterministic>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='NoOps|x64'">
<Deterministic>False</Deterministic>
</PropertyGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(DisablePostBuildCopy)'!='true' And '$(SolutionDir)'!='' And '$(SolutionDir)'!='*Undefined*' And !$([System.String]::Copy('$(OutDir)').Contains('StgSharp.Benchmark'))">
<MakeDir Directories="$(SolutionDir)build" />
<Exec Command="xcopy /E /I /Y &quot;$(OutDir)&quot; &quot;$(SolutionDir)build&quot;" />
</Target>
</Project>
</Project>
@@ -1,30 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DebugType>none</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<DebugType>none</DebugType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StgSharp.Common\StgSharp.Common.csproj" />
<ProjectReference Include="..\StgSharp.Mathematics\StgSharp.Mathematics.csproj" />
@@ -1,15 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>Preview</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Platforms>x64;ARM64</Platforms>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
</PropertyGroup>
<ItemGroup>
<None Remove="Numeric\MatrixParallelHandle.cs.old" />
<None Remove="Numeric\MatrixParallelWrap.cs.old" />
@@ -19,20 +9,4 @@
<ProjectReference Include="..\StgSharp.Common\StgSharp.Common.csproj" />
</ItemGroup>
<PropertyGroup>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'=='true'">
<DefineConstants>WINDOWS</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsOSX)'=='true'">
<DefineConstants>OSX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'">
<DefineConstants>LINUX</DefineConstants>
</PropertyGroup>
</Project>
-13
View File
@@ -1,18 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<Platforms>x64</Platforms>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
<Deterministic>False</Deterministic>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StgSharp.Common\StgSharp.Common.csproj" />
<ProjectReference Include="..\StgSharp.Script\StgSharp.Script.csproj" />
+100 -85
View File
@@ -1,19 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- ════════════════════════════════════════════════════════ -->
<!-- ISA target:x64 + ARM64 -->
<!-- ════════════════════════════════════════════════════════ -->
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="PerformanceDebug|x64">
<Configuration>PerformanceDebug</Configuration>
<Platform>x64</Platform>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="PerformanceDebug|x64">
<Configuration>PerformanceDebug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="PerformanceDebug|ARM64">
<Configuration>PerformanceDebug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- Global Property -->
<!-- ════════════════════════════════════════════════════════ -->
<PropertyGroup Label="Globals">
<VCProjectVersion>17.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
@@ -23,21 +41,27 @@
<ProjectName>StgSharp.Native</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<!-- ════════════════════════════════════════════════════════ -->
<!-- Configuration -->
<!-- ════════════════════════════════════════════════════════ -->
<!-- Debug(x64 + ARM64 共用) -->
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<!-- Release(x64 + ARM64 共用) -->
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'" Label="Configuration">
<!-- PerformanceDebug(x64 + ARM64 共用) -->
<PropertyGroup Condition="'$(Configuration)'=='PerformanceDebug'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
@@ -49,111 +73,104 @@
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'" Label="PropertySheets">
<!-- PropertySheets(对所有 Configuration|Platform 生效) -->
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)build</OutDir>
<!-- ════════════════════════════════════════════════════════ -->
<!-- output folder: layered -->
<!-- ════════════════════════════════════════════════════════ -->
<PropertyGroup>
<!-- 把 ARM64 → arm64,x64 保持 x64 -->
<_ArchTag Condition="'$(Platform)'=='x64'">x64</_ArchTag>
<_ArchTag Condition="'$(Platform)'=='ARM64'">arm64</_ArchTag>
<!-- 输出到 build/win-<arch>/ -->
<OutDir>$(SolutionDir)build\win-$(_ArchTag)\</OutDir>
<IntDir>$(SolutionDir)obj\$(ProjectName)\$(Configuration)\$(Platform)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<RunCodeAnalysis>true</RunCodeAnalysis>
<EnableClangTidyCodeAnalysis>false</EnableClangTidyCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)build</OutDir>
<PropertyGroup Condition="'$(Configuration)'=='Release' Or '$(Configuration)'=='PerformanceDebug'">
<GenerateManifest>false</GenerateManifest>
<RunCodeAnalysis>true</RunCodeAnalysis>
<EnableClangTidyCodeAnalysis>false</EnableClangTidyCodeAnalysis>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'">
<OutDir>$(SolutionDir)build</OutDir>
<GenerateManifest>false</GenerateManifest>
<RunCodeAnalysis>true</RunCodeAnalysis>
<EnableClangTidyCodeAnalysis>false</EnableClangTidyCodeAnalysis>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<!-- ════════════════════════════════════════════════════════ -->
<!-- Compile options: common to all configurations -->
<!-- ════════════════════════════════════════════════════════ -->
<ItemDefinitionGroup>
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>Default</LanguageStandard>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
<ExpandAttributedSource>true</ExpandAttributedSource>
<AssemblerOutput>All</AssemblerOutput>
<BrowseInformation>true</BrowseInformation>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>$(ProjectDir)lib;$(ProjectDir)sn-head;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<!-- DLL 应该用 Windows,不是 Console -->
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>opengl32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Debug 特有 -->
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
<ExpandAttributedSource>true</ExpandAttributedSource>
<AssemblerOutput>All</AssemblerOutput>
<BrowseInformation>true</BrowseInformation>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Bscmake>
<PreserveSbr>true</PreserveSbr>
</Bscmake>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<!-- Release + PerformanceDebug 共用(优化开启) -->
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release' Or '$(Configuration)'=='PerformanceDebug'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AssemblerOutput>All</AssemblerOutput>
<LanguageStandard>Default</LanguageStandard>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<CompileAs>CompileAsC</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(ProjectDir)lib;$(ProjectDir)sn-head;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<ShowProgress>LinkVerbose</ShowProgress>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<!-- Release 独有(InlineFunctionExpansion) -->
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>LinkVerbose</ShowProgress>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AssemblerOutput>All</AssemblerOutput>
<LanguageStandard>Default</LanguageStandard>
<LanguageStandard_C>stdc11</LanguageStandard_C>
<CompileAs>CompileAsC</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<AdditionalIncludeDirectories>$(ProjectDir)lib;$(ProjectDir)sn-head;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>opengl32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies)</AdditionalDependencies>
<ShowProgress>LinkVerbose</ShowProgress>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- glfw static lib -->
<!-- ════════════════════════════════════════════════════════ -->
<ItemGroup Condition="'$(Platform)'=='x64'">
<Library Include="lib\glfw\glfw3.lib" />
<Library Include="lib\glfw\glfw3_mt.lib" />
</ItemGroup>
<ItemGroup Condition="'$(Platform)'=='ARM64'">
<Library Include="lib\glfw\glfw3.lib" />
<Library Include="lib\glfw\glfw3_mt.lib" />
</ItemGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- source files -->
<!-- ════════════════════════════════════════════════════════ -->
<ItemGroup>
<ClCompile Include="sn-src\m.basic.x86.c" />
<ClCompile Include="sn-src\dllmain.c" />
@@ -163,9 +180,7 @@
<ClCompile Include="sn-src\s.factorial.x86.c" />
<ClCompile Include="sn-src\m.fma.x86.c" />
<ClCompile Include="sn-src\s.hash.x86.c" />
<ClCompile Include="sn-src\load_intrinsic.x86.c">
<FileType>CCode</FileType>
</ClCompile>
<ClCompile Include="sn-src\load_intrinsic.x86.c" />
<ClCompile Include="sn-src\load_glfw.c" />
<ClCompile Include="sn-src\simdid.x86.c" />
<ClCompile Include="sn-src\simdid_compare.x86.c" />
@@ -175,6 +190,9 @@
<ClCompile Include="sn-src\vector.c" />
<ClCompile Include="sn-src\vector_dot.c" />
</ItemGroup>
<!-- ════════════════════════════════════════════════════════ -->
<!-- header files -->
<!-- ════════════════════════════════════════════════════════ -->
<ItemGroup>
<ClInclude Include="lib\glfw\glfw3.h" />
<ClInclude Include="lib\glfw\glfw3native.h" />
@@ -183,17 +201,14 @@
<ClInclude Include="sn-head\glfw_function.h" />
<ClInclude Include="sn-head\khrplatform.h" />
<ClInclude Include="sn-head\sn_internal.h" />
<ClInclude Include="sn-head\sn_intrincontext.x86.h" />
<ClInclude Include="sn-head\sn_intrinsic.context.x86.h" />
<ClInclude Include="sn-head\sn_intrinsic.std.h" />
<ClInclude Include="sn-head\sn_intrinsic.h" />
<ClInclude Include="sn-head\sn_matkernel.h" />
<ClInclude Include="sn-head\sn_intrinsic.matkernel.h" />
<ClInclude Include="sn-head\sn_target.h" />
<ClInclude Include="sn-head\StgSharpNative.h" />
<ClInclude Include="sn-head\wgl.h" />
</ItemGroup>
<ItemGroup>
<Library Include="lib\glfw\glfw3.lib" />
<Library Include="lib\glfw\glfw3_mt.lib" />
</ItemGroup>
<ItemGroup>
<None Include="naming.md" />
<None Include="SIMDID.x86.md" />
@@ -89,7 +89,7 @@
<ClInclude Include="sn-head\glfw_function.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="sn-head\sn_matkernel.h">
<ClInclude Include="sn-head\sn_intrinsic.matkernel.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="lib\glfw\glfw3.h">
@@ -104,12 +104,15 @@
<ClInclude Include="sn-head\sn_target.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="sn-head\sn_intrincontext.x86.h">
<ClInclude Include="sn-head\sn_intrinsic.context.x86.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="sn-head\sn_intrinsic.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="sn-head\sn_intrinsic.std.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Library Include="lib\glfw\glfw3.lib">
+2
View File
@@ -4,6 +4,8 @@
#include <xmmintrin.h>
#define UNSAFE_AS(type, expr) *(type *)&(expr)
#ifdef _MSC_VER
#define _CRT_SECURE_NO_WARNINGS 1
#define WIN32_LEAN_AND_MEAN
@@ -1,232 +1,234 @@
#include "sn_target.h"
#if SN_IS_ARCH(SN_ARCH_X86_64)
#include "sn_intrinsic.h"
// -----------------------------------------------------------------------------
// SIMDID layout helpers (see SIMDID.x86.md)
// bits [3..0] : Root ISA
// bits [7..4] : Manufacture (ISA-specific)
// bits [15..8] : MainLevel (monotonic capability)
// bits [31..16]: AVX512 Feature
// bits [39..32]: AMX Feature
// bits [47..40]: AVX Feature
// bits [55..48]: AVX10 Feature
// bits [63..56]: uArchHi / Policy (optional)
// -----------------------------------------------------------------------------
#define SIMDID_SHIFT_ROOT 0
#define SIMDID_SHIFT_MANU 4
#define SIMDID_SHIFT_MAIN 8
#define SIMDID_SHIFT_AVX512 16
#define SIMDID_SHIFT_AMX 32
#define SIMDID_SHIFT_AVX 40
#define SIMDID_SHIFT_AVX10 48
#define SIMDID_SHIFT_UARCH 56
#define SIMDID_MASK_ROOT 0xFULL
#define SIMDID_MASK_MANU (0xFULL << SIMDID_SHIFT_MANU)
#define SIMDID_MASK_MAIN (0xFFULL << SIMDID_SHIFT_MAIN)
#define SIMDID_MASK_AVX512 (0xFFFFULL << SIMDID_SHIFT_AVX512)
#define SIMDID_MASK_AMX (0xFFULL << SIMDID_SHIFT_AMX)
#define SIMDID_MASK_AVX (0xFFULL << SIMDID_SHIFT_AVX)
#define SIMDID_MASK_AVX10 (0xFFULL << SIMDID_SHIFT_AVX10)
#define SIMDID_MASK_UARCH (0xFFULL << SIMDID_SHIFT_UARCH)
// Root ISA (low nibble)
#define SIMDID_ROOT_UNKNOWN 0x0
#define SIMDID_ROOT_X86_64 0x1
#define SIMDID_ROOT_AARCH64 0x2
#define SIMDID_ROOT_PPC64LE 0x3
#define SIMDID_ROOT_RISCV64 0x4
#define SIMDID_ROOT_LOONGARCH 0x5
// Manufacture (x86-64 mapping; other ISAs may reinterpret)
#define SIMDID_MANU_UNKNOWN 0x0
#define SIMDID_MANU_INTEL 0x1
#define SIMDID_MANU_AMD 0x2
#define SIMDID_MANU_VIA 0x3
#define SIMDID_MANU_HYGON 0x4 /* 海光: Zen1-derived, separate from AMD */
// MainLevel (ordinal, shared bits 8..15; not bit-flags)
#define SIMDID_MAIN_LVL_NONE 0x00u
#define SIMDID_MAIN_LVL_SSE 0x01u /* SSE1..SSE4.2 */
#define SIMDID_MAIN_LVL_AVX2 0x02u
#define SIMDID_MAIN_LVL_AVX512 0x03u
#define SIMDID_MAIN_LVL_AMX 0x04u
#define SIMDID_MAIN_LVL_AVX10 0x05u
#ifndef SIMDID_AVX512_BASE
#define SIMDID_AVX512_FP16 (1U << 13) /* relative bit 13 within [31..16] */
#define SIMDID_AVX512_BF16 (1U << 12)
#define SIMDID_AVX512_VNNI (1U << 11)
#define SIMDID_AVX512_VBMI2 (1U << 10)
#define SIMDID_AVX512_VBMI (1U << 9)
#define SIMDID_AVX512_AI_RESERVED (1U << 8)
#define SIMDID_AVX512_BASE (1U << 4)
#define SIMDID_AVX512_IMPL_SHIFT 6
#define SIMDID_AVX512_IMPL_MASK (0x3U << SIMDID_AVX512_IMPL_SHIFT)
#define SIMDID_AVX512_IMPL_UNKNOWN (0x0U << SIMDID_AVX512_IMPL_SHIFT)
#define SIMDID_AVX512_IMPL_DUAL (0x1U << SIMDID_AVX512_IMPL_SHIFT)
#define SIMDID_AVX512_IMPL_NATIVE (0x2U << SIMDID_AVX512_IMPL_SHIFT)
#endif
#ifndef SIMDID_AVX_BASE
#define SIMDID_AVX (1U << 0) /* relative bit 0 within [47..40] */
#define SIMDID_AVX2 (1U << 1)
#define SIMDID_AVX_FMA (1U << 2)
#define SIMDID_AVX_F16C (1U << 3)
#define SIMDID_AVX_DUAL (1U << 4) /* glued/split-lane YMM (two 128-bit units; Zen1, Hygon, VIA/Zhaoxin) */
#endif
#ifndef SIMDID_AMX_TILE
#define SIMDID_AMX_TILE (1U << 0) /* relative bit 0 within [39..32] */
#define SIMDID_AMX_INT8 (1U << 1)
#define SIMDID_AMX_BF16 (1U << 2)
#endif
#ifndef SIMDID_AVX10_BASE
#define SIMDID_AVX10 (1U << 0) /* relative bit 0 within [55..48] */
#define SIMDID_AVX10_V1 (1U << 1)
#define SIMDID_AVX10_V2 (1U << 2)
#define SIMDID_AVX10_256W (1U << 3)
#define SIMDID_AVX10_512W (1U << 4)
#endif
/* uArchHi ([63..56]) bitmask — core topology and SIMD-width execution policy */
#ifndef SIMDID_UARCH_HYBRID_P
/* Topology 2-bit field (bits [1..0] of uArchHi byte):
* 00 = unknown (undetected hybrid type or pre-CPUID.1A hardware)
* 01 = E-core (efficiency/small core in a hybrid CPU)
* 10 = P-core (performance/big core in a hybrid CPU)
* 11 = unified (confirmed non-hybrid; numerically strongest)
* Higher numeric value == stronger / higher-capability topology. */
#define SIMDID_UARCH_HYBRID_E (1U << 0) /* E-core (efficiency/small) in a hybrid topology */
#define SIMDID_UARCH_HYBRID_P (1U << 1) /* P-core (performance/big) in a hybrid topology */
#define SIMDID_UARCH_SIMD_DUAL (1U << 2) /* SIMD is glued/dual (summary: AVX_DUAL or AVX512_IMPL=DUAL) */
#endif
// Pack helpers (define locally to avoid missing macros when included standalone)
#ifndef SIMDID_PACK_ROOT
#define SIMDID_PACK_ROOT(root) (((uint64_t)(root) & 0xFULL) << SIMDID_SHIFT_ROOT)
#define SIMDID_PACK_MANU(manu) (((uint64_t)(manu) & 0xFULL) << SIMDID_SHIFT_MANU)
#define SIMDID_PACK_MAIN(main) (((uint64_t)(main) & 0xFFULL) << SIMDID_SHIFT_MAIN)
#define SIMDID_PACK_AVX512(avx512_bits) \
(((uint64_t)(avx512_bits) & 0xFFFFULL) << SIMDID_SHIFT_AVX512)
#define SIMDID_PACK_AMX(amx_bits) (((uint64_t)(amx_bits) & 0xFFULL) << SIMDID_SHIFT_AMX)
#define SIMDID_PACK_AVX(avx_bits) (((uint64_t)(avx_bits) & 0xFFULL) << SIMDID_SHIFT_AVX)
#define SIMDID_PACK_AVX10(avx10_bits) (((uint64_t)(avx10_bits) & 0xFFULL) << SIMDID_SHIFT_AVX10)
#define SIMDID_PACK_UARCH(uarch_hi) (((uint64_t)(uarch_hi) & 0xFFULL) << SIMDID_SHIFT_UARCH)
#endif
/* Pre-shifted helpers for convenience when constructing SIMDID */
#define SIMDID_MAIN_ENC_NONE SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_NONE)
#define SIMDID_MAIN_ENC_SSE SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_SSE)
#define SIMDID_MAIN_ENC_AVX2 SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_AVX2)
#define SIMDID_MAIN_ENC_AVX512 SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_AVX512)
#define SIMDID_MAIN_ENC_AMX SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_AMX)
#define SIMDID_MAIN_ENC_AVX10 SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_AVX10)
#pragma region matix function
INTERNAL void f32_normalize(VEC(float) * source, VEC(float) * target);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, sse, , add);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, , add);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, 512, , add);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, , add);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, , add);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, , add);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, sse, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, 512, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, , sub);
DECLARE_KER_PROC_RIGHT_ANS(float, sse, , transpose);
DECLARE_KER_PROC_RIGHT_ANS(float, avx, , transpose);
DECLARE_KER_PROC_RIGHT_ANS(float, 512, , transpose);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, sse, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, avx, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, 512, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, sse, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, avx, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, 512, , scalar_mul);
DECLARE_BUF_PROC_ANS_SCALAR(float, sse, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(float, avx, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(float, 512, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(double, sse, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(double, avx, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(double, 512, , fill);
DECLARE_PNL_PROC_ANS(float, sse, , clear);
DECLARE_PNL_PROC_ANS(float, avx, , clear);
DECLARE_PNL_PROC_ANS(float, 512, , clear);
DECLARE_PNL_PROC_ANS(double, sse, , clear);
DECLARE_PNL_PROC_ANS(double, avx, , clear);
DECLARE_PNL_PROC_ANS(double, 512, , clear);
DECLARE_KER_PROC_RIGHT_ANS(float, sse, , quality);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(float, sse, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(float, avx, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(float, avx, _fma, fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(float, 512, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(double, sse, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(double, avx, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(double, avx, _fma, fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(double, 512, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(float, sse, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(float, avx, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(float, avx, _fma, fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(float, 512, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(double, sse, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(double, avx, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(double, avx, _fma, fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(double, 512, , fma);
#pragma endregion
#pragma region scaler_simd
INTERNAL uint64_t SN_DECL factorial_simd_sse(int n);
#pragma endregion
#pragma region dot_product
INTERNAL void FORCEINLINE SN_DECL dot_41_sse(MAT_KERNEL(float) const *transpose,
__m128 const *vector, __m128 *ans);
INTERNAL void SN_DECL dot_41_avx(MAT_KERNEL(float) const *transpose, __m128 const *vector,
__m128 *ans);
INTERNAL void SN_DECL dot_42_sse(MAT_KERNEL(float) const *transpose, __m128 const *vector,
__m128 *ans);
INTERNAL void SN_DECL dot_42_avx(MAT_KERNEL(float) const *transpose, __m128 const *vector,
__m128 *ans);
#pragma endregion
#pragma region string
INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int length);
INTERNAL int SN_DECL index_pair_sse(short const *stram, uint32_t target, int length);
#pragma endregion
#else
typedef enum intrinsic_level { SIMD0 = 0 } intrinsic_level;
#endif
#include "sn_target.h"
#if SN_IS_ARCH(SN_ARCH_X86_64)
#include "sn_intrinsic.h"
// -----------------------------------------------------------------------------
// SIMDID layout helpers (see SIMDID.x86.md)
// bits [3..0] : Root ISA
// bits [7..4] : Manufacture (ISA-specific)
// bits [15..8] : MainLevel (monotonic capability)
// bits [31..16]: AVX512 Feature
// bits [39..32]: AMX Feature
// bits [47..40]: AVX Feature
// bits [55..48]: AVX10 Feature
// bits [63..56]: uArchHi / Policy (optional)
// -----------------------------------------------------------------------------
#define SIMDID_SHIFT_ROOT 0
#define SIMDID_SHIFT_MANU 4
#define SIMDID_SHIFT_MAIN 8
#define SIMDID_SHIFT_AVX512 16
#define SIMDID_SHIFT_AMX 32
#define SIMDID_SHIFT_AVX 40
#define SIMDID_SHIFT_AVX10 48
#define SIMDID_SHIFT_UARCH 56
#define SIMDID_MASK_ROOT 0xFULL
#define SIMDID_MASK_MANU (0xFULL << SIMDID_SHIFT_MANU)
#define SIMDID_MASK_MAIN (0xFFULL << SIMDID_SHIFT_MAIN)
#define SIMDID_MASK_AVX512 (0xFFFFULL << SIMDID_SHIFT_AVX512)
#define SIMDID_MASK_AMX (0xFFULL << SIMDID_SHIFT_AMX)
#define SIMDID_MASK_AVX (0xFFULL << SIMDID_SHIFT_AVX)
#define SIMDID_MASK_AVX10 (0xFFULL << SIMDID_SHIFT_AVX10)
#define SIMDID_MASK_UARCH (0xFFULL << SIMDID_SHIFT_UARCH)
// Root ISA (low nibble)
#define SIMDID_ROOT_UNKNOWN 0x0
#define SIMDID_ROOT_X86_64 0x1
#define SIMDID_ROOT_AARCH64 0x2
#define SIMDID_ROOT_PPC64LE 0x3
#define SIMDID_ROOT_RISCV64 0x4
#define SIMDID_ROOT_LOONGARCH 0x5
// Manufacture (x86-64 mapping; other ISAs may reinterpret)
#define SIMDID_MANU_UNKNOWN 0x0
#define SIMDID_MANU_INTEL 0x1
#define SIMDID_MANU_AMD 0x2
#define SIMDID_MANU_VIA 0x3
#define SIMDID_MANU_HYGON 0x4 /* 海光: Zen1-derived, separate from AMD */
// MainLevel (ordinal, shared bits 8..15; not bit-flags)
#define SIMDID_MAIN_LVL_NONE 0x00u
#define SIMDID_MAIN_LVL_SSE 0x01u /* SSE1..SSE4.2 */
#define SIMDID_MAIN_LVL_AVX2 0x02u
#define SIMDID_MAIN_LVL_AVX512 0x03u
#define SIMDID_MAIN_LVL_AMX 0x04u
#define SIMDID_MAIN_LVL_AVX10 0x05u
#ifndef SIMDID_AVX512_BASE
#define SIMDID_AVX512_FP16 U << 13) relative bit 13 within [31..16] */
#define SIMDID_AVX512_BF16 U << 12)
#define SIMDID_AVX512_VNNI U << 11)
#define SIMDID_AVX512_VBMI2 U << 10)
#define SIMDID_AVX512_VBMI U << 9)
#define SIMDID_AVX512_AI_RESERVED U << 8)
#define SIMDID_AVX512_BASE U << 4)
#define SIMDID_AVX512_IMPL_SHIFT
#define SIMDID_AVX512_IMPL_MASK x3U << SIMDID_AVX512_IMPL_SHIFT)
#define SIMDID_AVX512_IMPL_UNKNOWN x0U << SIMDID_AVX512_IMPL_SHIFT)
#define SIMDID_AVX512_IMPL_DUAL x1U << SIMDID_AVX512_IMPL_SHIFT)
#define SIMDID_AVX512_IMPL_NATIVE x2U << SIMDID_AVX512_IMPL_SHIFT)
#endif
#ifndef SIMDID_AVX_BASE
#define SIMDID_AVX U << 0) relative bit 0 within [47..40] */
#define SIMDID_AVX2 U << 1)
#define SIMDID_AVX_FMA U << 2)
#define SIMDID_AVX_F16C (1U << 3)
#define SIMDID_AVX_DUAL ( \
U << 4) glued/split-lane YMM (two 128-bit units; Zen1, Hygon, VIA/Zhaoxin) */
#endif
#ifndef SIMDID_AMX_TILE
#define SIMDID_AMX_TILE (1U << 0) relative bit 0 within [39..32] */
#define SIMDID_AMX_INT8 (1U << 1)
#define SIMDID_AMX_BF16 (1U << 2)
#endif
#ifndef SIMDID_AVX10_BASE
#define SIMDID_AVX10 U << 0) /* relative bit 0 within [55..48] */
#define SIMDID_AVX10_V1 U << 1)
#define SIMDID_AVX10_V2 U << 2)
#define SIMDID_AVX10_256W (1U << 3)
#define SIMDID_AVX10_512W (1U << 4)
#endif
/* uArchHi ([63..56]) bitmask — core topology and SIMD-width execution policy */
#ifndef SIMDID_UARCH_HYBRID_P
/* Topology 2-bit field (bits [1..0] of uArchHi byte):
* 00 = unknown (undetected hybrid type or pre-CPUID.1A hardware)
* 01 = E-core (efficiency/small core in a hybrid CPU)
* 10 = P-core (performance/big core in a hybrid CPU)
* 11 = unified (confirmed non-hybrid; numerically strongest)
* Higher numeric value == stronger / higher-capability topology. */
#define SIMDID_UARCH_HYBRID_E << 0) / E-core (efficiency/small) in a hybrid topology */
#define SIMDID_UARCH_HYBRID_P << 1) / P-core (performance/big) in a hybrid topology */
#define SIMDID_UARCH_SIMD_DUAL ( \
<< 2) / SIMD is glued/dual (summary: AVX_DUAL or AVX512_IMPL=DUAL) */
#endif
// Pack helpers (define locally to avoid missing macros when included standalone)
#ifndef SIMDID_PACK_ROOT
#define SIMDID_PACK_ROOT(root) (((uint64_t)(root) & 0xFULL) << SIMDID_SHIFT_ROOT)
#define SIMDID_PACK_MANU(manu) (((uint64_t)(manu) & 0xFULL) << SIMDID_SHIFT_MANU)
#define SIMDID_PACK_MAIN(main) (((uint64_t)(main) & 0xFFULL) << SIMDID_SHIFT_MAIN)
#define SIMDID_PACK_AVX512(avx512_bits) \
(((uint64_t)(avx512_bits) & 0xFFFFULL) << SIMDID_SHIFT_AVX512)
#define SIMDID_PACK_AMX(amx_bits) (((uint64_t)(amx_bits) & 0xFFULL) << SIMDID_SHIFT_AMX)
#define SIMDID_PACK_AVX(avx_bits) (((uint64_t)(avx_bits) & 0xFFULL) << SIMDID_SHIFT_AVX)
#define SIMDID_PACK_AVX10(avx10_bits) (((uint64_t)(avx10_bits) & 0xFFULL) << SIMDID_SHIFT_AVX10)
#define SIMDID_PACK_UARCH(uarch_hi) (((uint64_t)(uarch_hi) & 0xFFULL) << SIMDID_SHIFT_UARCH)
#endif
/* Pre-shifted helpers for convenience when constructing SIMDID */
#define SIMDID_MAIN_ENC_NONE SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_NONE)
#define SIMDID_MAIN_ENC_SSE SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_SSE)
#define SIMDID_MAIN_ENC_AVX2 SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_AVX2)
#define SIMDID_MAIN_ENC_AVX512 SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_AVX512)
#define SIMDID_MAIN_ENC_AMX SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_AMX)
#define SIMDID_MAIN_ENC_AVX10 SIMDID_PACK_MAIN(SIMDID_MAIN_LVL_AVX10)
#pragma region matix function
INTERNAL void f32_normalize(VEC(float) * source, VEC(float) * target);
STD_MK_PROC_DECL(float, sse, , add);
STD_MK_PROC_DECL(float, avx, , add);
STD_MK_PROC_DECL(float, 512, , add);
STD_MK_PROC_DECL(double, sse, , add);
STD_MK_PROC_DECL(double, avx, , add);
STD_MK_PROC_DECL(double, 512, , add);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, sse, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, 512, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, , sub);
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, , sub);
DECLARE_KER_PROC_RIGHT_ANS(float, sse, , transpose);
DECLARE_KER_PROC_RIGHT_ANS(float, avx, , transpose);
DECLARE_KER_PROC_RIGHT_ANS(float, 512, , transpose);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, sse, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, avx, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, 512, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, sse, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, avx, , scalar_mul);
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, 512, , scalar_mul);
DECLARE_BUF_PROC_ANS_SCALAR(float, sse, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(float, avx, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(float, 512, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(double, sse, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(double, avx, , fill);
DECLARE_BUF_PROC_ANS_SCALAR(double, 512, , fill);
DECLARE_PNL_PROC_ANS(float, sse, , clear);
DECLARE_PNL_PROC_ANS(float, avx, , clear);
DECLARE_PNL_PROC_ANS(float, 512, , clear);
DECLARE_PNL_PROC_ANS(double, sse, , clear);
DECLARE_PNL_PROC_ANS(double, avx, , clear);
DECLARE_PNL_PROC_ANS(double, 512, , clear);
DECLARE_KER_PROC_RIGHT_ANS(float, sse, , quality);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(float, sse, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(float, avx, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(float, avx, _fma, fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(float, 512, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(double, sse, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(double, avx, , fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(double, avx, _fma, fma);
DECLARE_KER_PROC_LEFT_RIGHT_ANS(double, 512, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(float, sse, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(float, avx, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(float, avx, _fma, fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(float, 512, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(double, sse, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(double, avx, , fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(double, avx, _fma, fma);
DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(double, 512, , fma);
#pragma endregion
#pragma region scaler_simd
INTERNAL uint64_t SN_DECL factorial_simd_sse(int n);
#pragma endregion
#pragma region dot_product
INTERNAL void FORCEINLINE SN_DECL dot_41_sse(MAT_KERNEL(float) const *transpose,
__m128 const *vector, __m128 *ans);
INTERNAL void SN_DECL dot_41_avx(MAT_KERNEL(float) const *transpose, __m128 const *vector,
__m128 *ans);
INTERNAL void SN_DECL dot_42_sse(MAT_KERNEL(float) const *transpose, __m128 const *vector,
__m128 *ans);
INTERNAL void SN_DECL dot_42_avx(MAT_KERNEL(float) const *transpose, __m128 const *vector,
__m128 *ans);
#pragma endregion
#pragma region string
INTERNAL int SN_DECL city_hash_simplify_sse(byte const *str, int length);
INTERNAL int SN_DECL index_pair_sse(short const *stram, uint32_t target, int length);
#pragma endregion
#else
typedef enum intrinsic_level { SIMD0 = 0 } intrinsic_level;
#endif
+11 -156
View File
@@ -4,7 +4,7 @@
#define SSC_INTRIN_HEAD
#include "StgSharpNative.h"
#include "sn_matkernel.h"
#include "sn_intrinsic.matkernel.h"
#include <immintrin.h>
#include <smmintrin.h>
#include <stdint.h>
@@ -47,18 +47,6 @@ typedef union scalar_pack {
uint64_t data[8];
} scalar_pack;
// define operation style:
#define PANEL_OP 1
#define BUFFER_OP 2
#define KERNEL_OP 3
#define RIGHT_ANS_PARAM 1
#define LEFT_RIGHT_ANS_PARAM 2
#define RIGHT_ANS_SCALAR_PARAM 3
#define LEFT_RIGHT_ANS_SCALAR_PARAM 4
#define ANS_SCALAR_PARAM 5
/* Mirrors StgSharp.Mathematics.Numeric.MatrixParallelTaskPackage<T> (128 bytes). */
#define MAT_TASK(T) \
struct { \
@@ -84,140 +72,7 @@ static_assert(sizeof(matrix_task) == 128, "matrix_parallel_task_package size mis
static_assert(sizeof(MAT_TASK(float)) == 128, "matrix_parallel_task_package size mismatch");
#endif
typedef void(SN_DECL *UNIFIKERNELPROC)(matrix_task *task);
#define UNIFIKERNRLPROC(T_arch, T_feature, T_op) mat_proc_##T_op##_##T_arch##_##T_feature
#pragma region matrix buffer operation function type
typedef void(SN_DECL *BUF_PROC_AS)(mat_kernel *ans, scalar_pack *scalar, int count);
typedef void(SN_DECL *BUF_PROC_RAS)(mat_kernel *right, mat_kernel *ans, scalar_pack *scalar,
int count);
typedef void(SN_DECL *BUF_PROC_LRAS)(mat_kernel *left, mat_kernel *right, mat_kernel *ans,
scalar_pack *scalar, int count);
typedef void(SN_DECL *BUF_PROC_RA)(mat_kernel *right, mat_kernel *ans, int count);
typedef void(SN_DECL *BUF_PROC_LRA)(mat_kernel *left, mat_kernel *right, mat_kernel *ans,
int count);
#define BUF_PROC(T_type, T_arch, T_feature, T_op_name) \
T_type##_buf_##T_op_name##_##T_arch##T_feature
#define DECLARE_BUF_PROC_ANS_SCALAR(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL BUF_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) *restrict ans, scalar_pack const *scalar, size_t count)
#define DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL BUF_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *right, MAT_KERNEL(T_type) *restrict ans, \
scalar_pack const *scalar, size_t count)
#define DECLARE_BUF_PROC_LEFT_RIGHT_ANS_SCALAR(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL BUF_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *left, MAT_KERNEL(T_type) const *right, \
MAT_KERNEL(T_type) *restrict ans, scalar_pack const *scalar, size_t count)
#define DECLARE_BUF_PROC_RIGHT_ANS(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL BUF_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *right, MAT_KERNEL(T_type) *restrict ans, size_t count)
#define DECLARE_BUF_PROC_LEFT_RIGHT_ANS(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL BUF_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *left, MAT_KERNEL(T_type) const *right, \
MAT_KERNEL(T_type) *restrict ans, size_t count)
#pragma endregion
#pragma region matrix panel function type
typedef void(SN_DECL *PANEL_PROC)(mat_panel *panel, mat_kernel *kernel, int col_length,
int row_length, int col_index, int row_index);
typedef void(SN_DECL *PNL_PROC_LRA)(mat_panel *left, mat_panel *right, mat_panel *ans);
typedef void(SN_DECL *PNL_PROC_RA)(mat_panel *right, mat_panel *ans);
typedef void(SN_DECL *PNL_PROC_LRAS)(mat_panel *left, mat_panel *right, mat_panel *ans,
scalar_pack *scalar);
typedef void(SN_DECL *PNL_PROC_RAS)(mat_panel *right, mat_panel *ans, scalar_pack *scalar);
#define PNL_PROC(T_type, T_arch, T_feature, T_op_name) \
T_type##_pnl_##T_op_name##_##T_arch##T_feature
#define DECLARE_PNL_PROC_ANS(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL PNL_PROC(T_type, T_arch, T_feature, \
T_op_name)(MAT_PANEL_##T_arch##(T_type) *restrict ans)
#define DECLARE_PNL_PROC_LEFT_RIGHT_ANS(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL PNL_PROC(T_type, T_arch, T_feature, \
T_op_name)(MAT_PANEL_##T_arch##(T_type) const *left, \
MAT_PANEL_##T_arch##(T_type) const *right, \
MAT_PANEL_##T_arch##(T_type) *restrict ans)
#define DECLARE_PNL_PROC_LEFT_RIGHT_ANS_SCALAR(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL PNL_PROC(T_type, T_arch, T_op_name)( \
MAT_PANEL_##T_arch##(T_type) const *left, \
MAT_PANEL_##T_arch##(T_type) const *right, \
MAT_PANEL_##T_arch##(T_type) *restrict ans, scalar_pack const *scalar)
#pragma endregion
#pragma region matrix kernel function type
typedef void(SN_DECL *KER_PROC_AS)(mat_kernel *ans, scalar_pack *scalar);
typedef void(SN_DECL *KER_PROC_RA)(mat_kernel *left, mat_kernel *ans);
typedef void(SN_DECL *KER_PROC_LRA)(mat_kernel *left, mat_kernel *right, mat_kernel *ans);
typedef void(SN_DECL *KER_PROC_LAS)(mat_kernel *matrix, mat_kernel *ans, scalar_pack *scalar);
#define KER_PROC(T_type, T_arch, T_feature, T_op_name) \
T_type##_kernel_##T_op_name##_##T_arch##T_feature
#define DECLARE_KER_PROC_LEFT_RIGHT_ANS_SCALAR(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL KER_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *left, MAT_KERNEL(T_type) const *right, \
MAT_KERNEL(T_type) *restrict ans, scalar_pack const *scalar)
#define DECLARE_KER_PROC_RIGHT_ANS_SCALAR(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL KER_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *right, MAT_KERNEL(T_type) *restrict ans, \
scalar_pack const *scalar)
#define DECLARE_KER_PROC_LEFT_RIGHT_ANS(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL KER_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *left, MAT_KERNEL(T_type) const *right, \
MAT_KERNEL(T_type) *restrict ans)
#define DECLARE_KER_PROC_RIGHT_ANS(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL KER_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *right, MAT_KERNEL(T_type) *restrict ans)
#pragma endregion
#pragma region matrix kernel tile function type
typedef void(SN_DECL *KERTILE_PROC_AS)(mat_kernel *ans, scalar_pack *scalar, __m128 *enumeration);
typedef void(SN_DECL *KERTILE_PROC_RA)(mat_kernel *left, mat_kernel *ans, __m128 *enumeration);
typedef void(SN_DECL *KERTILE_PROC_LRA)(mat_kernel *left, mat_kernel *right, mat_kernel *ans,
__m128 *enumeration);
typedef void(SN_DECL *KERTILE_PROC_LAS)(mat_kernel *matrix, mat_kernel *ans, scalar_pack *scalar,
__m128 *enumeration);
#define KERTILE_PROC(T_type, T_arch, T_feature, T_op_name) \
T_type##_kernel_tile_##T_op_name##_##T_arch##T_feature
#define DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS_SCALAR(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL KERTILE_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *left, MAT_KERNEL(T_type) const *right, \
MAT_KERNEL(T_type) *restrict ans, scalar_pack const *scalar, \
__m128 const *enumeration)
#define DECLARE_KERTILE_PROC_RIGHT_ANS_SCALAR(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL KERTILE_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *right, MAT_KERNEL(T_type) *restrict ans, \
scalar_pack const *scalar, __m128 const *enumeration)
#define DECLARE_KERTILE_PROC_LEFT_RIGHT_ANS(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL KERTILE_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *left, MAT_KERNEL(T_type) const *right, \
MAT_KERNEL(T_type) *restrict ans, __m128 const *enumeration)
#define DECLARE_KERTILE_PROC_RIGHT_ANS(T_type, T_arch, T_feature, T_op_name) \
INTERNAL void SN_DECL KERTILE_PROC(T_type, T_arch, T_feature, T_op_name)( \
MAT_KERNEL(T_type) const *right, MAT_KERNEL(T_type) *restrict ans, \
__m128 const *enumeration)
#pragma endregion
#pragma region special matrix kernel operation
typedef void(SN_DECL *PIVOTPROC)(mat_kernel const *source, size_t col_begin, size_t col_length,
size_t *restrict ans);
INTERNAL void SN_DECL pivot_float(MAT_KERNEL(float) const *source, size_t col_begin,
size_t col_length, size_t *restrict ans);
#pragma endregion
typedef void(SN_DECL *UNI_MK_PROC)(matrix_task *task);
typedef void(SN_DECL *VECTORNORMALIZEPROC)(__m128 *source, __m128 *target);
typedef void(SN_DECL *DOTPROC)(void *transpose, __m128 *vector, __m128 *ans);
@@ -231,15 +86,15 @@ typedef int(SN_DECL *INDEX_PAIR)(short const *stram, uint32_t target, int length
#pragma endregion
typedef struct mat_intrinsic {
UNIFIKERNELPROC buffer_add;
UNIFIKERNELPROC buffer_fill;
UNIFIKERNELPROC buffer_scalar_mul;
UNIFIKERNELPROC buffer_sub;
UNIFIKERNELPROC buffer_transpose;
UNIFIKERNELPROC clear_panel;
UNIFIKERNELPROC ker_fma;
UNIFIKERNELPROC ker_tile_fma;
UNIFIKERNELPROC pivot;
UNI_MK_PROC buffer_add;
UNI_MK_PROC buffer_fill;
UNI_MK_PROC buffer_scalar_mul;
UNI_MK_PROC buffer_sub;
UNI_MK_PROC buffer_transpose;
UNI_MK_PROC clear_panel;
UNI_MK_PROC ker_fma;
UNI_MK_PROC ker_tile_fma;
UNI_MK_PROC pivot;
} mat_intrinsic;
@@ -1,141 +1,141 @@
#ifndef SN_MATKERNEL
#define SN_MATKERNEL
#include <immintrin.h>
#include <stdint.h>
#include "sn_internal.h"
/* Kernel storage unions for a fixed 4x4 block. */
#define ELEMENTSIZE(T) sizeof(T)
#define XMMCOUNT(T) (sizeof(T))
#define YMMCOUNT(T) (sizeof(T) / 2)
#define ZMMCOUNT(T) (sizeof(T) / 4)
#define MAT_KERNEL(T) \
union /* MAT_KERNEL_##T## /**/ { \
__m128 f32_x[XMMCOUNT(T)]; \
__m256 f32_y[YMMCOUNT(T)]; \
__m512 f32_z[ZMMCOUNT(T)]; \
\
__m128d f64_x[XMMCOUNT(T)]; \
__m256d f64_y[YMMCOUNT(T)]; \
__m512d f64_z[ZMMCOUNT(T)]; \
T m[4][4]; \
}
#define VEC(T) \
union { \
__m128 f32_x[XMMCOUNT(T) / 4]; \
__m256 f32_y[YMMCOUNT(T) / 4]; \
__m512 f32_z[ZMMCOUNT(T) / 4]; \
\
__m128d f64_x[XMMCOUNT(T) / 4]; \
__m256d f64_y[YMMCOUNT(T) / 4]; \
__m512d f64_z[ZMMCOUNT(T) / 4]; \
T v[4]; \
}
/* Provide a named alias for the zero kernel type to ensure consistent linkage in C++. */
typedef MAT_KERNEL(uint64_t) sn_zero_kernel_u64;
/* Helpers (all compile-time): */
#define SN_LANES(T_VEC, T) (sizeof(T_VEC) / sizeof(T))
#define SN_MAX(a, b) (((a)) > ((b)) ? (a) : (b))
#define SN_CEIL_DIV(a, b) (((a) + (b) - 1) / (b))
#define SN_BITS(x) ((int)(sizeof(x) * 8))
#define PANEL_MINQ(T_VEC, T) SN_MAX(4, SN_MAX(SN_BITS(T_VEC) / 64, SN_BITS(T_VEC) / SN_BITS(T)))
/* Panel geometry helpers (all compile-time): */
#define PANEL_Q(T, T_VEC, MINQ) SN_MAX(SN_LANES(T_VEC, T), (MINQ))
#define PANEL_CHUNKS(T, T_VEC, MINQ) SN_CEIL_DIV(PANEL_Q(T, T_VEC, MINQ), SN_LANES(T_VEC, T))
/*
Column-major square panel with minimum side Q:
- Let R = lanes per vector = sizeof(T_VEC)/sizeof(T).
- Side length Q = max(R, MINQ) to enforce the requested minimum extent.
- Each column is stored contiguously via CH = ceil(Q/R) vector chunks.
- Memory layout:
vec[col][chunk] is a T_VEC holding up to R scalars of column 'col'
spanning rows chunk*R .. chunk*R + (R - 1).
flat[] mirrors the same column-major order (column stride = Q).
- SIMD view remains integer-typed; cast inside micro-kernels to the
appropriate floating-point/integer vector type on demand.
*/
#define MAT_PANEL_SQ_MIN_NOALIGN(T, T_VEC, MINQ) \
union { \
T_VEC vec[PANEL_Q(T, T_VEC, MINQ)][PANEL_CHUNKS(T, T_VEC, MINQ)]; \
T flat[PANEL_Q(T, T_VEC, MINQ) * PANEL_Q(T, T_VEC, MINQ)]; \
}
/* ISA presets with minimum square side:
- SSE : MINQ=4 (avoid 2x2 for double)
- AVX2 : MINQ computed as max(4, vector_bits/64, vector_bits/element_bits)
- AVX-512: same rule (float/i32 naturally expand to 16)
*/
/* SSE panel layout: column-major buffer holding 4 logical columns with MINQ=4.
Columns: each column packs up to four scalars so ALIGN equals sizeof(__m128).
Alignment: every column boundary lands on a 16-byte multiple for XMM loads. */
#define MAT_PANEL_sse(T) SN_ALIGNAS(16) MAT_PANEL_SQ_MIN_NOALIGN(T, __m128, PANEL_MINQ(__m128, T))
/* AVX2 panel layout: column-major buffer holding 8 logical columns with MINQ per PANEL_MINQ.
Columns: each column stores up to lanes elements via contiguous chunks.
Alignment: column starts are 32-byte aligned so AVX2 loads/stores remain contiguous. */
#define MAT_PANEL_avx(T) SN_ALIGNAS(32) MAT_PANEL_SQ_MIN_NOALIGN(T, __m256, PANEL_MINQ(__m256, T))
/* AVX2/FMA panel layout shares the same geometry as AVX2. */
#define MAT_PANEL_avx_fma(T) \
SN_ALIGNAS(32) MAT_PANEL_SQ_MIN_NOALIGN(T, __m256, PANEL_MINQ(__m256, T))
/* AVX-512 panel layout: column-major buffer holding 8 or more columns depending on T.
Columns: each column expands to ceil(Q/lanes) ZMM chunks.
Alignment: column starts sit on 64-byte boundaries to match AVX-512 streaming access. */
#define MAT_PANEL_512(T) SN_ALIGNAS(64) MAT_PANEL_SQ_MIN_NOALIGN(T, __m512, PANEL_MINQ(__m512, T))
/* Global zero kernel declaration (defined in dllmain.c), aligned to 64 bytes */
#ifdef __cplusplus
extern "C" {
#endif
extern __declspec(align(64)) sn_zero_kernel_u64 SN_ZERO_KERNEL;
#ifdef __cplusplus
}
#endif
/* Access helpers (all compile-time friendly):
Given Q = PANEL_Q(...), CH = PANEL_CHUNKS(...), R = lanes per vector:
- Column c occupies vec[c][0..CH-1].
- Row r inside column c is located at vec[c][r / R] with lane (r % R).
*/
#define PANEL_COL_VEC(panel_obj, c, chunk) ((panel_obj).vec[(int)(c)][(int)(chunk)])
/* Scalar flat index helper for column-major addressing */
#define PANEL_ELEM(panel_obj, T, T_VEC, MINQ, r, c) \
((panel_obj).flat[(int)(c) * PANEL_Q(T, T_VEC, MINQ) + (int)(r)])
/* API macros */
#define BUILD_PANEL(arch, element) build_panel_##arch##_##element
#define STORE_PANEL(arch, element) store_panel_##arch##_##element
#define DECLARE_BUILD_PANEL(arch, element) \
INTERNAL void SN_DECL BUILD_PANEL(arch, element)( \
MAT_PANEL_##arch(element) *restrict panel, \
MAT_KERNEL(element) const *const matrix, int col_length, int row_length, \
int col_index, int row_index)
#define DECLARE_STORE_PANEL(arch, element) \
INTERNAL void SN_DECL STORE_PANEL(arch, element)(MAT_PANEL_##arch(element) \
const *const panel, \
MAT_KERNEL(element) *restrict matrix, \
int col_length, int row_length, \
int col_index, int row_index)
/* Declarations for AVX float variant
DECLARE_BUILD_PANEL(avx, float);
DECLARE_BUILD_PANEL(512, float);
DECLARE_STORE_PANEL(avx, float);
DECLARE_STORE_PANEL(512, float);
DECLARE_STORE_PANEL(512, float);
DECLARE_BUILD_PANEL(512, double);
DECLARE_STORE_PANEL(512, double);
/**/
#endif /* SN_MATKERNEL */
#ifndef SN_MATKERNEL
#define SN_MATKERNEL
#include <immintrin.h>
#include <stdint.h>
#include "sn_internal.h"
/* Kernel storage unions for a fixed 4x4 block. */
#define ELEMENTSIZE(T) sizeof(T)
#define XMMCOUNT(T) (sizeof(T))
#define YMMCOUNT(T) (sizeof(T) / 2)
#define ZMMCOUNT(T) (sizeof(T) / 4)
#define MAT_KERNEL(T) \
union /* MAT_KERNEL_##T## /**/ { \
__m128 f32_x[XMMCOUNT(T)]; \
__m256 f32_y[YMMCOUNT(T)]; \
__m512 f32_z[ZMMCOUNT(T)]; \
\
__m128d f64_x[XMMCOUNT(T)]; \
__m256d f64_y[YMMCOUNT(T)]; \
__m512d f64_z[ZMMCOUNT(T)]; \
T m[4][4]; \
}
#define VEC(T) \
union { \
__m128 f32_x[XMMCOUNT(T) / 4]; \
__m256 f32_y[YMMCOUNT(T) / 4]; \
__m512 f32_z[ZMMCOUNT(T) / 4]; \
\
__m128d f64_x[XMMCOUNT(T) / 4]; \
__m256d f64_y[YMMCOUNT(T) / 4]; \
__m512d f64_z[ZMMCOUNT(T) / 4]; \
T v[4]; \
}
/* Provide a named alias for the zero kernel type to ensure consistent linkage in C++. */
typedef MAT_KERNEL(uint64_t) sn_zero_kernel_u64;
/* Helpers (all compile-time): */
#define SN_LANES(T_VEC, T) (sizeof(T_VEC) / sizeof(T))
#define SN_MAX(a, b) (((a)) > ((b)) ? (a) : (b))
#define SN_CEIL_DIV(a, b) (((a) + (b) - 1) / (b))
#define SN_BITS(x) ((int)(sizeof(x) * 8))
#define PANEL_MINQ(T_VEC, T) SN_MAX(4, SN_MAX(SN_BITS(T_VEC) / 64, SN_BITS(T_VEC) / SN_BITS(T)))
/* Panel geometry helpers (all compile-time): */
#define PANEL_Q(T, T_VEC, MINQ) SN_MAX(SN_LANES(T_VEC, T), (MINQ))
#define PANEL_CHUNKS(T, T_VEC, MINQ) SN_CEIL_DIV(PANEL_Q(T, T_VEC, MINQ), SN_LANES(T_VEC, T))
/*
Column-major square panel with minimum side Q:
- Let R = lanes per vector = sizeof(T_VEC)/sizeof(T).
- Side length Q = max(R, MINQ) to enforce the requested minimum extent.
- Each column is stored contiguously via CH = ceil(Q/R) vector chunks.
- Memory layout:
vec[col][chunk] is a T_VEC holding up to R scalars of column 'col'
spanning rows chunk*R .. chunk*R + (R - 1).
flat[] mirrors the same column-major order (column stride = Q).
- SIMD view remains integer-typed; cast inside micro-kernels to the
appropriate floating-point/integer vector type on demand.
*/
#define MAT_PANEL_SQ_MIN_NOALIGN(T, T_VEC, MINQ) \
union { \
T_VEC vec[PANEL_Q(T, T_VEC, MINQ)][PANEL_CHUNKS(T, T_VEC, MINQ)]; \
T flat[PANEL_Q(T, T_VEC, MINQ) * PANEL_Q(T, T_VEC, MINQ)]; \
}
/* ISA presets with minimum square side:
- SSE : MINQ=4 (avoid 2x2 for double)
- AVX2 : MINQ computed as max(4, vector_bits/64, vector_bits/element_bits)
- AVX-512: same rule (float/i32 naturally expand to 16)
*/
/* SSE panel layout: column-major buffer holding 4 logical columns with MINQ=4.
Columns: each column packs up to four scalars so ALIGN equals sizeof(__m128).
Alignment: every column boundary lands on a 16-byte multiple for XMM loads. */
#define MAT_PANEL_sse(T) SN_ALIGNAS(16) MAT_PANEL_SQ_MIN_NOALIGN(T, __m128, PANEL_MINQ(__m128, T))
/* AVX2 panel layout: column-major buffer holding 8 logical columns with MINQ per PANEL_MINQ.
Columns: each column stores up to lanes elements via contiguous chunks.
Alignment: column starts are 32-byte aligned so AVX2 loads/stores remain contiguous. */
#define MAT_PANEL_avx(T) SN_ALIGNAS(32) MAT_PANEL_SQ_MIN_NOALIGN(T, __m256, PANEL_MINQ(__m256, T))
/* AVX2/FMA panel layout shares the same geometry as AVX2. */
#define MAT_PANEL_avx_fma(T) \
SN_ALIGNAS(32) MAT_PANEL_SQ_MIN_NOALIGN(T, __m256, PANEL_MINQ(__m256, T))
/* AVX-512 panel layout: column-major buffer holding 8 or more columns depending on T.
Columns: each column expands to ceil(Q/lanes) ZMM chunks.
Alignment: column starts sit on 64-byte boundaries to match AVX-512 streaming access. */
#define MAT_PANEL_512(T) SN_ALIGNAS(64) MAT_PANEL_SQ_MIN_NOALIGN(T, __m512, PANEL_MINQ(__m512, T))
/* Global zero kernel declaration (defined in dllmain.c), aligned to 64 bytes */
#ifdef __cplusplus
extern "C" {
#endif
extern __declspec(align(64)) sn_zero_kernel_u64 SN_ZERO_KERNEL;
#ifdef __cplusplus
}
#endif
/* Access helpers (all compile-time friendly):
Given Q = PANEL_Q(...), CH = PANEL_CHUNKS(...), R = lanes per vector:
- Column c occupies vec[c][0..CH-1].
- Row r inside column c is located at vec[c][r / R] with lane (r % R).
*/
#define PANEL_COL_VEC(panel_obj, c, chunk) ((panel_obj).vec[(int)(c)][(int)(chunk)])
/* Scalar flat index helper for column-major addressing */
#define PANEL_ELEM(panel_obj, T, T_VEC, MINQ, r, c) \
((panel_obj).flat[(int)(c) * PANEL_Q(T, T_VEC, MINQ) + (int)(r)])
/* API macros */
#define BUILD_PANEL(arch, element) build_panel_##arch##_##element
#define STORE_PANEL(arch, element) store_panel_##arch##_##element
#define DECLARE_BUILD_PANEL(arch, element) \
INTERNAL void SN_DECL BUILD_PANEL(arch, element)( \
MAT_PANEL_##arch(element) *restrict panel, \
MAT_KERNEL(element) const *const matrix, int col_length, int row_length, \
int col_index, int row_index)
#define DECLARE_STORE_PANEL(arch, element) \
INTERNAL void SN_DECL STORE_PANEL(arch, element)(MAT_PANEL_##arch(element) \
const *const panel, \
MAT_KERNEL(element) *restrict matrix, \
int col_length, int row_length, \
int col_index, int row_index)
/* Declarations for AVX float variant
DECLARE_BUILD_PANEL(avx, float);
DECLARE_BUILD_PANEL(512, float);
DECLARE_STORE_PANEL(avx, float);
DECLARE_STORE_PANEL(512, float);
DECLARE_STORE_PANEL(512, float);
DECLARE_BUILD_PANEL(512, double);
DECLARE_STORE_PANEL(512, double);
/**/
#endif /* SN_MATKERNEL */
@@ -0,0 +1,82 @@
#ifndef SN_INTRINSIC_CallCONV_STD
#define SN_INTRINSIC_CallCONV_STD
#include "sn_internal.h"
#include "sn_intrinsic.h"
#ifndef static_assert
#define static_assert _Static_assert
#endif
#define STD_MK_PROC_NAME(T_type, T_arch, T_feature, T_op) \
T_type##_mat_proc_##T_op##_##T_arch##_##T_feature
#define STD_MK_PROC_DECL(T_type, T_arch, T_feature, T_op) \
INTERNAL void SN_DECL STD_MK_PROC_NAME(T_type, T_arch, T_feature, \
T_op)(MAT_TASK(T_type) * task);
#pragma region param styles
#define _SN_MATPROC_LEFT_RIGHT_ANS 1
#define _SN_MATPROC_RIGHT_ANS 1
#define _SN_MATPROC_LEFT_RIGHT_ANS_SCALAR 1
#define _SN_MATPROC_RIGHT_ANS_SCALAR 1
#define _SN_MATPROC_ANS_SCALAR 1
#define _SN_MK_EXPAND_RA(T) \
MAT_KERNEL(T) const *right = (MAT_TASK(T) *)task->mat_1; \
MAT_KERNEL(T) *restrict ans = (MAT_TASK(T) *)task->mat_2;
#define _SN_MK_EXPAND_LRA(T) \
MAT_KERNEL(T) const *left = (MAT_TASK(T) *)task->mat_0; \
MAT_KERNEL(T) const *right = (MAT_TASK(T) *)task->mat_1; \
MAT_KERNEL(T) *restrict ans = (MAT_TASK(T) *)task->mat_2;
#define _SN_MK_EXPAND_RAS(T) \
MAT_KERNEL(T) const *right = (MAT_TASK(T) *)task->mat_1; \
MAT_KERNEL(T) *restrict ans = (MAT_TASK(T) *)task->mat_2; \
void *restrict scalar = (MAT_TASK(T) *)task->scalar;
#define _SN_MK_EXPAND_LRAS(T) \
MAT_KERNEL(T) const *left = (MAT_KERNEL(T) *)task->mat_0; \
MAT_KERNEL(T) const *right = (MAT_KERNEL(T) *)task->mat_1; \
MAT_KERNEL(T) *restrict ans = (MAT_KERNEL(T) *)task->mat_2; \
void *restrict scalar = (MAT_TASK(T) *)task->scalar;
#define _SN_MK_EXPAND_AS(T) \
MAT_KERNEL(T) *restrict ans = (MAT_KERNEL(T) *)task->mat_2; \
void *restrict scalar = (scalar_pack const *)task->scalar;
#define _SN_PARAM_STYLE(T) _SN_MATPROC_##T
#define _SN_MK_EXPAND_PARAM(style, T) _SN_MK_EXPAND_##style(T)
#pragma endregion
#pragma region mem layout
#define _SN_MATPROC_LAYOUT_BUFFER 1
#define _SN_MATPROC_LAYOUT_TILE 1
#define _SN_MATPROC_LAYOUT_KERNEL 1
#define _MK_MKPROC_EXPAND_INDEX_BUFFER \
size_t offset = UNSAFE_AS(size_t, task->padding.data[0]); \
size_t count = UNSAFE_AS(size_t, task->padding[1]);
#define _MK_MKPROC_EXPAND_INDEX_KERNEL \
size_t common_i = UNSAFE_AS(size_t, task->common_i); \
size_t common_j = UNSAFE_AS(size_t, task->common_j); \
size_t common_k = UNSAFE_AS(size_t, task->common_k);
#define _SN_MK_EXPAND_MEM(mem) _SN_MK_EXPAND_##mem
#define _SN_MEM_LAYOUT(T) _SN_MATPROC_LAYOUT_##T
#pragma endregion
#define __mk_param(mem, param, T) \
static_assert((_SN_PARAM_STYLE(param)) - 1 == 0, \
"EXPAND_PARAM: invalid param style '" #param "'"); \
static_assert((_SN_MEM_LAYOUT(mem)) - 1 == 0, \
"EXPAND_PARAM: invalid mem layout '" #mem "'"); \
_SN_MK_EXPAND_PARAM(style, T) \
_SN_MK_EXPAND_MEM(layout)
#endif // !SN_INTRINSIC_PARAM_EXPAND
+22
View File
@@ -16,6 +16,28 @@
#define SN_ARCH_RISCV64 2
#define SN_ARCH_PPC64le 3
#if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__amd64__)
#define SN_CURRENT_ARCH SN_ARCH_X86_64
#elif defined(_M_ARM64) || defined(__aarch64__)
#define SN_CURRENT_ARCH SN_ARCH_ARM64
#elif defined(_M_ARM) || defined(__arm__)
#define SN_CURRENT_ARCH SN_ARCH_ARM32
#elif defined(_M_IX86) || defined(__i386__)
#define SN_CURRENT_ARCH SN_ARCH_X86_32
#elif defined(__powerpc64__) && defined(__LITTLE_ENDIAN__)
#define SN_CURRENT_ARCH SN_ARCH_PPC64LE
#elif defined(__riscv) && (__riscv_xlen == 64)
#define SN_CURRENT_ARCH SN_ARCH_RISCV64
#else
#error "SN: Unsupported target architecture"
#endif
/*
* Target selection policy:
* - Default (no SN_EXTERN_TARGET): fixed Windows + x86_64.
+1 -1
View File
@@ -1,5 +1,5 @@
#include "StgSharpNative.h"
#include "sn_matkernel.h"
#include "sn_intrinsic.matkernel.h"
#include <stdint.h>
#ifdef _WIN32
+9 -9
View File
@@ -5,7 +5,7 @@
#include "sn_intrinsic.h"
#include "sn_intrincontext.x86.h"
DECLARE_PNL_PROC_ANS(float, sse, , clear)
STD_MK_PROC_DECL(float, sse, , clear)
{
register __m128 zero = _mm_setzero_ps();
for (size_t i = 0; i < 4; i++) {
@@ -13,7 +13,7 @@ DECLARE_PNL_PROC_ANS(float, sse, , clear)
}
}
DECLARE_PNL_PROC_ANS(float, avx, , clear)
STD_MK_PROC_DECL(float, avx, , clear)
{
register __m256 zero = _mm256_setzero_ps();
for (size_t i = 0; i < 8; i++) {
@@ -21,7 +21,7 @@ DECLARE_PNL_PROC_ANS(float, avx, , clear)
}
}
DECLARE_PNL_PROC_ANS(float, 512, , clear)
STD_MK_PROC_DECL(float, 512, , clear)
{
register __m512 zero = _mm512_setzero_ps();
for (size_t i = 0; i < 16; i++) {
@@ -29,7 +29,7 @@ DECLARE_PNL_PROC_ANS(float, 512, , clear)
}
}
DECLARE_PNL_PROC_ANS(double, sse, , clear)
STD_MK_PROC_DECL(double, sse, , clear)
{
register __m128 zero = _mm_setzero_ps();
PANEL_COL_VEC((*ans), 0, 0) = zero;
@@ -38,7 +38,7 @@ DECLARE_PNL_PROC_ANS(double, sse, , clear)
PANEL_COL_VEC((*ans), 3, 0) = zero;
}
DECLARE_PNL_PROC_ANS(double, avx, , clear)
STD_MK_PROC_DECL(double, avx, , clear)
{
register __m256 zero = _mm256_setzero_ps();
for (size_t i = 0; i < 8; i++) {
@@ -46,7 +46,7 @@ DECLARE_PNL_PROC_ANS(double, avx, , clear)
}
}
DECLARE_PNL_PROC_ANS(double, 512, , clear)
STD_MK_PROC_DECL(double, 512, , clear)
{
register __m512 zero = _mm512_setzero_ps();
for (size_t i = 0; i < 16; i++) {
@@ -55,7 +55,7 @@ DECLARE_PNL_PROC_ANS(double, 512, , clear)
}
// Matrix transpose implementations
DECLARE_KER_PROC_RIGHT_ANS(float, sse, ,transpose)
STD_MK_PROC_DECL(float, sse, , transpose)
{
register __m128 col0 = right->f32_x[0];
register __m128 col1 = right->f32_x[1];
@@ -72,7 +72,7 @@ DECLARE_KER_PROC_RIGHT_ANS(float, sse, ,transpose)
ans->f32_x[3] = _mm_movehl_ps(tmp3, tmp1);
}
DECLARE_KER_PROC_RIGHT_ANS(float, avx, ,transpose)
STD_MK_PROC_DECL(float, avx, , transpose)
{
register __m256 col_low = right->f32_y[0];
register __m256 col_high = right->f32_y[1];
@@ -87,7 +87,7 @@ DECLARE_KER_PROC_RIGHT_ANS(float, avx, ,transpose)
ans->f32_y[1] = _mm256_shuffle_ps(col_high, col_low, _MM_SHUFFLE(3, 1, 3, 1));
}
DECLARE_KER_PROC_RIGHT_ANS(float, 512, ,transpose)
STD_MK_PROC_DECL(float, 512, , transpose)
{
register __m512 matrix = right->f32_z[0];
+28 -25
View File
@@ -3,9 +3,10 @@
#if SN_IS_ARCH(SN_ARCH_X86_64)
#include "sn_intrinsic.h"
#include "sn_intrincontext.x86.h"
#include "sn_intrinsic.std.h"
#include "sn_intrinsic.context.x86.h"
DECLARE_BUF_PROC_ANS_SCALAR(float, sse, ,fill)
STD_MK_RPOC_DECL(float, sse, , fill)
{
register __m128 vec = _mm_set_ps1(((float *)(scalar->data))[0]);
for (size_t i = 0; i < count; i++) {
@@ -16,7 +17,7 @@ DECLARE_BUF_PROC_ANS_SCALAR(float, sse, ,fill)
}
}
DECLARE_BUF_PROC_ANS_SCALAR(float, avx, ,fill)
DECLARE_BUF_PROC_ANS_SCALAR(float, avx, , fill)
{
register __m256 vec = _mm256_broadcast_ss(((float *)(scalar->data)));
for (size_t i = 0; i < count; i++) {
@@ -25,7 +26,7 @@ DECLARE_BUF_PROC_ANS_SCALAR(float, avx, ,fill)
}
}
DECLARE_BUF_PROC_ANS_SCALAR(float, 512, ,fill)
DECLARE_BUF_PROC_ANS_SCALAR(float, 512, , fill)
{
register __m512 vec = _mm512_broadcastss_ps(((__m128 *)(scalar->data))[0]);
for (size_t i = 0; i < count; i++) {
@@ -33,7 +34,7 @@ DECLARE_BUF_PROC_ANS_SCALAR(float, 512, ,fill)
}
}
DECLARE_BUF_PROC_ANS_SCALAR(double, sse, ,fill)
DECLARE_BUF_PROC_ANS_SCALAR(double, sse, , fill)
{
register __m128d vec = _mm_set1_pd(((double *)(scalar->data))[0]);
for (size_t i = 0; i < count; i++) {
@@ -48,7 +49,7 @@ DECLARE_BUF_PROC_ANS_SCALAR(double, sse, ,fill)
}
}
DECLARE_BUF_PROC_ANS_SCALAR(double, avx, ,fill)
DECLARE_BUF_PROC_ANS_SCALAR(double, avx, , fill)
{
register __m256d vec = _mm256_broadcast_sd(((double *)(scalar->data)));
for (size_t i = 0; i < count; i++) {
@@ -59,7 +60,7 @@ DECLARE_BUF_PROC_ANS_SCALAR(double, avx, ,fill)
}
}
DECLARE_BUF_PROC_ANS_SCALAR(double, 512, ,fill)
DECLARE_BUF_PROC_ANS_SCALAR(double, 512, , fill)
{
register __m512d vec = _mm512_broadcastsd_pd(_mm_loadu_pd(scalar));
for (size_t i = 0; i < count; i++) {
@@ -68,8 +69,10 @@ DECLARE_BUF_PROC_ANS_SCALAR(double, 512, ,fill)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, sse, ,add)
STD_MK_PROC_DECL(float, sse, , add)
{
__mk_param(BUFFER, LEFT_RIGHT_ANS, float);
for (size_t i = 0; i < count; i++) {
register __m128 c0 = _mm_add_ps(left[i].f32_x[0], right[i].f32_x[0]);
register __m128 c1 = _mm_add_ps(left[i].f32_x[1], right[i].f32_x[1]);
@@ -83,7 +86,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, sse, ,add)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, ,add)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, , add)
{
for (size_t i = 0; i < count; i++) {
size_t s = sizeof(MAT_KERNEL(float));
@@ -94,14 +97,14 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, ,add)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, 512, ,add)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, 512, , add)
{
for (size_t i = 0; i < count; i++) {
register __m512 c0 = _mm512_add_ps(left[i].f32_z[0], right[i].f32_z[0]);
ans[i].f32_z[0] = c0;
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, ,add)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, , add)
{
for (size_t i = 0; i < count; i++) {
register __m128d c0 = _mm_add_pd(_mm_castps_pd(left[i].f32_x[0]),
@@ -132,7 +135,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, ,add)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, ,add)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, , add)
{
for (size_t i = 0; i < count; i++) {
size_t s = sizeof(MAT_KERNEL(float));
@@ -147,7 +150,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, ,add)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, ,add)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, , add)
{
for (size_t i = 0; i < count; i++) {
register __m512d c0 = _mm512_add_pd(left[i].f64_z[0], right[i].f64_z[0]);
@@ -157,7 +160,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, ,add)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, sse, ,sub)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, sse, , sub)
{
for (size_t i = 0; i < count; i++) {
register __m128 c0 = _mm_sub_ps(left[i].f32_x[0], right[i].f32_x[0]);
@@ -172,7 +175,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, sse, ,sub)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, ,sub)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, , sub)
{
for (size_t i = 0; i < count; i++) {
register __m256 c0 = _mm256_sub_ps(left[i].f32_y[0], right[i].f32_y[0]);
@@ -182,7 +185,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, avx, ,sub)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, 512, ,sub)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, 512, , sub)
{
for (size_t i = 0; i < count; i++) {
register __m512 c0 = _mm512_sub_ps(left[i].f32_z[0], right[i].f32_z[0]);
@@ -190,7 +193,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(float, 512, ,sub)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, ,sub)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, , sub)
{
for (size_t i = 0; i < count; i++) {
register __m128d c0 = _mm_sub_pd(left[i].f64_x[0], right[i].f64_x[0]);
@@ -213,7 +216,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, sse, ,sub)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, ,sub)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, , sub)
{
for (size_t i = 0; i < count; i++) {
register __m256 c0 = _mm256_sub_ps(left[i].f32_y[0], right[i].f32_y[0]);
@@ -223,7 +226,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, avx, ,sub)
}
}
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, ,sub)
DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, , sub)
{
for (size_t i = 0; i < count; i++) {
register __m512 c0 = _mm512_sub_ps(left[i].f32_z[0], right[i].f32_z[0]);
@@ -231,7 +234,7 @@ DECLARE_BUF_PROC_LEFT_RIGHT_ANS(double, 512, ,sub)
}
}
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, sse, ,scalar_mul)
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, sse, , scalar_mul)
{
register __m128 vec = _mm_set_ps1(((float *)(scalar->data))[0]);
for (size_t i = 0; i < count; i++) {
@@ -247,7 +250,7 @@ DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, sse, ,scalar_mul)
}
}
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, avx, ,scalar_mul)
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, avx, , scalar_mul)
{
register __m256 vec = _mm256_broadcast_ss(((float *)(scalar->data)));
for (size_t i = 0; i < count; i++) {
@@ -259,7 +262,7 @@ DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, avx, ,scalar_mul)
}
}
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, 512, ,scalar_mul)
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, 512, , scalar_mul)
{
register __m512 vec = _mm512_broadcastss_ps(((__m128 *)(scalar->data))[0]);
for (size_t i = 0; i < count; i++) {
@@ -269,7 +272,7 @@ DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(float, 512, ,scalar_mul)
}
}
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, sse, ,scalar_mul)
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, sse, , scalar_mul)
{
register __m128d vec = _mm_set1_pd(((double *)(scalar->data))[0]);
for (size_t i = 0; i < count; i++) {
@@ -293,7 +296,7 @@ DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, sse, ,scalar_mul)
}
}
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, avx, ,scalar_mul)
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, avx, , scalar_mul)
{
register __m256d vec = _mm256_broadcast_sd(((double *)(scalar->data)));
for (size_t i = 0; i < count; i++) {
@@ -309,7 +312,7 @@ DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, avx, ,scalar_mul)
}
}
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, 512, ,scalar_mul)
DECLARE_BUF_PROC_RIGHT_ANS_SCALAR(double, 512, , scalar_mul)
{
register __m512d vec = _mm512_broadcastsd_pd(_mm_load_pd(scalar));
for (size_t i = 0; i < count; i++) {
@@ -1,12 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\StgSharp.Common\StgSharp.Common.csproj" />
</ItemGroup>
+1 -8
View File
@@ -1,13 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>preview</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<Platforms>x64</Platforms>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.4.0" />
+35 -40
View File
@@ -1,40 +1,31 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="PostOpration.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
// -----------------------------------------------------------------------
// file="PostOpration"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Terminal.Gui;
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System.IO;
namespace StgSharpTerminalDialogue
{
@@ -43,14 +34,18 @@ namespace StgSharpTerminalDialogue
private static DialogueView _dv;
internal static void PostOperation( string instruction, string operand )
internal static void PostOperation(
string instruction,
string operand
)
{
switch( instruction ) {
switch (instruction)
{
case "posterror":
_dv.ShowError( operand );
using( StreamWriter sw = new StreamWriter(
_callerServerPipe ) ) {
sw.WriteLine( "ERRORGET" );
_dv.ShowError(operand);
using (StreamWriter sw = new StreamWriter(
_callerServerPipe)) {
sw.WriteLine("ERRORGET");
}
break;
default:
+60 -49
View File
@@ -1,37 +1,36 @@
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// file="Program.cs"
// Project: StgSharp
// AuthorGroup: Nitload Space
// Copyright (c) Nitload Space. All rights reserved.
// -----------------------------------------------------------------------
// file="Program"
// Project: StgSharp
// AuthorGroup: Nitload
// Copyright (c) Nitload. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the “Software”), to deal in the Software without restriction,
// including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software,
// and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
// The above copyright notice and
// this permission notice shall be included in all copies
// or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS”,
// WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH
// THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//-----------------------------------------------------------------------
//-----------------------------------------------------------------------
// -----------------------------------------------------------------------
// -----------------------------------------------------------------------
using System;
using System.Globalization;
using System.IO;
using System.IO.Pipes;
using System.Threading;
using System.Threading.Tasks;
using Terminal.Gui;
namespace StgSharpTerminalDialogue
@@ -41,57 +40,69 @@ namespace StgSharpTerminalDialogue
private static AnonymousPipeClientStream _callerClientPipe, _callerServerPipe;
private static void Main( string[] args )
private static void Main(
string[] args
)
{
Application.Init();
Console.CancelKeyPress += ( sender, e ) => {
Console.CancelKeyPress += (
sender,
e
) => {
e.Cancel = true;
Application.RequestStop();
};
Task renderTask = Task.Factory
.StartNew(
() => {
_dv = DialogueView.Single;
Application.Run( view: _dv );
} );
.StartNew((
) => {
_dv = DialogueView.Single;
Application.Run(view:_dv);
}, CancellationToken.None, TaskCreationOptions.None,
TaskScheduler.Default);
/**/
if( args.Length != 2 ) {
if (args.Length != 2)
{
Console.ReadLine();
Application.RequestStop();
}
/**/
_callerClientPipe = new AnonymousPipeClientStream(
PipeDirection.In, args[ 0 ] );
PipeDirection.In, args[0]);
_callerServerPipe = new AnonymousPipeClientStream(
PipeDirection.Out, args[ 1 ] );
PipeDirection.Out, args[1]);
using( StreamReader clientReader = new StreamReader(
_callerClientPipe ) ) {
using( StreamWriter clientSender = new StreamWriter(
_callerServerPipe ) ) {
using (StreamReader clientReader = new StreamReader(
_callerClientPipe))
{
using (StreamWriter clientSender = new StreamWriter(
_callerServerPipe))
{
clientSender.AutoFlush = true;
string temp = string.Empty;
while( !temp!.Contains( "exit " ) && !renderTask.IsCompleted ) {
while (!temp!.Contains("exit ") && !renderTask.IsCompleted)
{
temp = clientReader.ReadLine()!;
temp = temp ?? string.Empty;
if( string.IsNullOrEmpty( temp ) ) {
if (string.IsNullOrEmpty(temp))
{
continue;
}
int index = temp.IndexOf( ' ' );
if( index == -1 ) {
int index = temp.IndexOf(' ');
if (index == -1)
{
continue;
}
string command = temp.Substring( 0, index );
string operand = temp.Substring( index + 1 );
string command = temp[..index];
string operand = temp[(index + 1)..];
PostOperation( command, operand );
PostOperation(command, operand);
}
}
}
@@ -1,54 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<BaseOutputPath>build\StgSharpTerminalDialogue</BaseOutputPath>
<OutputPath>$(BaseOutputPath)</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PlatformTarget>x64</PlatformTarget>
<SatelliteResourceLanguages>none</SatelliteResourceLanguages>
<Platforms>x64</Platforms>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|ARM64'">
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Terminal.Gui" Version="2.0.0-v2-develop.2329" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy /E /I /Y $(OutputPath) $(SolutionDir)build\StgSharp.TerminalDialogue" />
</Target>
</Project>
-68
View File
@@ -2,73 +2,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>Preview</LangVersion>
<Nullable>warnings</Nullable>
<StartupObject>StgSharp.Program</StartupObject>
<PlatformTarget>x64</PlatformTarget>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<ErrorReport>none</ErrorReport>
<SignAssembly>False</SignAssembly>
<ProduceReferenceAssembly>False</ProduceReferenceAssembly>
<PackageLicenseExpression> MIT</PackageLicenseExpression>
<IncludeSymbols>False</IncludeSymbols>
<Platforms>x64;ARM64</Platforms>
<RunPostBuildEvent>Always</RunPostBuildEvent>
<Configurations>Debug;Release;PerformanceDebug</Configurations>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|x64'">
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PerformanceDebug|ARM64'">
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup>
<IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindows>
<IsOSX Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsOSX>
<IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinux>
<PackageRequireLicenseAcceptance>True</PackageRequireLicenseAcceptance>
</PropertyGroup>
<PropertyGroup Condition="'$(IsWindows)'=='true'">
<DefineConstants>Windows</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsOSX)'=='true'">
<DefineConstants>OSX</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(IsLinux)'=='true'">
<DefineConstants>Linux</DefineConstants>
</PropertyGroup>
<ItemGroup>
<None Remove="SSG_errorlog.log" />
</ItemGroup>
@@ -108,9 +44,5 @@
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="xcopy /E /I /Y $(SolutionDir)build $(OutDir)" />
</Target>
</Project>
+59 -60
View File
@@ -1,5 +1,4 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.3.32825.248
MinimumVisualStudioVersion = 10.0.40219.1
@@ -30,11 +29,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Script", "StgSharp
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Model", "StgSharp.Model\StgSharp.Model.csproj", "{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgSharp.Mathematics", "StgSharp.Mathematics\StgSharp.Mathematics.csproj", "{9946599F-4D34-440F-840D-F9443D5AEFAA}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Mathematics", "StgSharp.Mathematics\StgSharp.Mathematics.csproj", "{9946599F-4D34-440F-840D-F9443D5AEFAA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgSharp.RegularAnalysis", "StgSharp.RegularAnalysis\StgSharp.RegularAnalysis.csproj", "{46339874-C6B8-4361-997E-2E30387E51F9}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.RegularAnalysis", "StgSharp.RegularAnalysis\StgSharp.RegularAnalysis.csproj", "{46339874-C6B8-4361-997E-2E30387E51F9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StgSharp.Graphics", "StgSharp.Graphics\StgSharp.Graphics.csproj", "{80CD3DDE-0642-451D-82DF-0DE422FC6E34}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StgSharp.Graphics", "StgSharp.Graphics\StgSharp.Graphics.csproj", "{80CD3DDE-0642-451D-82DF-0DE422FC6E34}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -52,8 +51,8 @@ Global
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Debug|x64.Build.0 = Debug|x64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|x64.ActiveCfg = Release|x64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|x64.Build.0 = Release|x64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|ARM64.ActiveCfg = Release|ARM64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|ARM64.Build.0 = Release|ARM64
{3EAF2EE6-FA9E-4F57-951F-7E6F8125DFBF}.Release|x64.ActiveCfg = Release|x64
@@ -64,8 +63,8 @@ Global
{610B992B-BB34-49C3-9993-676C595FC12E}.Debug|x64.Build.0 = Debug|x64
{610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|x64.ActiveCfg = Release|x64
{610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|x64.Build.0 = Release|x64
{610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{610B992B-BB34-49C3-9993-676C595FC12E}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{610B992B-BB34-49C3-9993-676C595FC12E}.Release|ARM64.ActiveCfg = Release|ARM64
{610B992B-BB34-49C3-9993-676C595FC12E}.Release|ARM64.Build.0 = Release|ARM64
{610B992B-BB34-49C3-9993-676C595FC12E}.Release|x64.ActiveCfg = Release|x64
@@ -76,8 +75,8 @@ Global
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Debug|x64.Build.0 = Debug|x64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|x64.ActiveCfg = Release|x64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|x64.Build.0 = Release|x64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|ARM64.ActiveCfg = Release|ARM64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|ARM64.Build.0 = Release|ARM64
{0D4D2A8F-2B5B-4F7D-8D63-4A9AF4B4C782}.Release|x64.ActiveCfg = Release|x64
@@ -86,10 +85,10 @@ Global
{20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|ARM64.Build.0 = Debug|ARM64
{20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|x64.ActiveCfg = Debug|x64
{20CBFF26-6746-402E-992C-7B643E9423EB}.Debug|x64.Build.0 = Debug|x64
{20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|x64
{20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|x64
{20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|x64.ActiveCfg = Release|x64
{20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|x64.Build.0 = Release|x64
{20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{20CBFF26-6746-402E-992C-7B643E9423EB}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{20CBFF26-6746-402E-992C-7B643E9423EB}.Release|ARM64.ActiveCfg = Release|ARM64
{20CBFF26-6746-402E-992C-7B643E9423EB}.Release|ARM64.Build.0 = Release|ARM64
{20CBFF26-6746-402E-992C-7B643E9423EB}.Release|x64.ActiveCfg = Release|x64
@@ -98,34 +97,34 @@ Global
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|ARM64.Build.0 = Debug|ARM64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|x64.ActiveCfg = Debug|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Debug|x64.Build.0 = Debug|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|x64.ActiveCfg = Release|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|x64.Build.0 = Release|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|ARM64.ActiveCfg = Release|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|ARM64.Build.0 = Release|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|ARM64.ActiveCfg = Release|ARM64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|ARM64.Build.0 = Release|ARM64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|x64.ActiveCfg = Release|x64
{10B5819F-2A62-41B6-980A-EB9E76A0E95C}.Release|x64.Build.0 = Release|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Debug|ARM64.ActiveCfg = Debug|ARM64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Debug|ARM64.Build.0 = Debug|ARM64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Debug|x64.ActiveCfg = Debug|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Debug|x64.Build.0 = Debug|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.PerformanceDebug|x64.ActiveCfg = Release|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.PerformanceDebug|x64.Build.0 = Release|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Release|ARM64.ActiveCfg = Release|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Release|ARM64.Build.0 = Release|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Release|ARM64.ActiveCfg = Release|ARM64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Release|ARM64.Build.0 = Release|ARM64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Release|x64.ActiveCfg = Release|x64
{5B51F5EA-138C-46B5-B36F-1D389968B6CF}.Release|x64.Build.0 = Release|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|ARM64.ActiveCfg = Debug|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|ARM64.Build.0 = Debug|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|ARM64.ActiveCfg = Debug|ARM64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|ARM64.Build.0 = Debug|ARM64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|x64.ActiveCfg = Debug|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Debug|x64.Build.0 = Debug|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|x64.ActiveCfg = Release|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|x64.Build.0 = Release|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|ARM64.ActiveCfg = Release|ARM64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|ARM64.Build.0 = Release|ARM64
{D9538DE0-EE4C-4183-86D6-7DFC08A7BDFB}.Release|x64.ActiveCfg = Release|x64
@@ -136,36 +135,36 @@ Global
{9946599F-4D34-440F-840D-F9443D5AEFAA}.Debug|x64.Build.0 = Debug|x64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|x64.ActiveCfg = Release|x64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|x64.Build.0 = Release|x64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|ARM64.ActiveCfg = Release|ARM64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|ARM64.Build.0 = Release|ARM64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|x64.ActiveCfg = Release|x64
{9946599F-4D34-440F-840D-F9443D5AEFAA}.Release|x64.Build.0 = Release|x64
{46339874-C6B8-4361-997E-2E30387E51F9}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.Debug|ARM64.Build.0 = Debug|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.Debug|x64.ActiveCfg = Debug|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.Debug|x64.Build.0 = Debug|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|ARM64.ActiveCfg = Debug|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|ARM64.Build.0 = Debug|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|x64.ActiveCfg = Debug|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|x64.Build.0 = Debug|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.Release|ARM64.ActiveCfg = Release|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.Release|ARM64.Build.0 = Release|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.Release|x64.ActiveCfg = Release|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.Release|x64.Build.0 = Release|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|ARM64.Build.0 = Debug|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|x64.ActiveCfg = Debug|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|x64.Build.0 = Debug|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|ARM64.ActiveCfg = Debug|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|ARM64.Build.0 = Debug|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|x64.ActiveCfg = Debug|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|x64.Build.0 = Debug|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|ARM64.ActiveCfg = Release|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|ARM64.Build.0 = Release|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|x64.ActiveCfg = Release|Any CPU
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|x64.Build.0 = Release|Any CPU
{46339874-C6B8-4361-997E-2E30387E51F9}.Debug|ARM64.ActiveCfg = Debug|ARM64
{46339874-C6B8-4361-997E-2E30387E51F9}.Debug|ARM64.Build.0 = Debug|ARM64
{46339874-C6B8-4361-997E-2E30387E51F9}.Debug|x64.ActiveCfg = Debug|x64
{46339874-C6B8-4361-997E-2E30387E51F9}.Debug|x64.Build.0 = Debug|x64
{46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{46339874-C6B8-4361-997E-2E30387E51F9}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{46339874-C6B8-4361-997E-2E30387E51F9}.Release|ARM64.ActiveCfg = Release|ARM64
{46339874-C6B8-4361-997E-2E30387E51F9}.Release|ARM64.Build.0 = Release|ARM64
{46339874-C6B8-4361-997E-2E30387E51F9}.Release|x64.ActiveCfg = Release|x64
{46339874-C6B8-4361-997E-2E30387E51F9}.Release|x64.Build.0 = Release|x64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|ARM64.ActiveCfg = Debug|ARM64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|ARM64.Build.0 = Debug|ARM64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|x64.ActiveCfg = Debug|x64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Debug|x64.Build.0 = Debug|x64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|ARM64.ActiveCfg = PerformanceDebug|ARM64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|ARM64.Build.0 = PerformanceDebug|ARM64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|x64.ActiveCfg = PerformanceDebug|x64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.PerformanceDebug|x64.Build.0 = PerformanceDebug|x64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|ARM64.ActiveCfg = Release|ARM64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|ARM64.Build.0 = Release|ARM64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|x64.ActiveCfg = Release|x64
{80CD3DDE-0642-451D-82DF-0DE422FC6E34}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -173,4 +172,4 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E13615C2-4C8D-4072-95A1-124440983818}
EndGlobalSection
EndGlobal
EndGlobal
@@ -0,0 +1 @@
C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\COMMUNITY\TEAM TOOLS\STATIC ANALYSIS TOOLS\\RULE SETS\NATIVERECOMMENDEDRULES.RULESET
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>D:\platform-dev\build\win-x64\StgSharp.Native.dll</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>
Binary file not shown.
@@ -0,0 +1,439 @@
m.basic.x86.c
dllmain.c
m.bufop.x86.c
m.solve.x86.c
m.fma_tile.x86.c
s.factorial.x86.c
m.fma.x86.c
s.hash.x86.c
load_intrinsic.x86.c
load_glfw.c
simdid.x86.c
simdid_compare.x86.c
sn_native.c
str_string.c
t.affinity.c
vector.c
D:\platform-dev\StgSharp.Native\sn-src\simdid.x86.c(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
D:\platform-dev\StgSharp.Native\sn-src\simdid_compare.x86.c(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/dllmain.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/m.fma.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/m.solve.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/s.factorial.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/load_glfw.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/t.affinity.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/s.hash.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/load_intrinsic.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/simdid.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/str_string.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/vector.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/m.fma_tile.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/simdid_compare.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/m.basic.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\sn-src\m.fma.x86.c(6,1): error C1083: 无法打开包括文件: “sn_intrincontext.x86.h”: No such file or directory
D:\platform-dev\StgSharp.Native\sn-src\load_intrinsic.x86.c(7,1): error C1083: 无法打开包括文件: “sn_intrincontext.x86.h”: No such file or directory
D:\platform-dev\StgSharp.Native\sn-src\simdid.x86.c(9,1): error C1083: 无法打开包括文件: “sn_intrincontext.x86.h”: No such file or directory
vector_dot.c
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(1,1): warning C4819: 该文件包含不能在当前代码页(936)中表示的字符。请将该文件保存为 Unicode 格式以防止数据丢失
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(144,45): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(144,47): error C2146: 语法错误: 缺少“)”(在标识符“sub”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(144,40): error C2081: “sse”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(144,47): error C2061: 语法错误: 标识符“sub”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(144,47): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(144,50): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(145,45): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(145,47): error C2146: 语法错误: 缺少“)”(在标识符“sub”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(145,40): error C2081: “avx”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(145,47): error C2061: 语法错误: 标识符“sub”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(145,47): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(145,50): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(146,40): error C2059: 语法错误:“常数”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(146,45): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(146,47): error C2146: 语法错误: 缺少“)”(在标识符“sub”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(146,47): error C2061: 语法错误: 标识符“sub”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(146,47): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(146,50): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(148,46): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(148,48): error C2146: 语法错误: 缺少“)”(在标识符“sub”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(148,41): error C2081: “sse”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(148,48): error C2061: 语法错误: 标识符“sub”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(148,48): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(148,51): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(149,46): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(149,48): error C2146: 语法错误: 缺少“)”(在标识符“sub”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(149,41): error C2081: “avx”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(149,48): error C2061: 语法错误: 标识符“sub”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(149,48): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(149,51): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(150,41): error C2059: 语法错误:“常数”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(150,46): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(150,48): error C2146: 语法错误: 缺少“)”(在标识符“sub”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(150,48): error C2061: 语法错误: 标识符“sub”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(150,48): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(150,51): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c(10,52): error C2059: 语法错误:“,”
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(152,40): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(152,42): error C2146: 语法错误: 缺少“)”(在标识符“transpose”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c(10,54): error C2146: 语法错误: 缺少“)”(在标识符“try_plu”的前面)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(152,35): error C2081: “sse”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c(10,47): error C2081: “sse”: 形参表中的名称非法
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c(10,54): error C2061: 语法错误: 标识符“try_plu”
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(152,42): error C2061: 语法错误: 标识符“transpose”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c(10,54): error C2059: 语法错误:“;”
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(152,42): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(152,51): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c(10,61): error C2059: 语法错误:“)”
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(153,40): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c(11,1): error C2449: 在文件范围内找到“{”(是否缺少函数头?)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(153,42): error C2146: 语法错误: 缺少“)”(在标识符“transpose”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c(91,1): error C2059: 语法错误:“}”
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(153,35): error C2081: “avx”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\str_string.c(20,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
D:\platform-dev\StgSharp.Native\sn-src\str_string.c(35,54): warning C4267: “return”: 从“size_t”转换到“int”,可能丢失数据
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(153,42): error C2061: 语法错误: 标识符“transpose”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(153,42): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(153,51): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(154,35): error C2059: 语法错误:“常数”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(154,40): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(154,42): error C2146: 语法错误: 缺少“)”(在标识符“transpose”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(154,42): error C2061: 语法错误: 标识符“transpose”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(154,42): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(154,51): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(156,47): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(156,49): error C2146: 语法错误: 缺少“)”(在标识符“scalar_mul”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(156,42): error C2081: “sse”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(156,49): error C2061: 语法错误: 标识符“scalar_mul”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(156,49): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(156,59): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(157,47): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(157,49): error C2146: 语法错误: 缺少“)”(在标识符“scalar_mul”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(157,42): error C2081: “avx”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(157,49): error C2061: 语法错误: 标识符“scalar_mul”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(157,49): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(157,59): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\s.hash.x86.c(34,43): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据
D:\platform-dev\StgSharp.Native\sn-src\s.hash.x86.c(35,50): warning C4244: “函数”: 从“uint64_t”转换到“unsigned char”,可能丢失数据
D:\platform-dev\StgSharp.Native\sn-src\s.hash.x86.c(11,15): warning C4090: “初始化”: 不同的“const”限定符
D:\platform-dev\StgSharp.Native\sn-src\s.hash.x86.c(11,34): warning C4090: “初始化”: 不同的“const”限定符
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(158,42): error C2059: 语法错误:“常数”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(158,47): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(158,49): error C2146: 语法错误: 缺少“)”(在标识符“scalar_mul”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(158,49): error C2061: 语法错误: 标识符“scalar_mul”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(158,49): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(158,59): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(160,48): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(160,50): error C2146: 语法错误: 缺少“)”(在标识符“scalar_mul”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(160,43): error C2081: “sse”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(160,50): error C2061: 语法错误: 标识符“scalar_mul”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(160,50): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(160,60): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(161,48): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(161,50): error C2146: 语法错误: 缺少“)”(在标识符“scalar_mul”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(161,43): error C2081: “avx”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(161,50): error C2061: 语法错误: 标识符“scalar_mul”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(161,50): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(161,60): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(162,43): error C2059: 语法错误:“常数”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(162,48): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(162,50): error C2146: 语法错误: 缺少“)”(在标识符“scalar_mul”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(162,50): error C2061: 语法错误: 标识符“scalar_mul”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(162,50): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(162,60): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(164,41): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(164,43): error C2146: 语法错误: 缺少“)”(在标识符“fill”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(164,36): error C2081: “sse”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(164,43): error C2061: 语法错误: 标识符“fill”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(164,43): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(164,47): error C2059: 语法错误:“)”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(165,41): error C2059: 语法错误:“,”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(165,43): error C2146: 语法错误: 缺少“)”(在标识符“fill”的前面)
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(165,36): error C2081: “avx”: 形参表中的名称非法
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(165,43): error C2061: 语法错误: 标识符“fill”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(165,43): error C2059: 语法错误:“;”
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-head\sn_intrinsic.context.x86.h(165,43): error C1003: 错误计数超过 100;正在停止编译
(编译源文件“sn-src/m.bufop.x86.c”)
D:\platform-dev\StgSharp.Native\sn-src\m.fma_tile.x86.c(6,1): error C1083: 无法打开包括文件: “sn_intrincontext.x86.h”: No such file or directory
D:\platform-dev\StgSharp.Native\sn-src\simdid_compare.x86.c(7,1): error C1083: 无法打开包括文件: “sn_intrincontext.x86.h”: No such file or directory
D:\platform-dev\StgSharp.Native\sn-src\vector.c(6,41): warning C4047: “函数”:“const float *”与“__m128 (*)[1]”的间接级别不同
D:\platform-dev\StgSharp.Native\sn-src\vector.c(6,41): warning C4024: “_mm_load_ps”: 形参和实参 1 的类型不同
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/sn_native.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
D:\platform-dev\StgSharp.Native\sn-src\m.basic.x86.c(6,1): error C1083: 无法打开包括文件: “sn_intrincontext.x86.h”: No such file or directory
D:\platform-dev\StgSharp.Native\sn-src\sn_native.c(17,30): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据
D:\platform-dev\StgSharp.Native\sn-src\sn_native.c(19,43): warning C4244: “函数”: 从“uint64_t”转换到“GLuint”,可能丢失数据
D:\platform-dev\StgSharp.Native\sn-src\sn_native.c(33,57): warning C4028: 形参 1 与声明不一致
D:\platform-dev\StgSharp.Native\sn-src\sn_native.c(61,47): warning C4028: 形参 1 与声明不一致
D:\platform-dev\StgSharp.Native\lib\glfw\glfw3.h(273,10): warning C4005: “GLFWAPI”: 宏重定义
(编译源文件“sn-src/vector_dot.c”)
D:\platform-dev\StgSharp.Native\sn-head\StgSharpNative.h(16,9):
参见“GLFWAPI”的前一个定义
@@ -0,0 +1,17 @@
D:\platform-dev\StgSharp.Native\sn-src\m.basic.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\m.basic.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\dllmain.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\dllmain.obj
D:\platform-dev\StgSharp.Native\sn-src\m.bufop.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\m.bufop.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\m.solve.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\m.solve.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\m.fma_tile.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\m.fma_tile.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\s.factorial.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\s.factorial.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\m.fma.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\m.fma.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\s.hash.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\s.hash.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\load_intrinsic.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\load_intrinsic.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\load_glfw.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\load_glfw.obj
D:\platform-dev\StgSharp.Native\sn-src\simdid.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\simdid.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\simdid_compare.x86.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\simdid_compare.x86.obj
D:\platform-dev\StgSharp.Native\sn-src\sn_native.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\sn_native.obj
D:\platform-dev\StgSharp.Native\sn-src\str_string.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\str_string.obj
D:\platform-dev\StgSharp.Native\sn-src\t.affinity.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\t.affinity.obj
D:\platform-dev\StgSharp.Native\sn-src\vector.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\vector.obj
D:\platform-dev\StgSharp.Native\sn-src\vector_dot.c;D:\platform-dev\obj\StgSharp.Native\Debug\x64\vector_dot.obj
@@ -0,0 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.44.35207:TargetPlatformVersion=10.0.26100.0:
Debug|x64|D:\platform-dev\|
@@ -0,0 +1,4 @@
^D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\DLLMAIN.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\LOAD_GLFW.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\LOAD_INTRINSIC.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\M.BASIC.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\M.BUFOP.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\M.FMA.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\M.FMA_TILE.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\M.SOLVE.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\S.FACTORIAL.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\S.HASH.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\SIMDID.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\SIMDID_COMPARE.X86.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\SN_NATIVE.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\STR_STRING.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\T.AFFINITY.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\VECTOR.OBJ|D:\PLATFORM-DEV\OBJ\STGSHARP.NATIVE\DEBUG\X64\VECTOR_DOT.OBJ|D:\PLATFORM-DEV\STGSHARP.NATIVE\LIB\GLFW\GLFW3.LIB|D:\PLATFORM-DEV\STGSHARP.NATIVE\LIB\GLFW\GLFW3_MT.LIB
D:\platform-dev\build\win-x64\StgSharp.Native.lib
D:\platform-dev\build\win-x64\StgSharp.Native.EXP
D:\platform-dev\obj\StgSharp.Native\Debug\x64\StgSharp.Native.ilk
@@ -0,0 +1,2 @@
D:\platform-dev\build\win-x64\StgSharp.Native.dll.lastcodeanalysissucceeded
D:\platform-dev\obj\StgSharp.Native\Debug\x64\NativeCodeAnalysis.read.1.tlog
+364
View File
@@ -0,0 +1,364 @@
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.44.35220.0
include listing.inc
INCLUDELIB MSVCRTD
INCLUDELIB OLDNAMES
PUBLIC SN_ZERO_KERNEL
_DATA SEGMENT
COMM infolog:BYTE:0200H
_DATA ENDS
_BSS SEGMENT
SN_ZERO_KERNEL DB 080H DUP (?)
_BSS ENDS
msvcjmc SEGMENT
__5C8CA4D3_mmintrin@h DB 01H
__8C83BECC_concurrencysal@h DB 01H
__608E3340_sal@h DB 01H
__FB67E29A_vadefs@h DB 01H
__1D1B619C_vcruntime@h DB 01H
__735960E1_corecrt@h DB 01H
__211DB995_corecrt_malloc@h DB 01H
__7CD62D9E_malloc@h DB 01H
__9DCE0DC8_xmmintrin@h DB 01H
__4C2AD0C7_winpackagefamily@h DB 01H
__9DED9ED1_winapifamily@h DB 01H
__12FEDF4E_sdkddkver@h DB 01H
__9BAEE128_excpt@h DB 01H
__B7B53233_stdarg@h DB 01H
__6B04FCB3_specstrings_undef@h DB 01H
__F4027AF7_specstrings_strict@h DB 01H
__B90340D4_sdv_driverspecs@h DB 01H
__BFFF5AD3_driverspecs@h DB 01H
__32847078_specstrings@h DB 01H
__108B2620_corecrt_wctype@h DB 01H
__6CD6613D_ctype@h DB 01H
__30902A1F_kernelspecs@h DB 01H
__376FD5CA_basetsd@h DB 01H
__13DE2371_errno@h DB 01H
__8C6AE390_vcruntime_string@h DB 01H
__8ACB2152_corecrt_memcpy_s@h DB 01H
__EA6C9D17_corecrt_memory@h DB 01H
__0DF2AF52_corecrt_wstring@h DB 01H
__6E889ECC_string@h DB 01H
__9BEDF4DE_guiddef@h DB 01H
__51BFD2FE_pshpack4@h DB 01H
__31652CEA_poppack@h DB 01H
__5532AE4C_pshpack2@h DB 01H
__58A52B9A_pshpack8@h DB 01H
__57741015_pshpack1@h DB 01H
__CDE68C90_apiset@h DB 01H
__0BF06E8D_ktmtypes@h DB 01H
__40C200C0_winnt@h DB 01H
__9336F789_minwindef@h DB 01H
__55136115_windef@h DB 01H
__32205BF0_apisetcconv@h DB 01H
__B48FDEA0_minwinbase@h DB 01H
__3551B028_apiquery2@h DB 01H
__65BE04AA_processenv@h DB 01H
__4767CA46_fileapi@h DB 01H
__282E6C4B_fileapifromapp@h DB 01H
__393AF12C_debugapi@h DB 01H
__EBC502B8_utilapiset@h DB 01H
__1EAD8C69_handleapi@h DB 01H
__D8EF9B29_errhandlingapi@h DB 01H
__97FC1204_fibersapi@h DB 01H
__27448220_namedpipeapi@h DB 01H
__6EA33B2A_profileapi@h DB 01H
__EAC6F673_heapapi@h DB 01H
__D64EEA5A_ioapiset@h DB 01H
__144BD4B6_synchapi@h DB 01H
__03B1C640_interlockedapi@h DB 01H
__DC64CB38_processthreadsapi@h DB 01H
__D719B518_sysinfoapi@h DB 01H
__410385B1_memoryapi@h DB 01H
__C1AD45EF_enclaveapi@h DB 01H
__F4C3AA32_threadpoollegacyapiset@h DB 01H
__AC5A7A9F_threadpoolapiset@h DB 01H
__F5254B21_jobapi@h DB 01H
__BCEA6EE8_jobapi2@h DB 01H
__D18ACE72_wow64apiset@h DB 01H
__669B0D4A_libloaderapi@h DB 01H
__645F7034_securitybaseapi@h DB 01H
__67E58557_namespaceapi@h DB 01H
__599D9D3A_systemtopologyapi@h DB 01H
__2337E373_processtopologyapi@h DB 01H
__02BFF239_securityappcontainer@h DB 01H
__9C196272_realtimeapiset@h DB 01H
__5AB313A4_winerror@h DB 01H
__B7E7187B_timezoneapi@h DB 01H
__6DE9EB6F_winbase@h DB 01H
__56B2AFF2_wingdi@h DB 01H
__BA1161A9_tvout@h DB 01H
__0501A018_winuser@h DB 01H
__EF12FA99_datetimeapi@h DB 01H
__8FA7C3CA_winnls@h DB 01H
__390F0C47_stringapiset@h DB 01H
__28605B0A_wincontypes@h DB 01H
__BFBDE86D_consoleapi@h DB 01H
__C3CAFBF0_consoleapi2@h DB 01H
__C20891C7_consoleapi3@h DB 01H
__717C98B6_wincon@h DB 01H
__2884C177_verrsrc@h DB 01H
__A3FD3A34_winver@h DB 01H
__6F8AD9F1_reason@h DB 01H
__4C90FD6F_winreg@h DB 01H
__68AFEBAD_wnnc@h DB 01H
__5A7AB086_winnetwk@h DB 01H
__2FE8A10C_stralign@h DB 01H
__34558472_winsvc@h DB 01H
__058845F1_mcx@h DB 01H
__7F16006B_ime_cmodes@h DB 01H
__0A3AF599_imm@h DB 01H
__9349FE86_windows@h DB 01H
__639A050C_sn_internal@h DB 01H
__836A8CFC_stdint@h DB 01H
__714FE6D7_sn_target@h DB 01H
__60B45B40_corecrt_stdio_config@h DB 01H
__CFA3741E_corecrt_wstdio@h DB 01H
__B3FE3303_stdio@h DB 01H
__955456CD_stddef@h DB 01H
__99AED4FB_corecrt_search@h DB 01H
__8B813BF6_corecrt_wstdlib@h DB 01H
__3D1CA2C3_limits@h DB 01H
__E8FB0A68_stdlib@h DB 01H
__F562FA57_stb_image@h DB 01H
__C95DC661_khrplatform@h DB 01H
__6C577136_gl@h DB 01H
__EE638A2C_wgl@h DB 01H
__8EF9E35C_glfw3@h DB 01H
__F8AC8404_emmintrin@h DB 01H
__270DEC8D_pmmintrin@h DB 01H
__97D49F0F_tmmintrin@h DB 01H
__BEEF8A8C_smmintrin@h DB 01H
__DB8D0340_nmmintrin@h DB 01H
__0E36F90E_wmmintrin@h DB 01H
__C5A2B409_zmmintrin@h DB 01H
__F2B616C3_immintrin@h DB 01H
__9FB25DBE_assert@h DB 01H
__4E664295_glfw_function@h DB 01H
__64C0EF11_StgSharpNative@h DB 01H
__F49407C4_sn_intrinsic@matkernel@h DB 01H
__AE0F26BF_dllmain@c DB 01H
msvcjmc ENDS
PUBLIC DllMain
PUBLIC __JustMyCode_Default
EXTRN _RTC_InitBase:PROC
EXTRN _RTC_Shutdown:PROC
EXTRN __CheckForDebuggerJustMyCode:PROC
; COMDAT pdata
pdata SEGMENT
$pdata$init_zero_kernel DD imagerel init_zero_kernel
DD imagerel init_zero_kernel+121
DD imagerel $unwind$init_zero_kernel
pdata ENDS
; COMDAT pdata
pdata SEGMENT
$pdata$DllMain DD imagerel $LN9
DD imagerel $LN9+140
DD imagerel $unwind$DllMain
pdata ENDS
; COMDAT rtc$TMZ
rtc$TMZ SEGMENT
_RTC_Shutdown.rtc$TMZ DQ FLAT:_RTC_Shutdown
rtc$TMZ ENDS
; COMDAT rtc$IMZ
rtc$IMZ SEGMENT
_RTC_InitBase.rtc$IMZ DQ FLAT:_RTC_InitBase
rtc$IMZ ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$DllMain DD 025051c01H
DD 0117231cH
DD 07010001fH
DD 0500fH
xdata ENDS
; COMDAT xdata
xdata SEGMENT
$unwind$init_zero_kernel DD 025050f01H
DD 010a230fH
DD 070030025H
DD 05002H
xdata ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
00000 c2 00 00 ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File D:\platform-dev\StgSharp.Native\sn-src\dllmain.c
; COMDAT DllMain
_TEXT SEGMENT
tv64 = 192
hModule$ = 240
ul_reason_for_call$ = 248
lpReserved$ = 256
DllMain PROC ; COMDAT
; 26 : {
$LN9:
00000 4c 89 44 24 18 mov QWORD PTR [rsp+24], r8
00005 89 54 24 10 mov DWORD PTR [rsp+16], edx
00009 48 89 4c 24 08 mov QWORD PTR [rsp+8], rcx
0000e 55 push rbp
0000f 57 push rdi
00010 48 81 ec f8 00
00 00 sub rsp, 248 ; 000000f8H
00017 48 8d 6c 24 20 lea rbp, QWORD PTR [rsp+32]
0001c 48 8d 0d 00 00
00 00 lea rcx, OFFSET FLAT:__AE0F26BF_dllmain@c
00023 e8 00 00 00 00 call __CheckForDebuggerJustMyCode
00028 90 npad 1
; 27 : switch (ul_reason_for_call) {
00029 8b 85 f8 00 00
00 mov eax, DWORD PTR ul_reason_for_call$[rbp]
0002f 89 85 c0 00 00
00 mov DWORD PTR tv64[rbp], eax
00035 83 bd c0 00 00
00 00 cmp DWORD PTR tv64[rbp], 0
0003c 74 38 je SHORT $LN7@DllMain
0003e 83 bd c0 00 00
00 01 cmp DWORD PTR tv64[rbp], 1
00045 74 14 je SHORT $LN4@DllMain
00047 83 bd c0 00 00
00 02 cmp DWORD PTR tv64[rbp], 2
0004e 74 18 je SHORT $LN5@DllMain
00050 83 bd c0 00 00
00 03 cmp DWORD PTR tv64[rbp], 3
00057 74 16 je SHORT $LN6@DllMain
00059 eb 22 jmp SHORT $LN2@DllMain
$LN4@DllMain:
; 28 : case DLL_PROCESS_ATTACH:
; 29 : init_zero_kernel();
0005b e8 00 00 00 00 call init_zero_kernel
00060 90 npad 1
; 30 : return 1;
00061 b8 01 00 00 00 mov eax, 1
00066 eb 1a jmp SHORT $LN1@DllMain
$LN5@DllMain:
; 31 : case DLL_THREAD_ATTACH:
; 32 : return 1;
00068 b8 01 00 00 00 mov eax, 1
0006d eb 13 jmp SHORT $LN1@DllMain
$LN6@DllMain:
; 33 : case DLL_THREAD_DETACH:
; 34 : return 1;
0006f b8 01 00 00 00 mov eax, 1
00074 eb 0c jmp SHORT $LN1@DllMain
$LN7@DllMain:
; 35 : case DLL_PROCESS_DETACH:
; 36 : return 1;
00076 b8 01 00 00 00 mov eax, 1
0007b eb 05 jmp SHORT $LN1@DllMain
$LN2@DllMain:
; 37 : break;
; 38 : }
; 39 : return TRUE;
0007d b8 01 00 00 00 mov eax, 1
$LN1@DllMain:
; 40 : }
00082 48 8d a5 d8 00
00 00 lea rsp, QWORD PTR [rbp+216]
00089 5f pop rdi
0008a 5d pop rbp
0008b c3 ret 0
DllMain ENDP
_TEXT ENDS
; Function compile flags: /Odtp /RTCsu /ZI
; File D:\platform-dev\StgSharp.Native\sn-src\dllmain.c
; COMDAT init_zero_kernel
_TEXT SEGMENT
c$1 = 4
r$2 = 36
init_zero_kernel PROC ; COMDAT
; 17 : {
00000 40 55 push rbp
00002 57 push rdi
00003 48 81 ec 28 01
00 00 sub rsp, 296 ; 00000128H
0000a 48 8d 6c 24 20 lea rbp, QWORD PTR [rsp+32]
0000f 48 8d 0d 00 00
00 00 lea rcx, OFFSET FLAT:__AE0F26BF_dllmain@c
00016 e8 00 00 00 00 call __CheckForDebuggerJustMyCode
0001b 90 npad 1
; 18 : for (int c = 0; c < 4; ++c) {
0001c c7 45 04 00 00
00 00 mov DWORD PTR c$1[rbp], 0
00023 eb 08 jmp SHORT $LN4@init_zero_
$LN2@init_zero_:
00025 8b 45 04 mov eax, DWORD PTR c$1[rbp]
00028 ff c0 inc eax
0002a 89 45 04 mov DWORD PTR c$1[rbp], eax
$LN4@init_zero_:
0002d 83 7d 04 04 cmp DWORD PTR c$1[rbp], 4
00031 7d 3c jge SHORT $LN3@init_zero_
; 19 : for (int r = 0; r < 4; ++r) {
00033 c7 45 24 00 00
00 00 mov DWORD PTR r$2[rbp], 0
0003a eb 08 jmp SHORT $LN7@init_zero_
$LN5@init_zero_:
0003c 8b 45 24 mov eax, DWORD PTR r$2[rbp]
0003f ff c0 inc eax
00041 89 45 24 mov DWORD PTR r$2[rbp], eax
$LN7@init_zero_:
00044 83 7d 24 04 cmp DWORD PTR r$2[rbp], 4
00048 7d 23 jge SHORT $LN6@init_zero_
; 20 : SN_ZERO_KERNEL.m[r][c] = 0;
0004a 48 63 45 24 movsxd rax, DWORD PTR r$2[rbp]
0004e 48 6b c0 20 imul rax, rax, 32 ; 00000020H
00052 48 8d 0d 00 00
00 00 lea rcx, OFFSET FLAT:SN_ZERO_KERNEL
00059 48 03 c8 add rcx, rax
0005c 48 8b c1 mov rax, rcx
0005f 48 63 4d 04 movsxd rcx, DWORD PTR c$1[rbp]
00063 48 c7 04 c8 00
00 00 00 mov QWORD PTR [rax+rcx*8], 0
; 21 : }
0006b eb cf jmp SHORT $LN5@init_zero_
$LN6@init_zero_:
; 22 : }
0006d eb b6 jmp SHORT $LN2@init_zero_
$LN3@init_zero_:
; 23 : }
0006f 48 8d a5 08 01
00 00 lea rsp, QWORD PTR [rbp+264]
00076 5f pop rdi
00077 5d pop rbp
00078 c3 ret 0
init_zero_kernel ENDP
_TEXT ENDS
END
@@ -0,0 +1,115 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "MSVC Code Analysis",
"version": "14.44.35220.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-src/dllmain.c"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "c7bdcaa511f5eec55c641d61b9b747d99a329c02b14cd8529d19bce4ac2a6f74"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/stgsharpnative.h"
},
"hashes": {
"sha-256": "5eee6b3faf7bf2247fe44898b0fcb71794c346ae2f0b58953e1632a49c1b6c4e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_internal.h"
},
"hashes": {
"sha-256": "7430f5e8582c672b79e266834c290e4d426ce44b7bd3b7e5534f201a48ff6df9"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_target.h"
},
"hashes": {
"sha-256": "b8c543a09db7bd21a2b409476024fa6bec6a5218d88ca036d15584ed453ceb91"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/stbi/stb_image.h"
},
"hashes": {
"sha-256": "c45e3ef56a7d946654740f02e25fcb99a819861155ad1173349a289f2a000ce2"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/gl.h"
},
"hashes": {
"sha-256": "c9d0960c919f9ef4cfa6449f2b0c00f2ad8286b420e01ee7ec34b40c618392fc"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/khrplatform.h"
},
"hashes": {
"sha-256": "f5b69ed6a7bef6651526abb2d1263811d59acdba7a29368bb9be1a0f9e80160f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/wgl.h"
},
"hashes": {
"sha-256": "86d6c58acb0a92b35ce8d94d6817fcec3f73d9e147e8621f468f143db1bbd81f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/glfw/glfw3.h"
},
"hashes": {
"sha-256": "85c584857dddd780c131940ed69cd516c2b60d61664df9cb254710c3602c1008"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/glfw_function.h"
},
"hashes": {
"sha-256": "4baa73f465e3e347fc0ad0ff666a6db2e83e749acd770f4bee02c12a7b9ec36e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrinsic.matkernel.h"
},
"hashes": {
"sha-256": "19f0030c441ae5c4cec0b446b64daa10448fafd44d4fd6dd2232b84f5ed9aad1"
}
}
]
}
]
}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,107 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "MSVC Code Analysis",
"version": "14.44.35220.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-src/load_glfw.c"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "17d82e2b6a8411d940ffc1769b7d90a683af9d1c0fe2d58cda2d18400337fdf5"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/stgsharpnative.h"
},
"hashes": {
"sha-256": "5eee6b3faf7bf2247fe44898b0fcb71794c346ae2f0b58953e1632a49c1b6c4e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_internal.h"
},
"hashes": {
"sha-256": "7430f5e8582c672b79e266834c290e4d426ce44b7bd3b7e5534f201a48ff6df9"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_target.h"
},
"hashes": {
"sha-256": "b8c543a09db7bd21a2b409476024fa6bec6a5218d88ca036d15584ed453ceb91"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/stbi/stb_image.h"
},
"hashes": {
"sha-256": "c45e3ef56a7d946654740f02e25fcb99a819861155ad1173349a289f2a000ce2"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/gl.h"
},
"hashes": {
"sha-256": "c9d0960c919f9ef4cfa6449f2b0c00f2ad8286b420e01ee7ec34b40c618392fc"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/khrplatform.h"
},
"hashes": {
"sha-256": "f5b69ed6a7bef6651526abb2d1263811d59acdba7a29368bb9be1a0f9e80160f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/wgl.h"
},
"hashes": {
"sha-256": "86d6c58acb0a92b35ce8d94d6817fcec3f73d9e147e8621f468f143db1bbd81f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/glfw/glfw3.h"
},
"hashes": {
"sha-256": "85c584857dddd780c131940ed69cd516c2b60d61664df9cb254710c3602c1008"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/glfw_function.h"
},
"hashes": {
"sha-256": "4baa73f465e3e347fc0ad0ff666a6db2e83e749acd770f4bee02c12a7b9ec36e"
}
}
]
}
]
}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,131 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "MSVC Code Analysis",
"version": "14.44.35220.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-src/load_intrinsic.x86.c"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "c4b2c5dc98e95d9d7cfabcb85772979ac74c625048857b38d6344935c144bf09"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_target.h"
},
"hashes": {
"sha-256": "b8c543a09db7bd21a2b409476024fa6bec6a5218d88ca036d15584ed453ceb91"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_internal.h"
},
"hashes": {
"sha-256": "8a0f03b014c6d2740a21a13df48b1951932be000152771363cd554748facde0d"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/stgsharpnative.h"
},
"hashes": {
"sha-256": "5eee6b3faf7bf2247fe44898b0fcb71794c346ae2f0b58953e1632a49c1b6c4e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/stbi/stb_image.h"
},
"hashes": {
"sha-256": "c45e3ef56a7d946654740f02e25fcb99a819861155ad1173349a289f2a000ce2"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/gl.h"
},
"hashes": {
"sha-256": "c9d0960c919f9ef4cfa6449f2b0c00f2ad8286b420e01ee7ec34b40c618392fc"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/khrplatform.h"
},
"hashes": {
"sha-256": "f5b69ed6a7bef6651526abb2d1263811d59acdba7a29368bb9be1a0f9e80160f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/wgl.h"
},
"hashes": {
"sha-256": "86d6c58acb0a92b35ce8d94d6817fcec3f73d9e147e8621f468f143db1bbd81f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/glfw/glfw3.h"
},
"hashes": {
"sha-256": "85c584857dddd780c131940ed69cd516c2b60d61664df9cb254710c3602c1008"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/glfw_function.h"
},
"hashes": {
"sha-256": "4baa73f465e3e347fc0ad0ff666a6db2e83e749acd770f4bee02c12a7b9ec36e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrinsic.h"
},
"hashes": {
"sha-256": "4da90105811ba902ad984b406834cf36cf43862047957dad5471c0b24d221ace"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_matkernel.h"
},
"hashes": {
"sha-256": "19f0030c441ae5c4cec0b446b64daa10448fafd44d4fd6dd2232b84f5ed9aad1"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrincontext.x86.h"
},
"hashes": {
"sha-256": "bbc00ee7320b30ca1234dc7908e4695ff6d5bb2ba3224e4ffaed345010ba8f48"
}
}
]
}
]
}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,131 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "MSVC Code Analysis",
"version": "14.44.35220.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-src/m.basic.x86.c"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "d2e2e837a655806e69e9907ce694d936c3ab6b1d7ff8fcbf18a9925b1cc060f4"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_target.h"
},
"hashes": {
"sha-256": "b8c543a09db7bd21a2b409476024fa6bec6a5218d88ca036d15584ed453ceb91"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_internal.h"
},
"hashes": {
"sha-256": "8a0f03b014c6d2740a21a13df48b1951932be000152771363cd554748facde0d"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrinsic.h"
},
"hashes": {
"sha-256": "4da90105811ba902ad984b406834cf36cf43862047957dad5471c0b24d221ace"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/stgsharpnative.h"
},
"hashes": {
"sha-256": "5eee6b3faf7bf2247fe44898b0fcb71794c346ae2f0b58953e1632a49c1b6c4e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/stbi/stb_image.h"
},
"hashes": {
"sha-256": "c45e3ef56a7d946654740f02e25fcb99a819861155ad1173349a289f2a000ce2"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/gl.h"
},
"hashes": {
"sha-256": "c9d0960c919f9ef4cfa6449f2b0c00f2ad8286b420e01ee7ec34b40c618392fc"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/khrplatform.h"
},
"hashes": {
"sha-256": "f5b69ed6a7bef6651526abb2d1263811d59acdba7a29368bb9be1a0f9e80160f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/wgl.h"
},
"hashes": {
"sha-256": "86d6c58acb0a92b35ce8d94d6817fcec3f73d9e147e8621f468f143db1bbd81f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/glfw/glfw3.h"
},
"hashes": {
"sha-256": "85c584857dddd780c131940ed69cd516c2b60d61664df9cb254710c3602c1008"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/glfw_function.h"
},
"hashes": {
"sha-256": "4baa73f465e3e347fc0ad0ff666a6db2e83e749acd770f4bee02c12a7b9ec36e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_matkernel.h"
},
"hashes": {
"sha-256": "19f0030c441ae5c4cec0b446b64daa10448fafd44d4fd6dd2232b84f5ed9aad1"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrincontext.x86.h"
},
"hashes": {
"sha-256": "bbc00ee7320b30ca1234dc7908e4695ff6d5bb2ba3224e4ffaed345010ba8f48"
}
}
]
}
]
}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,131 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "MSVC Code Analysis",
"version": "14.44.35220.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-src/m.bufop.x86.c"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "bd17622b768a820fa5d415bd891c8dc82b5fd0e9446a636d005fe6051d039678"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_target.h"
},
"hashes": {
"sha-256": "b8c543a09db7bd21a2b409476024fa6bec6a5218d88ca036d15584ed453ceb91"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_internal.h"
},
"hashes": {
"sha-256": "8a0f03b014c6d2740a21a13df48b1951932be000152771363cd554748facde0d"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrinsic.h"
},
"hashes": {
"sha-256": "4da90105811ba902ad984b406834cf36cf43862047957dad5471c0b24d221ace"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/stgsharpnative.h"
},
"hashes": {
"sha-256": "5eee6b3faf7bf2247fe44898b0fcb71794c346ae2f0b58953e1632a49c1b6c4e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/stbi/stb_image.h"
},
"hashes": {
"sha-256": "c45e3ef56a7d946654740f02e25fcb99a819861155ad1173349a289f2a000ce2"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/gl.h"
},
"hashes": {
"sha-256": "c9d0960c919f9ef4cfa6449f2b0c00f2ad8286b420e01ee7ec34b40c618392fc"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/khrplatform.h"
},
"hashes": {
"sha-256": "f5b69ed6a7bef6651526abb2d1263811d59acdba7a29368bb9be1a0f9e80160f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/wgl.h"
},
"hashes": {
"sha-256": "86d6c58acb0a92b35ce8d94d6817fcec3f73d9e147e8621f468f143db1bbd81f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/glfw/glfw3.h"
},
"hashes": {
"sha-256": "85c584857dddd780c131940ed69cd516c2b60d61664df9cb254710c3602c1008"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/glfw_function.h"
},
"hashes": {
"sha-256": "4baa73f465e3e347fc0ad0ff666a6db2e83e749acd770f4bee02c12a7b9ec36e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_matkernel.h"
},
"hashes": {
"sha-256": "19f0030c441ae5c4cec0b446b64daa10448fafd44d4fd6dd2232b84f5ed9aad1"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrincontext.x86.h"
},
"hashes": {
"sha-256": "bbc00ee7320b30ca1234dc7908e4695ff6d5bb2ba3224e4ffaed345010ba8f48"
}
}
]
}
]
}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,131 @@
{
"version": "2.1.0",
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"runs": [
{
"results": [],
"tool": {
"driver": {
"name": "PREfast",
"fullName": "MSVC Code Analysis",
"version": "14.44.35220.0",
"informationUri": "https://aka.ms/cpp/ca"
}
},
"invocations": [
{
"executionSuccessful": true
}
],
"artifacts": [
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-src/m.fma.x86.c"
},
"roles": [
"analysisTarget"
],
"hashes": {
"sha-256": "d5d32866676ab9055c1a430b3749e18f5affc21d1dc394e2b5a4897f0d63d02e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_target.h"
},
"hashes": {
"sha-256": "b8c543a09db7bd21a2b409476024fa6bec6a5218d88ca036d15584ed453ceb91"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_internal.h"
},
"hashes": {
"sha-256": "8a0f03b014c6d2740a21a13df48b1951932be000152771363cd554748facde0d"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrinsic.h"
},
"hashes": {
"sha-256": "4da90105811ba902ad984b406834cf36cf43862047957dad5471c0b24d221ace"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/stgsharpnative.h"
},
"hashes": {
"sha-256": "5eee6b3faf7bf2247fe44898b0fcb71794c346ae2f0b58953e1632a49c1b6c4e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/stbi/stb_image.h"
},
"hashes": {
"sha-256": "c45e3ef56a7d946654740f02e25fcb99a819861155ad1173349a289f2a000ce2"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/gl.h"
},
"hashes": {
"sha-256": "c9d0960c919f9ef4cfa6449f2b0c00f2ad8286b420e01ee7ec34b40c618392fc"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/khrplatform.h"
},
"hashes": {
"sha-256": "f5b69ed6a7bef6651526abb2d1263811d59acdba7a29368bb9be1a0f9e80160f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/wgl.h"
},
"hashes": {
"sha-256": "86d6c58acb0a92b35ce8d94d6817fcec3f73d9e147e8621f468f143db1bbd81f"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/lib/glfw/glfw3.h"
},
"hashes": {
"sha-256": "85c584857dddd780c131940ed69cd516c2b60d61664df9cb254710c3602c1008"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/glfw_function.h"
},
"hashes": {
"sha-256": "4baa73f465e3e347fc0ad0ff666a6db2e83e749acd770f4bee02c12a7b9ec36e"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_matkernel.h"
},
"hashes": {
"sha-256": "19f0030c441ae5c4cec0b446b64daa10448fafd44d4fd6dd2232b84f5ed9aad1"
}
},
{
"location": {
"uri": "file:///d:/platform-dev/stgsharp.native/sn-head/sn_intrincontext.x86.h"
},
"hashes": {
"sha-256": "bbc00ee7320b30ca1234dc7908e4695ff6d5bb2ba3224e4ffaed345010ba8f48"
}
}
]
}
]
}
@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<DEFECTS></DEFECTS>

Some files were not shown because too many files have changed in this diff Show More