# create an enum for any run-time determination of the ISA, we
# reuse the same name as the namespaces
code('enum class Arch {')
- for i,isa in enumerate(isas):
- if i + 1 == len(isas):
- code(' $0 = $1', namespace(isa), define(isa))
- else:
- code(' $0 = $1,', namespace(isa), define(isa))
+ for isa in isas:
+ code(' $0 = $1,', namespace(isa), define(isa))
code('};')
code('''
# create an enum for any run-time determination of the ISA, we
# reuse the same name as the namespaces
code('enum class GPUArch {')
- for i,isa in enumerate(isas):
- if i + 1 == len(isas):
- code(' $0 = $1', namespace(isa), define(isa))
- else:
- code(' $0 = $1,', namespace(isa), define(isa))
+ for isa in isas:
+ code(' $0 = $1,', namespace(isa), define(isa))
code('};')
code('''