Skip to content

Commit

Permalink
Fix extra offset removal
Browse files Browse the repository at this point in the history
  • Loading branch information
davschneller committed Dec 18, 2024
1 parent e227f39 commit 1d939a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tensorforge/generators/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ def _generate_base_params_list(self, symbol_list, with_types=True, with_defaults
const_modifier = 'const ' if symbol.obj.direction == DataFlowDirection.SOURCE else ''
batch_type = f'{const_modifier}{datatype}{ptr_type}' if with_types else ''
offset_type = 'unsigned' if with_types else ''
params.extend([f'{batch_type} {symbol.name}',
f'{offset_type} {get_extra_offset_name(symbol)}'])
params.extend([f'{batch_type} {symbol.name}'])
if symbol.obj.addressing == Addressing.PTR_BASED:
params.extend([f'{offset_type} {get_extra_offset_name(symbol)}'])

batch_size_type = 'size_t' if with_types else ''
params.append(f'{batch_size_type} {GeneralLexicon.NUM_ELEMENTS}')
Expand Down

0 comments on commit 1d939a0

Please sign in to comment.