shute 0.1.0

Abstraction of wgpu for simple compute shader execution
Documentation
1
2
3
4
5
6
7
8
9
10
11
@group(0) @binding(0) var<storage, read> input: array<u32>;
@group(0) @binding(1) var<storage, read_write> output: array<u32>;

@compute @workgroup_size(1)
fn main (@builtin(global_invocation_id) global_id: vec3<u32>) {
    let index = global_id.x;
    if (index < arrayLength(&input)) {
        let value = input[index];
        output[index] = value * value;
    }
}