@@ -94,17 +94,17 @@ internal static void BulkConvertByteToNormalizedFloat(ReadOnlySpan<byte> source,
9494 var magicInt = new Vector < uint > ( 1191182336 ) ; // reinterpreted value of 32768.0f
9595 var mask = new Vector < uint > ( 255 ) ;
9696
97- ref Octet . OfByte sourceBase = ref Unsafe . As < byte , Octet . OfByte > ( ref MemoryMarshal . GetReference ( source ) ) ;
98- ref Octet . OfUInt32 destBaseAsWideOctet = ref Unsafe . As < float , Octet . OfUInt32 > ( ref MemoryMarshal . GetReference ( dest ) ) ;
97+ ref Octet < byte > sourceBase = ref Unsafe . As < byte , Octet < byte > > ( ref MemoryMarshal . GetReference ( source ) ) ;
98+ ref Octet < uint > destBaseAsWideOctet = ref Unsafe . As < float , Octet < uint > > ( ref MemoryMarshal . GetReference ( dest ) ) ;
9999
100- ref Vector < float > destBaseAsFloat = ref Unsafe . As < Octet . OfUInt32 , Vector < float > > ( ref destBaseAsWideOctet ) ;
100+ ref Vector < float > destBaseAsFloat = ref Unsafe . As < Octet < uint > , Vector < float > > ( ref destBaseAsWideOctet ) ;
101101
102102 int n = dest . Length / 8 ;
103103
104104 for ( int i = 0 ; i < n ; i ++ )
105105 {
106- ref Octet . OfByte s = ref Unsafe . Add ( ref sourceBase , i ) ;
107- ref Octet . OfUInt32 d = ref Unsafe . Add ( ref destBaseAsWideOctet , i ) ;
106+ ref Octet < byte > s = ref Unsafe . Add ( ref sourceBase , i ) ;
107+ ref Octet < uint > d = ref Unsafe . Add ( ref destBaseAsWideOctet , i ) ;
108108 d . LoadFrom ( ref s ) ;
109109 }
110110
@@ -137,17 +137,17 @@ internal static void BulkConvertNormalizedFloatToByteClampOverflows(ReadOnlySpan
137137 }
138138
139139 ref Vector < float > srcBase = ref Unsafe . As < float , Vector < float > > ( ref MemoryMarshal . GetReference ( source ) ) ;
140- ref Octet . OfByte destBase = ref Unsafe . As < byte , Octet . OfByte > ( ref MemoryMarshal . GetReference ( dest ) ) ;
140+ ref Octet < byte > destBase = ref Unsafe . As < byte , Octet < byte > > ( ref MemoryMarshal . GetReference ( dest ) ) ;
141141 int n = source . Length / 8 ;
142142
143143 var magick = new Vector < float > ( 32768.0f ) ;
144144 var scale = new Vector < float > ( 255f ) / new Vector < float > ( 256f ) ;
145145
146146 // need to copy to a temporary struct, because
147- // SimdUtils.Octet.OfUInt32 temp = Unsafe.As<Vector<float>, SimdUtils.Octet.OfUInt32 >(ref x)
147+ // SimdUtils.Octet<uint> temp = Unsafe.As<Vector<float>, SimdUtils.Octet<uint> >(ref x)
148148 // does not work. TODO: This might be a CoreClr bug, need to ask/report
149- var temp = default ( Octet . OfUInt32 ) ;
150- ref Vector < float > tempRef = ref Unsafe . As < Octet . OfUInt32 , Vector < float > > ( ref temp ) ;
149+ var temp = default ( Octet < uint > ) ;
150+ ref Vector < float > tempRef = ref Unsafe . As < Octet < uint > , Vector < float > > ( ref temp ) ;
151151
152152 for ( int i = 0 ; i < n ; i ++ )
153153 {
@@ -161,7 +161,7 @@ internal static void BulkConvertNormalizedFloatToByteClampOverflows(ReadOnlySpan
161161 x = ( x * scale ) + magick ;
162162 tempRef = x ;
163163
164- ref Octet . OfByte d = ref Unsafe . Add ( ref destBase , i ) ;
164+ ref Octet < byte > d = ref Unsafe . Add ( ref destBase , i ) ;
165165 d . LoadFrom ( ref temp ) ;
166166 }
167167 }
@@ -186,17 +186,17 @@ internal static void BulkConvertNormalizedFloatToByte(ReadOnlySpan<float> source
186186 }
187187
188188 ref Vector < float > srcBase = ref Unsafe . As < float , Vector < float > > ( ref MemoryMarshal . GetReference ( source ) ) ;
189- ref Octet . OfByte destBase = ref Unsafe . As < byte , Octet . OfByte > ( ref MemoryMarshal . GetReference ( dest ) ) ;
189+ ref Octet < byte > destBase = ref Unsafe . As < byte , Octet < byte > > ( ref MemoryMarshal . GetReference ( dest ) ) ;
190190 int n = source . Length / 8 ;
191191
192192 var magick = new Vector < float > ( 32768.0f ) ;
193193 var scale = new Vector < float > ( 255f ) / new Vector < float > ( 256f ) ;
194194
195195 // need to copy to a temporary struct, because
196- // SimdUtils.Octet.OfUInt32 temp = Unsafe.As<Vector<float>, SimdUtils.Octet.OfUInt32 >(ref x)
196+ // SimdUtils.Octet<uint> temp = Unsafe.As<Vector<float>, SimdUtils.Octet<uint> >(ref x)
197197 // does not work. TODO: This might be a CoreClr bug, need to ask/report
198- var temp = default ( Octet . OfUInt32 ) ;
199- ref Vector < float > tempRef = ref Unsafe . As < Octet . OfUInt32 , Vector < float > > ( ref temp ) ;
198+ var temp = default ( Octet < uint > ) ;
199+ ref Vector < float > tempRef = ref Unsafe . As < Octet < uint > , Vector < float > > ( ref temp ) ;
200200
201201 for ( int i = 0 ; i < n ; i ++ )
202202 {
@@ -207,7 +207,7 @@ internal static void BulkConvertNormalizedFloatToByte(ReadOnlySpan<float> source
207207 x = ( x * scale ) + magick ;
208208 tempRef = x ;
209209
210- ref Octet . OfByte d = ref Unsafe . Add ( ref destBase , i ) ;
210+ ref Octet < byte > d = ref Unsafe . Add ( ref destBase , i ) ;
211211 d . LoadFrom ( ref temp ) ;
212212 }
213213 }
0 commit comments