44//!
55//! It performs folding using 4 x ZMM registers of 512-bits each.
66
7- #![ cfg( all ( target_arch = "x86_64" , feature = "vpclmulqdq" ) ) ]
7+ #![ cfg( target_arch = "x86_64" ) ]
88
9- // #[rustversion::since(1.89)]
9+ #[ rustversion:: since( 1.89 ) ]
1010use crate :: arch:: x86:: X86Ops ;
1111
12- // #[rustversion::since(1.89)]
12+ #[ rustversion:: since( 1.89 ) ]
1313use crate :: enums:: Reflector ;
1414
15- // #[rustversion::since(1.89)]
15+ #[ rustversion:: since( 1.89 ) ]
1616use crate :: structs:: CrcState ;
1717
18- // #[rustversion::since(1.89)]
18+ #[ rustversion:: since( 1.89 ) ]
1919use crate :: traits:: { ArchOps , EnhancedCrcWidth } ;
2020
21- // #[rustversion::since(1.89)]
21+ #[ rustversion:: since( 1.89 ) ]
2222use std:: arch:: x86_64:: * ;
2323
24- // #[rustversion::since(1.89)]
24+ #[ rustversion:: since( 1.89 ) ]
2525use std:: ops:: BitXor ;
2626
2727/// Implements the ArchOps trait using 512-bit AVX-512 and VPCLMULQDQ instructions at 512 bits.
2828/// Delegates to X86Ops for standard 128-bit operations
29- // #[rustversion::since(1.89)]
29+ #[ rustversion:: since( 1.89 ) ]
3030#[ derive( Debug , Copy , Clone ) ]
3131pub struct Vpclmulqdq512Ops ( X86Ops ) ;
3232
33- // #[rustversion::since(1.89)]
33+ #[ rustversion:: since( 1.89 ) ]
3434impl Vpclmulqdq512Ops {
3535 #[ inline( always) ]
3636 pub fn new ( ) -> Self {
@@ -39,11 +39,11 @@ impl Vpclmulqdq512Ops {
3939}
4040
4141// Wrapper for __m512i to make it easier to work with
42- // #[rustversion::since(1.89)]
42+ #[ rustversion:: since( 1.89 ) ]
4343#[ derive( Debug , Copy , Clone ) ]
4444struct Simd512 ( __m512i ) ;
4545
46- // #[rustversion::since(1.89)]
46+ #[ rustversion:: since( 1.89 ) ]
4747impl Simd512 {
4848 #[ inline]
4949 #[ target_feature( enable = "avx512f" ) ]
@@ -112,7 +112,7 @@ impl Simd512 {
112112 }
113113}
114114
115- // #[rustversion::since(1.89)]
115+ #[ rustversion:: since( 1.89 ) ]
116116impl Vpclmulqdq512Ops {
117117 /// Process aligned blocks using VPCLMULQDQ with 4 x 512-bit registers
118118 ///
@@ -339,15 +339,15 @@ impl Vpclmulqdq512Ops {
339339}
340340
341341// 512-bit version of the Reflector
342- // #[rustversion::since(1.89)]
342+ #[ rustversion:: since( 1.89 ) ]
343343#[ derive( Clone , Copy ) ]
344344enum Reflector512 {
345345 NoReflector ,
346346 ForwardReflector { smask : Simd512 } ,
347347}
348348
349349// Function to create the appropriate reflector based on CRC parameters
350- // #[rustversion::since(1.89)]
350+ #[ rustversion:: since( 1.89 ) ]
351351#[ inline( always) ]
352352unsafe fn create_reflector512 ( reflected : bool ) -> Reflector512 {
353353 if reflected {
@@ -369,7 +369,7 @@ unsafe fn create_reflector512(reflected: bool) -> Reflector512 {
369369}
370370
371371// Function to apply reflection to a 512-bit vector
372- // #[rustversion::since(1.89)]
372+ #[ rustversion:: since( 1.89 ) ]
373373#[ inline( always) ]
374374unsafe fn reflect_bytes512 ( reflector : & Reflector512 , data : Simd512 ) -> Simd512 {
375375 match reflector {
@@ -379,12 +379,12 @@ unsafe fn reflect_bytes512(reflector: &Reflector512, data: Simd512) -> Simd512 {
379379}
380380
381381// pre-compute the reverse indices for 512-bit shuffling
382- // #[rustversion::since(1.89)]
382+ #[ rustversion:: since( 1.89 ) ]
383383static REVERSE_INDICES_512 : __m512i =
384384 unsafe { std:: mem:: transmute ( [ 7u64 , 6u64 , 5u64 , 4u64 , 3u64 , 2u64 , 1u64 , 0u64 ] ) } ;
385385
386386// Implement a 512-bit byte shuffle function
387- // #[rustversion::since(1.89)]
387+ #[ rustversion:: since( 1.89 ) ]
388388#[ inline]
389389#[ target_feature( enable = "avx512f,avx512bw" ) ]
390390unsafe fn shuffle_bytes512 ( data : Simd512 , mask : Simd512 ) -> Simd512 {
@@ -396,7 +396,7 @@ unsafe fn shuffle_bytes512(data: Simd512, mask: Simd512) -> Simd512 {
396396}
397397
398398// Delegate all ArchOps methods to the inner X86Ops instance
399- // #[rustversion::since(1.89)]
399+ #[ rustversion:: since( 1.89 ) ]
400400impl ArchOps for Vpclmulqdq512Ops {
401401 type Vector = __m128i ;
402402
0 commit comments