wgpu/examples/hello-compute
Connor Fitzgerald 2a9fdf9aa1
Misc Repo Cleanup Tasks (#4579)
* Misc Repo Cleanup Tasks

* Dependency Trimming

* Dep cleanup

* Restrict libfuzzer

* Flip cfg

* mod fuzz
2023-10-27 00:15:51 -04:00
..
src Fix Issue with Caching on Windows CI (#4284) 2023-10-23 04:31:22 +00:00
Cargo.toml Misc Repo Cleanup Tasks (#4579) 2023-10-27 00:15:51 -04:00
README.md Formatting and example command fixes (#3872) 2023-06-15 20:05:26 +00:00

hello-compute

Runs a compute shader to determine the number of iterations of the rules from Collatz Conjecture

  • If n is even, n = n/2
  • If n is odd, n = 3n+1

that it will take to finish and reach the number 1.

To Run

# Pass in any 4 numbers as arguments
RUST_LOG=hello_compute cargo run --bin hello-compute 1 4 3 295

Example Output

[2020-04-25T11:15:33Z INFO  hello_compute] Steps: [0, 2, 7, 55]