File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
ImageSharp/Common/Helpers Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 2
2
<RuleSet Name =" ImageSharp" ToolsVersion =" 17.0" >
3
3
<Include Path =" ..\shared-infrastructure\sixlabors.ruleset" Action =" Default" />
4
4
<Rules AnalyzerId =" Microsoft.CodeAnalysis.CSharp.NetAnalyzers" RuleNamespace =" Microsoft.CodeAnalysis.CSharp.NetAnalyzers" >
5
- <Rule Id =" CA1857" Action =" None" />
6
5
<Rule Id =" CA1859" Action =" None" />
7
6
</Rules >
8
7
<Rules AnalyzerId =" StyleCop.Analyzers" RuleNamespace =" StyleCop.Analyzers" >
Original file line number Diff line number Diff line change 1
1
// Copyright (c) Six Labors.
2
2
// Licensed under the Six Labors Split License.
3
3
4
+ using System . Diagnostics . CodeAnalysis ;
4
5
using System . Runtime . CompilerServices ;
5
6
using System . Runtime . InteropServices ;
6
7
using System . Runtime . Intrinsics ;
@@ -58,7 +59,7 @@ public static Vector256<uint> PermuteMaskShiftAlpha8x32() => Vector256.Create(
58
59
public static void Shuffle4Reduce (
59
60
ref ReadOnlySpan < float > source ,
60
61
ref Span < float > dest ,
61
- byte control )
62
+ [ ConstantExpected ] byte control )
62
63
{
63
64
if ( Avx . IsSupported || Sse . IsSupported )
64
65
{
@@ -217,7 +218,7 @@ public static void Shuffle4Slice3Reduce(
217
218
private static void Shuffle4 (
218
219
ReadOnlySpan < float > source ,
219
220
Span < float > dest ,
220
- byte control )
221
+ [ ConstantExpected ] byte control )
221
222
{
222
223
if ( Avx . IsSupported )
223
224
{
Original file line number Diff line number Diff line change 2
2
// Licensed under the Six Labors Split License.
3
3
4
4
using System . Diagnostics ;
5
+ using System . Diagnostics . CodeAnalysis ;
5
6
using System . Runtime . CompilerServices ;
6
7
using System . Runtime . InteropServices ;
7
8
@@ -20,7 +21,7 @@ internal static partial class SimdUtils
20
21
public static void Shuffle4 (
21
22
ReadOnlySpan < float > source ,
22
23
Span < float > dest ,
23
- byte control )
24
+ [ ConstantExpected ] byte control )
24
25
{
25
26
VerifyShuffle4SpanInput ( source , dest ) ;
26
27
You can’t perform that action at this time.
0 commit comments