blob: dce0067dac95f7d715e441f35efb397a4e6e8366 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
uint3 tint_mod_v3u32(uint3 lhs, uint3 rhs) {
uint3 const v = select(rhs, uint3(1u), (rhs == uint3(0u)));
return (lhs - ((lhs / v) * v));
}
kernel void f() {
uint3 const a = uint3(1u, 2u, 3u);
uint3 const b = uint3(4u, 5u, 6u);
uint3 const r = tint_mod_v3u32(a, b);
}