mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-16 17:48:05 +00:00
Enhance coding conventions and static analysis setup; update .editorconfig, scanner.sh, and various C# files for improved readability and performance
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -300,6 +301,7 @@ public sealed class Sma
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
|
||||
#pragma warning disable S6640 // Unsafe code is required for high-performance SIMD operations
|
||||
private static unsafe void CalculateSimdCore(ReadOnlySpan<double> source, Span<double> output, int period)
|
||||
{
|
||||
int len = source.Length;
|
||||
@@ -370,6 +372,7 @@ public sealed class Sma
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore S6640
|
||||
|
||||
/// <summary>
|
||||
/// Checks if span contains any non-finite values (NaN or Infinity).
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
@@ -285,6 +286,7 @@ public sealed class Wma
|
||||
}
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveOptimization)]
|
||||
#pragma warning disable S6640 // Unsafe code is required for high-performance SIMD operations
|
||||
private static unsafe void CalculateSimdCore(ReadOnlySpan<double> source, Span<double> output, int period)
|
||||
{
|
||||
int len = source.Length;
|
||||
@@ -466,6 +468,7 @@ public sealed class Wma
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma warning restore S6640
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
private static bool HasNonFiniteValues(ReadOnlySpan<double> span)
|
||||
|
||||
Reference in New Issue
Block a user