@@ -40,7 +40,7 @@ pub fn nibble_unpack(packed: &[u8], count: usize) -> Vec<u8> {
4040 out
4141}
4242
43- fn nibble_unpack_scalar ( packed : & [ u8 ] , count : usize , out : & mut Vec < u8 > ) {
43+ pub ( crate ) fn nibble_unpack_scalar ( packed : & [ u8 ] , count : usize , out : & mut Vec < u8 > ) {
4444 for i in 0 ..count {
4545 let byte = packed[ i / 2 ] ;
4646 let val = if i & 1 == 0 { byte & 0x0F } else { byte >> 4 } ;
@@ -54,7 +54,7 @@ fn nibble_unpack_scalar(packed: &[u8], count: usize, out: &mut Vec<u8>) {
5454/// Caller must ensure AVX2 is available and `count >= 32`.
5555#[ cfg( target_arch = "x86_64" ) ]
5656#[ target_feature( enable = "avx2" ) ]
57- unsafe fn nibble_unpack_avx2 ( packed : & [ u8 ] , count : usize , out : & mut Vec < u8 > ) {
57+ pub ( crate ) unsafe fn nibble_unpack_avx2 ( packed : & [ u8 ] , count : usize , out : & mut Vec < u8 > ) {
5858 use core:: arch:: x86_64:: * ;
5959
6060 let low_mask = _mm_set1_epi8 ( 0x0F ) ;
@@ -252,7 +252,7 @@ pub fn nibble_above_threshold(packed: &[u8], threshold: u8) -> Vec<usize> {
252252 nibble_above_threshold_scalar ( packed, threshold)
253253}
254254
255- fn nibble_above_threshold_scalar ( packed : & [ u8 ] , threshold : u8 ) -> Vec < usize > {
255+ pub ( crate ) fn nibble_above_threshold_scalar ( packed : & [ u8 ] , threshold : u8 ) -> Vec < usize > {
256256 let mut result = Vec :: new ( ) ;
257257 let count = packed. len ( ) * 2 ;
258258 for i in 0 ..count {
@@ -272,7 +272,7 @@ fn nibble_above_threshold_scalar(packed: &[u8], threshold: u8) -> Vec<usize> {
272272/// Caller must ensure AVX2 is available and `packed.len() >= 16`.
273273#[ cfg( target_arch = "x86_64" ) ]
274274#[ target_feature( enable = "avx2" ) ]
275- unsafe fn nibble_above_threshold_avx2 ( packed : & [ u8 ] , threshold : u8 ) -> Vec < usize > {
275+ pub ( crate ) unsafe fn nibble_above_threshold_avx2 ( packed : & [ u8 ] , threshold : u8 ) -> Vec < usize > {
276276 use core:: arch:: x86_64:: * ;
277277
278278 let mut result = Vec :: new ( ) ;
0 commit comments