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(1) @binding(1) var<storage, read_write> result_0: array<u32>;
@group(1) @binding(2) var<storage, read_write> aux_0: array<u32>;
@group(1) @binding(4) var<storage, read_write> result_1: array<u32>;
@group(1) @binding(5) var<storage, read_write> aux_1: 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_0) {
result_0[gid] += aux_0[wid];
result_1[gid] += aux_1[wid];
}
}
)"