arduano / simdeez

easy simd
MIT License
332 stars 25 forks source link

Small improvements for the examples #62

Open verpeteren opened 11 months ago

verpeteren commented 11 months ago

I started working on transitioning (https://github.com/verpeteren/rust-simd-noise/pull/50/files#top) from rust-simd-noise on top of the 64 bit changes (https://github.com/verpeteren/rust-simd-noise/pull/51), but got kindof stuck because it seems that the Avx2, Sse2, Sse41 engines are not exported, only Scalar is available.

Upon further investigation, it seems that the examples were outdated and showed the same issue.

Please advice on how I can improve/continue with this.

cargo test

gives

   Compiling simdeez v2.0.0-dev3 (/data/Development/other/simdeez)
error[E0432]: unresolved import `simdeez::avx2`
 --> src/main.rs:3:14
  |
3 | use simdeez::avx2::*;
  |              ^^^^ could not find `avx2` in `simdeez`

error[E0432]: unresolved import `simdeez::sse2`
 --> src/main.rs:5:14
  |
5 | use simdeez::sse2::*;
  |              ^^^^ could not find `sse2` in `simdeez`

error[E0432]: unresolved import `simdeez::sse41`
 --> src/main.rs:6:14
  |
6 | use simdeez::sse41::*;
  |              ^^^^^ could not find `sse41` in `simdeez`

warning: unused import: `simdeez::scalar::*`
 --> src/main.rs:4:5
  |
4 | use simdeez::scalar::*;
  |     ^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

For more information about this error, try `rustc --explain E0432`.
warning: `simdeez` (bin "simdeez" test) generated 1 warning
error: could not compile `simdeez` (bin "simdeez" test) due to 3 previous errors; 1 warning emitted
warning: build failed, waiting for other jobs to finish...

This PR is broken down into small atomic commits that should be easy to review