blob: 6e845a07d7b992ea884d4d0c4011aa5d016f1f53 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
threadgroup atomic_int* arg_0;
};
struct tint_symbol_1 {
atomic_int tint_symbol;
};
void atomicStore_8bea94(tint_module_vars_struct tint_module_vars) {
atomic_store_explicit(tint_module_vars.arg_0, 1, memory_order_relaxed);
}
void compute_main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) {
if ((tint_local_index == 0u)) {
atomic_store_explicit(tint_module_vars.arg_0, 0, memory_order_relaxed);
}
threadgroup_barrier(mem_flags::mem_threadgroup);
atomicStore_8bea94(tint_module_vars);
}
kernel void compute_main(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v [[threadgroup(0)]]) {
tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=(&(*v).tint_symbol)};
compute_main_inner(tint_local_index, tint_module_vars);
}