vyre 0.4.0

GPU compute intermediate representation with a standard operation library
Documentation
struct MemsetParams {
    len: u32,
    value: u32,
    reserved0: u32,
    reserved1: u32,
}

@group(0) @binding(0) var<uniform> params: MemsetParams;
@group(0) @binding(1) var<storage, read_write> output_words: array<u32>;

@compute @workgroup_size(64, 1, 1)
fn buffer_memset(@builtin(global_invocation_id) id: vec3<u32>) {
    let word_index = id.x;
    let word_count = (params.len + 3u) >> 2u;
    if (word_index >= word_count) {
        return;
    }
    var word = vyre_repeated_byte(params.value);
    if (word_index + 1u == word_count) {
        word = word & vyre_low_byte_mask(params.len);
    }
    output_words[word_index] = word;
}