Skip to content

Commit

Permalink
nit: simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
hkratz committed Oct 22, 2024
1 parent c4cbc10 commit dbc33c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/implementation/algorithm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ macro_rules! algorithm_simd {
let iter_lim = len - (len % SIMD_CHUNK_SIZE);

while idx < iter_lim {
let simd_input = SimdInput::new(input.as_ptr().add(idx as usize));
let simd_input = SimdInput::new(input.as_ptr().add(idx));
idx += SIMD_CHUNK_SIZE;
if !simd_input.is_ascii() {
algorithm.check_block(simd_input);
Expand All @@ -231,7 +231,7 @@ macro_rules! algorithm_simd {
if PREFETCH {
simd_prefetch(input.as_ptr().add(idx + SIMD_CHUNK_SIZE * 2));
}
let input = SimdInput::new(input.as_ptr().add(idx as usize));
let input = SimdInput::new(input.as_ptr().add(idx));
algorithm.check_utf8(input);
idx += SIMD_CHUNK_SIZE;
}
Expand Down Expand Up @@ -286,7 +286,7 @@ macro_rules! algorithm_simd {
'outer: loop {
if only_ascii {
while idx < iter_lim {
let simd_input = SimdInput::new(input.as_ptr().add(idx as usize));
let simd_input = SimdInput::new(input.as_ptr().add(idx));
if !simd_input.is_ascii() {
algorithm.check_block(simd_input);
if algorithm.has_error() {
Expand All @@ -304,7 +304,7 @@ macro_rules! algorithm_simd {
if PREFETCH {
simd_prefetch(input.as_ptr().add(idx + SIMD_CHUNK_SIZE * 2));
}
let simd_input = SimdInput::new(input.as_ptr().add(idx as usize));
let simd_input = SimdInput::new(input.as_ptr().add(idx));
if simd_input.is_ascii() {
algorithm.check_incomplete_pending();
if algorithm.has_error() {
Expand Down Expand Up @@ -407,7 +407,7 @@ macro_rules! algorithm_simd {
let mut idx: usize = 0;
let iter_lim = len - (len % SIMD_CHUNK_SIZE);
while idx < iter_lim {
let input = SimdInput::new(input.as_ptr().add(idx as usize));
let input = SimdInput::new(input.as_ptr().add(idx));
self.algorithm.check_utf8(input);
idx += SIMD_CHUNK_SIZE;
}
Expand Down

0 comments on commit dbc33c8

Please sign in to comment.