File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
src/ImageSharp/Common/Helpers Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -761,10 +761,13 @@ internal static void ByteToNormalizedFloatReduce(
761
761
{
762
762
DebugGuard . IsTrue ( source . Length == destination . Length , nameof ( source ) , "Input spans must be of same length!" ) ;
763
763
764
- if ( Avx2 . IsSupported || Sse2 . IsSupported )
764
+ if ( ( Vector512 . IsHardwareAccelerated && Avx512F . IsSupported ) ||
765
+ Avx2 . IsSupported ||
766
+ Sse2 . IsSupported ||
767
+ AdvSimd . IsSupported )
765
768
{
766
769
int remainder ;
767
- if ( Vector512 . IsHardwareAccelerated && Avx512F . IsSupported )
770
+ if ( Avx512F . IsSupported )
768
771
{
769
772
remainder = Numerics . ModuloP2 ( source . Length , Vector512 < byte > . Count ) ;
770
773
}
@@ -877,7 +880,6 @@ internal static unsafe void ByteToNormalizedFloat(
877
880
ref Vector128 < float > destinationBase = ref Unsafe . As < float , Vector128 < float > > ( ref MemoryMarshal . GetReference ( destination ) ) ;
878
881
879
882
Vector128 < float > scale = Vector128 . Create ( 1 / ( float ) byte . MaxValue ) ;
880
- Vector128 < byte > zero = Vector128 < byte > . Zero ;
881
883
882
884
for ( nuint i = 0 ; i < n ; i ++ )
883
885
{
You can’t perform that action at this time.
0 commit comments