1- #[ cfg( target_arch = "x86" ) ]
2- pub ( crate ) unsafe fn match_uri_vectored ( _: & [ u8 ] ) -> usize {
3- unreachable ! ( "AVX2 detection should be disabled for x86" ) ;
4- }
5-
61#[ inline]
7- #[ cfg( target_arch = "x86_64" ) ]
82#[ target_feature( enable = "avx2" , enable = "sse4.2" ) ]
93pub ( crate ) unsafe fn match_uri_vectored ( bytes : & [ u8 ] ) -> usize {
104 let mut len = 0usize ;
@@ -26,6 +20,7 @@ pub(crate) unsafe fn match_uri_vectored(bytes: &[u8]) -> usize {
2620
2721#[ inline( always) ]
2822#[ allow( non_snake_case, overflowing_literals) ]
23+ #[ allow( unused) ]
2924unsafe fn match_url_char_32_avx ( buf : & [ u8 ] ) -> usize {
3025 debug_assert ! ( buf. len( ) >= 32 ) ;
3126
@@ -64,12 +59,6 @@ unsafe fn match_url_char_32_avx(buf: &[u8]) -> usize {
6459 r. trailing_zeros ( ) as usize
6560}
6661
67- #[ cfg( target_arch = "x86" ) ]
68- pub ( crate ) unsafe fn match_header_value_vectored ( _: & [ u8 ] ) -> usize {
69- unreachable ! ( "AVX2 detection should be disabled for x86" ) ;
70- }
71-
72- #[ cfg( target_arch = "x86_64" ) ]
7362#[ target_feature( enable = "avx2" , enable = "sse4.2" ) ]
7463pub ( crate ) unsafe fn match_header_value_vectored ( bytes : & [ u8 ] ) -> usize {
7564 let mut len = 0usize ;
@@ -91,6 +80,7 @@ pub(crate) unsafe fn match_header_value_vectored(bytes: &[u8]) -> usize {
9180
9281#[ inline( always) ]
9382#[ allow( non_snake_case) ]
83+ #[ allow( unused) ]
9484unsafe fn match_header_value_char_32_avx ( buf : & [ u8 ] ) -> usize {
9585 debug_assert ! ( buf. len( ) >= 32 ) ;
9686
0 commit comments