File tree Expand file tree Collapse file tree
src/ImageSharp/Common/Helpers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -761,10 +761,13 @@ internal static void ByteToNormalizedFloatReduce(
761761 {
762762 DebugGuard . IsTrue ( source . Length == destination . Length , nameof ( source ) , "Input spans must be of same length!" ) ;
763763
764- if ( Avx2 . IsSupported || Sse2 . IsSupported )
764+ if ( ( Vector512 . IsHardwareAccelerated && Avx512F . IsSupported ) ||
765+ Avx2 . IsSupported ||
766+ Sse2 . IsSupported ||
767+ AdvSimd . IsSupported )
765768 {
766769 int remainder ;
767- if ( Vector512 . IsHardwareAccelerated && Avx512F . IsSupported )
770+ if ( Avx512F . IsSupported )
768771 {
769772 remainder = Numerics . ModuloP2 ( source . Length , Vector512 < byte > . Count ) ;
770773 }
@@ -877,7 +880,6 @@ internal static unsafe void ByteToNormalizedFloat(
877880 ref Vector128 < float > destinationBase = ref Unsafe . As < float , Vector128 < float > > ( ref MemoryMarshal . GetReference ( destination ) ) ;
878881
879882 Vector128 < float > scale = Vector128 . Create ( 1 / ( float ) byte . MaxValue ) ;
880- Vector128 < byte > zero = Vector128 < byte > . Zero ;
881883
882884 for ( nuint i = 0 ; i < n ; i ++ )
883885 {
You can’t perform that action at this time.
0 commit comments