blob: 1263c77ba2ab62917279ca9b5cdaaa2a45ae9e9c [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
uint tint_mod_u32(uint lhs, uint rhs) {
uint const v_1 = select(rhs, 1u, (rhs == 0u));
return (lhs - ((lhs / v_1) * v_1));
}
void f_inner(uint3 v) {
uint const l = (v[0u] << (tint_mod_u32(v[1u], 1u) & 31u));
}
kernel void f(uint3 v [[thread_position_in_grid]]) {
f_inner(v);
}