@@ -335,6 +335,41 @@ types! {
335
335
u16 , u16 , u16 , u16 , u16 , u16 , u16 , u16 ,
336
336
u16 , u16 , u16 , u16 , u16 , u16 , u16 , u16
337
337
) ;
338
+
339
+ /// 128-bit wide set of 8 `f16` types, x86-specific
340
+ ///
341
+ /// This type is the same as the `__m128h` type defined by Intel,
342
+ /// representing a 128-bit SIMD register which internally is consisted of
343
+ /// 8 packed `f16` instances. its purpose is for f16 related intrinsic
344
+ /// implementations.
345
+ #[ unstable( feature = "stdarch_x86_avx512_f16" , issue = "127213" ) ]
346
+ pub struct __m128h( f16, f16, f16, f16, f16, f16, f16, f16) ;
347
+
348
+ /// 256-bit wide set of 16 `f16` types, x86-specific
349
+ ///
350
+ /// This type is the same as the `__m256h` type defined by Intel,
351
+ /// representing a 256-bit SIMD register which internally is consisted of
352
+ /// 16 packed `f16` instances. its purpose is for f16 related intrinsic
353
+ /// implementations.
354
+ #[ unstable( feature = "stdarch_x86_avx512_f16" , issue = "127213" ) ]
355
+ pub struct __m256h(
356
+ f16, f16, f16, f16, f16, f16, f16, f16,
357
+ f16, f16, f16, f16, f16, f16, f16, f16
358
+ ) ;
359
+
360
+ /// 512-bit wide set of 32 `f16` types, x86-specific
361
+ ///
362
+ /// This type is the same as the `__m512h` type defined by Intel,
363
+ /// representing a 512-bit SIMD register which internally is consisted of
364
+ /// 32 packed `f16` instances. its purpose is for f16 related intrinsic
365
+ /// implementations.
366
+ #[ unstable( feature = "stdarch_x86_avx512_f16" , issue = "127213" ) ]
367
+ pub struct __m512h(
368
+ f16, f16, f16, f16, f16, f16, f16, f16,
369
+ f16, f16, f16, f16, f16, f16, f16, f16,
370
+ f16, f16, f16, f16, f16, f16, f16, f16,
371
+ f16, f16, f16, f16, f16, f16, f16, f16
372
+ ) ;
338
373
}
339
374
340
375
/// The BFloat16 type used in AVX-512 intrinsics.
@@ -761,6 +796,50 @@ impl m512bhExt for __m512bh {
761
796
}
762
797
}
763
798
799
+ #[ allow( non_camel_case_types) ]
800
+ pub ( crate ) trait m128hExt : Sized {
801
+ fn as_m128h ( self ) -> __m128h ;
802
+
803
+ #[ inline]
804
+ fn as_f16x8 ( self ) -> crate :: core_arch:: simd:: f16x8 {
805
+ unsafe { transmute ( self . as_m128h ( ) ) }
806
+ }
807
+ }
808
+
809
+ impl m128hExt for __m128h {
810
+ #[ inline]
811
+ fn as_m128h ( self ) -> Self {
812
+ self
813
+ }
814
+ }
815
+
816
+ #[ allow( non_camel_case_types) ]
817
+ pub ( crate ) trait m256hExt : Sized {
818
+ fn as_m256h ( self ) -> __m256h ;
819
+
820
+ #[ inline]
821
+ fn as_f16x16 ( self ) -> crate :: core_arch:: simd:: f16x16 {
822
+ unsafe { transmute ( self . as_m256h ( ) ) }
823
+ }
824
+ }
825
+
826
+ impl m256hExt for __m256h {
827
+ #[ inline]
828
+ fn as_m256h ( self ) -> Self {
829
+ self
830
+ }
831
+ }
832
+
833
+ #[ allow( non_camel_case_types) ]
834
+ pub ( crate ) trait m512hExt : Sized {
835
+ fn as_m512h ( self ) -> __m512h ;
836
+
837
+ #[ inline]
838
+ fn as_f16x32 ( self ) -> crate :: core_arch:: simd:: f16x32 {
839
+ unsafe { transmute ( self . as_m512h ( ) ) }
840
+ }
841
+ }
842
+
764
843
mod eflags;
765
844
#[ stable( feature = "simd_x86" , since = "1.27.0" ) ]
766
845
pub use self :: eflags:: * ;
0 commit comments