We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 120c5be commit 8d2d642Copy full SHA for 8d2d642
src/avx2/ycbcr.rs
@@ -191,6 +191,10 @@ mod tests {
191
#[test]
192
#[cfg(feature = "simd")]
193
fn avx_matches_scalar_rgb() {
194
+ // Do not run AVX2 test on machines without it
195
+ if !std::is_x86_feature_detected!("avx2") {
196
+ return;
197
+ }
198
let mut rng = SimpleRng::new(42);
199
let width = 512 + 3; // power of two plus a bit to stress remainder handling
200
let height = 1;
@@ -213,6 +217,7 @@ mod tests {
213
217
width.try_into().unwrap(),
214
218
height.try_into().unwrap(),
215
219
);
220
+ // SAFETY: we've checked above that AVX2 is present
216
221
unsafe {
222
let avx_result = avx_input.fill_buffers_avx2(0, &mut buffers);
223
}
0 commit comments