1short cast_int_to_short(int x) { 2 return short(x); 3} 4short2 cast_int2_to_short2(int2 x) { 5 return short2(x); 6} 7int cast_float_to_int(float x) { 8 return int(x); 9} 10int3 cast_float3_to_int3(float3 x) { 11 return int3(x); 12} 13short negate_short(short x) { 14 return -x; 15} 16int4 negate_int4(int4 x) { 17 return -x; 18} 19void main() { 20 cast_int_to_short(99999); 21 cast_int2_to_short2(int2(12345, 67890)); 22 cast_float_to_int(5000000000.0); 23 cast_float3_to_int3(float3(3000000000, 2000000, 1000)); 24 negate_short(-32768); 25 negate_int4(int4(-2147483648)); 26} 27 28