Skip to content

Commit 560886b

Browse files
committed
Update to net8
1 parent afe2133 commit 560886b

File tree

10 files changed

+21
-108
lines changed

10 files changed

+21
-108
lines changed

.github/workflows/build-and-test.yml

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,29 @@ jobs:
1919
- ${{ contains(github.event.pull_request.labels.*.name, 'arch:arm32') || contains(github.event.pull_request.labels.*.name, 'arch:arm64') }}
2020
options:
2121
- os: ubuntu-latest
22-
framework: net7.0
23-
sdk: 7.0.x
22+
framework: net8.0
23+
sdk: 8.0.x
2424
sdk-preview: true
2525
runtime: -x64
2626
codecov: false
2727
- os: macos-latest
28-
framework: net7.0
29-
sdk: 7.0.x
28+
framework: net8.0
29+
sdk: 8.0.x
3030
sdk-preview: true
3131
runtime: -x64
3232
codecov: false
3333
- os: windows-latest
34-
framework: net7.0
35-
sdk: 7.0.x
34+
framework: net8.0
35+
sdk: 8.0.x
3636
sdk-preview: true
3737
runtime: -x64
3838
codecov: false
3939
- os: buildjet-4vcpu-ubuntu-2204-arm
40-
framework: net7.0
41-
sdk: 7.0.x
40+
framework: net8.0
41+
sdk: 8.0.x
4242
sdk-preview: true
4343
runtime: -x64
4444
codecov: false
45-
- os: ubuntu-latest
46-
framework: net6.0
47-
sdk: 6.0.x
48-
runtime: -x64
49-
codecov: false
50-
- os: macos-latest
51-
framework: net6.0
52-
sdk: 6.0.x
53-
runtime: -x64
54-
codecov: false
55-
- os: windows-latest
56-
framework: net6.0
57-
sdk: 6.0.x
58-
runtime: -x64
59-
codecov: false
6045
exclude:
6146
- isARM: false
6247
options:

.github/workflows/code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
matrix:
1111
options:
1212
- os: ubuntu-latest
13-
framework: net6.0
13+
framework: net8.0
1414
runtime: -x64
1515
codecov: true
1616

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Designed to simplify image processing, ImageSharp brings you an incredibly power
2121

2222
ImageSharp is designed from the ground up to be flexible and extensible. The library provides API endpoints for common image processing operations and the building blocks to allow for the development of additional operations.
2323

24-
Built against [.NET 6](https://docs.microsoft.com/en-us/dotnet/standard/net-standard), ImageSharp can be used in device, cloud, and embedded/IoT scenarios.
24+
Built against [.NET 8](https://docs.microsoft.com/en-us/dotnet/standard/net-standard), ImageSharp can be used in device, cloud, and embedded/IoT scenarios.
2525

2626

2727
## License
@@ -64,7 +64,7 @@ If you prefer, you can compile ImageSharp yourself (please do and help!)
6464

6565
- Using [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
6666
- Make sure you have the latest version installed
67-
- Make sure you have [the .NET 7 SDK](https://www.microsoft.com/net/core#windows) installed
67+
- Make sure you have [the .NET 8 SDK](https://www.microsoft.com/net/core#windows) installed
6868

6969
Alternatively, you can work from command line and/or with a lightweight editor on **both Linux/Unix and Windows**:
7070

src/ImageSharp/Common/Helpers/Numerics.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -908,25 +908,6 @@ public static int ReduceSum(Vector256<int> accumulator)
908908
return Sse2.ConvertToInt32(vsum);
909909
}
910910

911-
/// <summary>
912-
/// Reduces elements of the vector into one sum.
913-
/// </summary>
914-
/// <param name="accumulator">The accumulator to reduce.</param>
915-
/// <returns>The sum of all elements.</returns>
916-
[MethodImpl(InliningOptions.ShortMethod)]
917-
public static int ReduceSumArm(Vector128<uint> accumulator)
918-
{
919-
if (AdvSimd.Arm64.IsSupported)
920-
{
921-
Vector64<uint> sum = AdvSimd.Arm64.AddAcross(accumulator);
922-
return (int)AdvSimd.Extract(sum, 0);
923-
}
924-
925-
Vector128<ulong> sum2 = AdvSimd.AddPairwiseWidening(accumulator);
926-
Vector64<uint> sum3 = AdvSimd.Add(sum2.GetLower().AsUInt32(), sum2.GetUpper().AsUInt32());
927-
return (int)AdvSimd.Extract(sum3, 0);
928-
}
929-
930911
/// <summary>
931912
/// Reduces even elements of the vector into one sum.
932913
/// </summary>

src/ImageSharp/Diagnostics/CodeAnalysis/UnscopedRefAttribute.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/ImageSharp/Formats/Webp/Lossy/LossyUtils.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -230,11 +230,7 @@ private static unsafe int Vp8_Sse16x16_Neon(Span<byte> a, Span<byte> b)
230230
}
231231
}
232232

233-
#if NET7_0_OR_GREATER
234233
return (int)Vector128.Sum(sum);
235-
#else
236-
return Numerics.ReduceSumArm(sum);
237-
#endif
238234
}
239235

240236
[MethodImpl(InliningOptions.ShortMethod)]
@@ -252,11 +248,7 @@ private static unsafe int Vp8_Sse16x8_Neon(Span<byte> a, Span<byte> b)
252248
}
253249
}
254250

255-
#if NET7_0_OR_GREATER
256251
return (int)Vector128.Sum(sum);
257-
#else
258-
return Numerics.ReduceSumArm(sum);
259-
#endif
260252
}
261253

262254
[MethodImpl(InliningOptions.ShortMethod)]
@@ -275,11 +267,8 @@ private static int Vp8_Sse4x4_Neon(Span<byte> a, Span<byte> b)
275267
Vector128<uint> sum2 = AdvSimd.AddPairwiseWidening(prod2);
276268

277269
Vector128<uint> sum = AdvSimd.Add(sum1, sum2);
278-
#if NET7_0_OR_GREATER
270+
279271
return (int)Vector128.Sum(sum);
280-
#else
281-
return Numerics.ReduceSumArm(sum);
282-
#endif
283272
}
284273

285274
// Load all 4x4 pixels into a single Vector128<uint>

src/ImageSharp/ImageSharp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
<Choose>
3030
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
3131
<PropertyGroup>
32-
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
32+
<TargetFrameworks>net8.0</TargetFrameworks>
3333
<IsTrimmable>true</IsTrimmable>
3434
</PropertyGroup>
3535
</When>
3636
<Otherwise>
3737
<PropertyGroup>
38-
<TargetFrameworks>net6.0</TargetFrameworks>
38+
<TargetFrameworks>net8.0</TargetFrameworks>
3939
<IsTrimmable>true</IsTrimmable>
4040
</PropertyGroup>
4141
</Otherwise>

tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<IsTestProject>false</IsTestProject>
1212
<Configurations>Debug;Release</Configurations>
1313
<!-- Uncomment this to run benchmarks depending on Colorful or Pfim (colorspaces and TGA): -->
14-
<!--<SignAssembly>false</SignAssembly>-->
14+
<!--<SignAssembly>false</SignAssembly>-->
1515
</PropertyGroup>
1616

1717
<PropertyGroup>
@@ -23,12 +23,12 @@
2323
<Choose>
2424
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
2525
<PropertyGroup>
26-
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
26+
<TargetFrameworks>net8.0</TargetFrameworks>
2727
</PropertyGroup>
2828
</When>
2929
<Otherwise>
3030
<PropertyGroup>
31-
<TargetFrameworks>net6.0</TargetFrameworks>
31+
<TargetFrameworks>net8.0</TargetFrameworks>
3232
</PropertyGroup>
3333
</Otherwise>
3434
</Choose>

tests/ImageSharp.Tests.ProfilingSandbox/ImageSharp.Tests.ProfilingSandbox.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
<Choose>
2020
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
2121
<PropertyGroup>
22-
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
22+
<TargetFrameworks>net8.0</TargetFrameworks>
2323
</PropertyGroup>
2424
</When>
2525
<Otherwise>
2626
<PropertyGroup>
27-
<TargetFrameworks>net6.0</TargetFrameworks>
27+
<TargetFrameworks>net8.0</TargetFrameworks>
2828
</PropertyGroup>
2929
</Otherwise>
3030
</Choose>

tests/ImageSharp.Tests/ImageSharp.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
<Choose>
1313
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
1414
<PropertyGroup>
15-
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
15+
<TargetFrameworks>net8.0</TargetFrameworks>
1616
</PropertyGroup>
1717
</When>
1818
<Otherwise>
1919
<PropertyGroup>
20-
<TargetFrameworks>net6.0</TargetFrameworks>
20+
<TargetFrameworks>net8.0</TargetFrameworks>
2121
</PropertyGroup>
2222
</Otherwise>
2323
</Choose>

0 commit comments

Comments
 (0)