blob: 291ad889181ddbcab943bdde0053d573cde2eb89 [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);
}