Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo bench fails #8

Open
tenzap opened this issue Feb 27, 2023 · 0 comments
Open

cargo bench fails #8

tenzap opened this issue Feb 27, 2023 · 0 comments

Comments

@tenzap
Copy link

tenzap commented Feb 27, 2023

Error:

error[E0308]: mismatched types
    --> benches/transpose_benchmarks.rs:21:59
     |
21   |         .throughput(|&&(width, height)| Throughput::Bytes((width * height * mem::size_of::<T>()) as u32))
     |                                         ----------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
     |                                         |
     |                                         arguments to this enum variant are incorrect
     |
note: tuple variant defined here
    --> /home/fabien/.cargo/registry/src/github.com-1ecc6299db9ec823/criterion-0.3.6/src/lib.rs:1343:5
     |
1343 |     Bytes(u64),
     |     ^^^^^
help: you can convert a `u32` to a `u64`
     |
21   |         .throughput(|&&(width, height)| Throughput::Bytes(((width * height * mem::size_of::<T>()) as u32).into()))
     |                                                           +                                             ++++++++

error[E0308]: mismatched types
    --> benches/transpose_benchmarks.rs:47:59
     |
47   |         .throughput(|&&(width, height)| Throughput::Bytes((width * height * mem::size_of::<T>()) as u32))
     |                                         ----------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `u32`
     |                                         |
     |                                         arguments to this enum variant are incorrect
     |
note: tuple variant defined here
    --> /home/fabien/.cargo/registry/src/github.com-1ecc6299db9ec823/criterion-0.3.6/src/lib.rs:1343:5
     |
1343 |     Bytes(u64),
     |     ^^^^^
help: you can convert a `u32` to a `u64`
     |
47   |         .throughput(|&&(width, height)| Throughput::Bytes(((width * height * mem::size_of::<T>()) as u32).into()))
     |                                                           +                                             ++++++++

For more information about this error, try `rustc --explain E0308`.
warning: `transpose` (bench "transpose_benchmarks") generated 5 warnings
error: could not compile `transpose` due to 2 previous errors; 5 warnings emitted
warning: build failed, waiting for other jobs to finish...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant