blob: 69ab288a999a8e0b99683ce6981e60cfd23de57b [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));
}
kernel void f(uint3 v [[thread_position_in_grid]]) {
uint const l = (v[0u] << (tint_mod_u32(v[1u], 1u) & 31u));
}