<% continue %>
%endif
- struct ${input_types[j]}_vec src${j} = {
+ const struct ${input_types[j]}_vec src${j} = {
% for k in range(op.input_sizes[j]):
% if input_types[j] == "bool32":
_src[${j}].u32[${k}] != 0,
## Avoid unused variable warnings
<% continue %>
% elif input_types[j] == "bool32":
- bool src${j} = _src[${j}].u32[_i] != 0;
+ const bool src${j} = _src[${j}].u32[_i] != 0;
% else:
- ${input_types[j]}_t src${j} =
+ const ${input_types[j]}_t src${j} =
_src[${j}].${get_const_field(input_types[j])}[_i];
% endif
% endfor
## writes to dst, just include const_expr directly.
% if "dst" in op.const_expr:
${output_type}_t dst;
+
${op.const_expr}
% else:
${output_type}_t dst = ${op.const_expr};
{
switch (op) {
% for name in sorted(opcodes.iterkeys()):
- case nir_op_${name}: {
+ case nir_op_${name}:
return evaluate_${name}(num_components, bit_width, src);
- break;
- }
% endfor
default:
unreachable("shouldn't get here");