+% if src_t == 'float' and dst_t == 'float' and dst_bits == 16:
+ switch(rnd) {
+% for rnd_t in [('rtne', '_rtne'), ('rtz', '_rtz'), ('undef', '')]:
+ case nir_rounding_mode_${rnd_t[0]}:
+ return ${'nir_op_{0}2{1}{2}{3}'.format(src_t[0], dst_t[0],
+ dst_bits, rnd_t[1])};
+% endfor
+ default:
+ unreachable("Invalid 16-bit nir rounding mode");
+ }
+% else:
+ assert(rnd == nir_rounding_mode_undef);