Files
wgpu/examples/hello-compute
bors[bot]andDzmitry Malyshau aabcc44744 Merge #792
792: Use implicit layout for hello-compute r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-19 14:34:13 +00:00
..
2021-03-19 14:34:13 +00:00
2020-04-26 18:59:48 -02:30
2021-03-14 00:50:35 -05: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 --example hello-compute 1 4 3 295

Example Output

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