Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
working-directory: ./Aero

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
Expand All @@ -44,7 +44,7 @@ jobs:
body="${body//$'\r'/'%0D'}"
echo ::set-output name=body::$body
- name: Commit Comment
uses: peter-evans/commit-comment@v1.3.2
uses: peter-evans/commit-comment@v3
with:
body: |
Benchmark result (use as a guide):
Expand All @@ -56,7 +56,7 @@ jobs:
path: ./cache
key: ${{ runner.os }}-benchmark
- name: Store benchmark result
uses: Happypig375/github-action-benchmark@v1.8.2
uses: benchmark-action/github-action-benchmark@v1
if: github.event_name != 'pull_request'
with:
name: Benchmark.Net Benchmark
Expand Down
18 changes: 9 additions & 9 deletions Aero/Aero.Gen/Genv2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@
Reader = (name, typeCast) => $"{name}.X = MemoryMarshal.Read<float>(data.Slice(offset, 4));" +
$"{name}.Y = MemoryMarshal.Read<float>(data.Slice(offset + 4, 4));",
Writer = (name, typeCast) =>
$"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), ref {name}.X);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), ref {name}.Y);"
$"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), in {name}.X);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), in {name}.Y);"
}
},
{
Expand All @@ -226,9 +226,9 @@
$"{name}.Y = MemoryMarshal.Read<float>(data.Slice(offset + 4, 4));" +
$"{name}.Z = MemoryMarshal.Read<float>(data.Slice(offset + 8, 4));",
Writer = (name, typeCast) =>
$"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), ref {name}.X);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), ref {name}.Y);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 8, sizeof(float)), ref {name}.Z);"
$"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), in {name}.X);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), in {name}.Y);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 8, sizeof(float)), in {name}.Z);"
}
},
{
Expand All @@ -240,10 +240,10 @@
$"{name}.Z = MemoryMarshal.Read<float>(data.Slice(offset + 8, 4));" +
$"{name}.W = MemoryMarshal.Read<float>(data.Slice(offset + 12, 4));",
Writer = (name, typeCast) =>
$"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), ref {name}.X);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), ref {name}.Y);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 8, sizeof(float)), ref {name}.Z);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 12, sizeof(float)), ref {name}.W);"
$"MemoryMarshal.Write(buffer.Slice(offset, sizeof(float)), in {name}.X);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 4, sizeof(float)), in {name}.Y);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 8, sizeof(float)), in {name}.Z);" +
$"MemoryMarshal.Write(buffer.Slice(offset + 12, sizeof(float)), in {name}.W);"
}
},
{
Expand Down Expand Up @@ -650,8 +650,8 @@
AddLine();
}

var combinedSize = 0;

Check warning on line 653 in Aero/Aero.Gen/Genv2.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'combinedSize' is assigned but its value is never used
var nullableIdx = 0;

Check warning on line 654 in Aero/Aero.Gen/Genv2.cs

View workflow job for this annotation

GitHub Actions / build

The variable 'nullableIdx' is assigned but its value is never used
var rootNode = AeroSourceGraphGen.BuildTree(SyntaxReceiver, cd);
CreateLogicFlow(rootNode,
preNode: GetPackedSizePreNode,
Expand Down
8 changes: 4 additions & 4 deletions Aero/Aero.TestCases/Aero.TestCases.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)GeneratedFiles</CompilerGeneratedFilesOutputPath>
Expand All @@ -18,9 +18,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.8.0">
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.11.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.11.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
10 changes: 5 additions & 5 deletions Aero/Aero.UnitTests/Aero.UnitTests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>

<IsPackable>false</IsPackable>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
Expand All @@ -16,14 +16,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.1" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />

<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.8.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="3.8.0">
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.11.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.11.0" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.11.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion Aero/Aero.UnitTests/Benchmarks/Reading.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public partial class BenchmarkPackedSizeComplexTest
}

//[SimpleJob(RuntimeMoniker.NetCoreApp30)]
[SimpleJob(RuntimeMoniker.NetCoreApp50, launchCount: 1, warmupCount: 5, targetCount: 10)]
[SimpleJob(RuntimeMoniker.Net80, launchCount: 1, warmupCount: 5, iterationCount: 10)]
[MemoryDiagnoser]
[JsonExporterAttribute.Full]
[JsonExporterAttribute.FullCompressed]
Expand Down
Loading