From 210315da0f138765a240c62f1df2ca1b083dc699 Mon Sep 17 00:00:00 2001 From: "Dongjia \"toka\" Zhang" Date: Sun, 3 Dec 2023 16:19:12 +0100 Subject: [PATCH] fix simd (#1709) --- libafl/src/feedbacks/map.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libafl/src/feedbacks/map.rs b/libafl/src/feedbacks/map.rs index 6c0730eb02..0cf81217e8 100644 --- a/libafl/src/feedbacks/map.rs +++ b/libafl/src/feedbacks/map.rs @@ -5,7 +5,7 @@ use alloc::{ vec::Vec, }; #[rustversion::nightly] -use core::simd::SimdOrd; +use core::simd::cmp::SimdOrd; use core::{ fmt::Debug, marker::PhantomData, @@ -547,20 +547,20 @@ where } }*/ - let steps = size / VectorType::LANES; - let left = size % VectorType::LANES; + let steps = size / VectorType::LEN; + let left = size % VectorType::LEN; if let Some(novelties) = self.novelties.as_mut() { novelties.clear(); for step in 0..steps { - let i = step * VectorType::LANES; + let i = step * VectorType::LEN; let history = VectorType::from_slice(&history_map[i..]); let items = VectorType::from_slice(&map[i..]); if items.simd_max(history) != history { interesting = true; unsafe { - for j in i..(i + VectorType::LANES) { + for j in i..(i + VectorType::LEN) { let item = *map.get_unchecked(j); if item > *history_map.get_unchecked(j) { novelties.push(j); @@ -581,7 +581,7 @@ where } } else { for step in 0..steps { - let i = step * VectorType::LANES; + let i = step * VectorType::LEN; let history = VectorType::from_slice(&history_map[i..]); let items = VectorType::from_slice(&map[i..]);