#version 450
layout(local_size_x = 64) in;
#include <sim_math.glsl>
layout(set = 0, binding = 0) buffer Data { uint words[]; };
float word(uint base, uint index) { return uintBitsToFloat(words[base + index]); }
void main() {
uint base = gl_GlobalInvocationID.x * 9u;
if (base + 9u > words.length()) return;
vec3 v = vec3(word(base, 0u), word(base, 1u), word(base, 2u));
vec3 u = vec3(word(base, 3u), word(base, 4u), word(base, 5u));
float s = word(base, 6u);
words[base + 0u] = floatBitsToUint(sim_recip(s));
words[base + 1u] = floatBitsToUint(sim_rsqrt(s));
words[base + 2u] = floatBitsToUint(sim_sqrt(s));
words[base + 3u] = floatBitsToUint(sim_div(v.x, s));
words[base + 4u] = floatBitsToUint(sim_dot(v, u));
words[base + 5u] = floatBitsToUint(sim_length(v));
words[base + 6u] = floatBitsToUint(sim_normalize(v).y);
float t = word(base, 7u);
words[base + 7u] = floatBitsToUint(sim_mul(mat3(v, u, vec3(s)), u).x);
words[base + 8u] = uint(sim_to_int(t));
}