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