Add AVX2 Dependency

This commit is contained in:
Chaoscaot
2023-04-05 22:39:59 +02:00
parent 00e3d6fd0f
commit 277d833da2
2 changed files with 8 additions and 1 deletions

View File

@ -10,3 +10,4 @@ license = "AGPL-3.0-or-later"
hematite-nbt = "0.5.2"
serde = "1.0.152"
schemsearch-files = { path = "../schemsearch-files" }
manual-avx2 = { git = "https://github.com/Chaoscaot/manual-avx2", version = "0.1.0" }

View File

@ -88,6 +88,12 @@ pub fn search(
}
}
}
for index in (0..schem_data.len()).step_by(8) {
let pattern_data_slice = schem_data[index..index + 8];
let data = manual_avx2::vec_i::VecInteger::new_i32(&(index..index + 8).map(|i| schem_data[i]).collect::<[i32; 8]>());
}
let matching_percent = matching as f32 / pattern_blocks;
if matching_percent >= search_behavior.threshold {
matches.push(Match {