blob: 79967ebe3cfb3f90dea57d403cebe1b1f16bf835 [file] [log] [blame]
#include <metal_stdlib>
using namespace metal;
struct tint_module_vars_struct {
thread half* u;
};
int tint_f16_to_i32(half value) {
return select(2147483647, select((-2147483647 - 1), int(value), (value >= -65504.0h)), (value <= 65504.0h));
}
void f(tint_module_vars_struct tint_module_vars) {
int const v = tint_f16_to_i32((*tint_module_vars.u));
}