Skip to content

Commit df53828

Browse files
committed
internal: add inline for move_mask in line-index
1 parent 7c3744e commit df53828

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/line-index/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,7 @@ unsafe fn analyze_source_file_sse2(
340340

341341
#[target_feature(enable = "neon")]
342342
#[cfg(any(target_arch = "aarch64"))]
343+
#[inline]
343344
// See https://community.arm.com/arm-community-blogs/b/infrastructure-solutions-blog/posts/porting-x86-vector-bitmask-optimizations-to-arm-neon
344345
//
345346
// The mask is a 64-bit integer, where each 4-bit corresponds to a u8 in the
@@ -393,7 +394,7 @@ unsafe fn analyze_source_file_neon(
393394
let newlines_test = vceqq_s8(chunk, newline);
394395
let mut newlines_mask = move_mask(newlines_test);
395396

396-
// If the bit mask is all zero, there are no newlines in this chunk.
397+
// If the bit mask is not all zero, there are newlines in this chunk.
397398
if newlines_mask != 0 {
398399
let output_offset = TextSize::from((chunk_index * CHUNK_SIZE + 1) as u32);
399400

0 commit comments

Comments
 (0)