1#include <metal_stdlib> 2#include <simd/simd.h> 3 4using namespace metal; 5 6struct main0_in 7{ 8 float v1 [[user(locn0)]]; 9 float2 v2 [[user(locn1)]]; 10 float3 v3 [[user(locn2)]]; 11 float4 v4 [[user(locn3)]]; 12 half h1 [[user(locn4)]]; 13 half2 h2 [[user(locn5)]]; 14 half3 h3 [[user(locn6)]]; 15 half4 h4 [[user(locn7)]]; 16}; 17 18fragment void main0(main0_in in [[stage_in]]) 19{ 20 float res = fast::min(in.v1, in.v1); 21 res = fast::max(in.v1, in.v1); 22 res = fast::clamp(in.v1, in.v1, in.v1); 23 res = precise::min(in.v1, in.v1); 24 res = precise::max(in.v1, in.v1); 25 res = precise::clamp(in.v1, in.v1, in.v1); 26 float2 res2 = fast::min(in.v2, in.v2); 27 res2 = fast::max(in.v2, in.v2); 28 res2 = fast::clamp(in.v2, in.v2, in.v2); 29 res2 = precise::min(in.v2, in.v2); 30 res2 = precise::max(in.v2, in.v2); 31 res2 = precise::clamp(in.v2, in.v2, in.v2); 32 float3 res3 = fast::min(in.v3, in.v3); 33 res3 = fast::max(in.v3, in.v3); 34 res3 = fast::clamp(in.v3, in.v3, in.v3); 35 res3 = precise::min(in.v3, in.v3); 36 res3 = precise::max(in.v3, in.v3); 37 res3 = precise::clamp(in.v3, in.v3, in.v3); 38 float4 res4 = fast::min(in.v4, in.v4); 39 res4 = fast::max(in.v4, in.v4); 40 res4 = fast::clamp(in.v4, in.v4, in.v4); 41 res4 = precise::min(in.v4, in.v4); 42 res4 = precise::max(in.v4, in.v4); 43 res4 = precise::clamp(in.v4, in.v4, in.v4); 44 half hres = min(in.h1, in.h1); 45 hres = max(in.h1, in.h1); 46 hres = clamp(in.h1, in.h1, in.h1); 47 hres = min(in.h1, in.h1); 48 hres = max(in.h1, in.h1); 49 hres = clamp(in.h1, in.h1, in.h1); 50 half2 hres2 = min(in.h2, in.h2); 51 hres2 = max(in.h2, in.h2); 52 hres2 = clamp(in.h2, in.h2, in.h2); 53 hres2 = min(in.h2, in.h2); 54 hres2 = max(in.h2, in.h2); 55 hres2 = clamp(in.h2, in.h2, in.h2); 56 half3 hres3 = min(in.h3, in.h3); 57 hres3 = max(in.h3, in.h3); 58 hres3 = clamp(in.h3, in.h3, in.h3); 59 hres3 = min(in.h3, in.h3); 60 hres3 = max(in.h3, in.h3); 61 hres3 = clamp(in.h3, in.h3, in.h3); 62 half4 hres4 = min(in.h4, in.h4); 63 hres4 = max(in.h4, in.h4); 64 hres4 = clamp(in.h4, in.h4, in.h4); 65 hres4 = min(in.h4, in.h4); 66 hres4 = max(in.h4, in.h4); 67 hres4 = clamp(in.h4, in.h4, in.h4); 68} 69 70