fix simd (#1709)
This commit is contained in:
parent
108c04a8d2
commit
210315da0f
@ -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..]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user