NetDEM v1.0
Loading...
Searching...
No Matches
add_block_sums.wgsl.h File Reference
#include <string>

Go to the source code of this file.

Variables

 shader_source
 

Variable Documentation

◆ shader_source

shader_source
Initial value:
= R"(
// Define the binding group layout
@group(0) @binding(1) var<storage, read_write> result: array<u32>;
@group(0) @binding(2) var<storage, read_write> aux: array<u32>;
const WORKGROUP_SIZE : u32 = 256u;
@compute @workgroup_size(WORKGROUP_SIZE)
fn AddBlockSums(
@builtin(global_invocation_id) global_id: vec3<u32>,
@builtin(local_invocation_id) local_id: vec3<u32>,
@builtin(workgroup_id) group_id: vec3<u32>
) {
let gid = global_id.x;
let wid = group_id.x;
if gid < arrayLength(&result) {
result[gid] = result[gid] + aux[wid];
}
}
)"