File tree Expand file tree Collapse file tree
ImageSharp/Common/Helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22<RuleSet Name =" ImageSharp" ToolsVersion =" 17.0" >
33 <Include Path =" ..\shared-infrastructure\sixlabors.ruleset" Action =" Default" />
44 <Rules AnalyzerId =" Microsoft.CodeAnalysis.CSharp.NetAnalyzers" RuleNamespace =" Microsoft.CodeAnalysis.CSharp.NetAnalyzers" >
5- <Rule Id =" CA1857" Action =" None" />
65 <Rule Id =" CA1859" Action =" None" />
76 </Rules >
87 <Rules AnalyzerId =" StyleCop.Analyzers" RuleNamespace =" StyleCop.Analyzers" >
Original file line number Diff line number Diff line change 11// Copyright (c) Six Labors.
22// Licensed under the Six Labors Split License.
33
4+ using System . Diagnostics . CodeAnalysis ;
45using System . Runtime . CompilerServices ;
56using System . Runtime . InteropServices ;
67using System . Runtime . Intrinsics ;
@@ -58,7 +59,7 @@ public static Vector256<uint> PermuteMaskShiftAlpha8x32() => Vector256.Create(
5859 public static void Shuffle4Reduce (
5960 ref ReadOnlySpan < float > source ,
6061 ref Span < float > dest ,
61- byte control )
62+ [ ConstantExpected ] byte control )
6263 {
6364 if ( Avx . IsSupported || Sse . IsSupported )
6465 {
@@ -217,7 +218,7 @@ public static void Shuffle4Slice3Reduce(
217218 private static void Shuffle4 (
218219 ReadOnlySpan < float > source ,
219220 Span < float > dest ,
220- byte control )
221+ [ ConstantExpected ] byte control )
221222 {
222223 if ( Avx . IsSupported )
223224 {
Original file line number Diff line number Diff line change 22// Licensed under the Six Labors Split License.
33
44using System . Diagnostics ;
5+ using System . Diagnostics . CodeAnalysis ;
56using System . Runtime . CompilerServices ;
67using System . Runtime . InteropServices ;
78
@@ -20,7 +21,7 @@ internal static partial class SimdUtils
2021 public static void Shuffle4 (
2122 ReadOnlySpan < float > source ,
2223 Span < float > dest ,
23- byte control )
24+ [ ConstantExpected ] byte control )
2425 {
2526 VerifyShuffle4SpanInput ( source , dest ) ;
2627
You can’t perform that action at this time.
0 commit comments