Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 1 | {{- /* |
| 2 | -------------------------------------------------------------------------------- |
dan sinclair | ff7cf21 | 2022-10-03 14:05:23 +0000 | [diff] [blame] | 3 | Template file for use with tools/src/cmd/gen to generate address_space_bench.cc |
Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 4 | |
| 5 | To update the generated file, run: |
| 6 | ./tools/run gen |
| 7 | |
| 8 | See: |
| 9 | * tools/src/cmd/gen for structures used by this template |
| 10 | * https://golang.org/pkg/text/template/ for documentation on the template syntax |
| 11 | -------------------------------------------------------------------------------- |
| 12 | */ -}} |
| 13 | |
| 14 | {{- Import "src/tint/templates/enums.tmpl.inc" -}} |
dan sinclair | ff7cf21 | 2022-10-03 14:05:23 +0000 | [diff] [blame] | 15 | {{- $enum := (Sem.Enum "address_space") -}} |
Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 16 | |
dan sinclair | 2a65163 | 2023-02-19 04:03:55 +0000 | [diff] [blame] | 17 | #include "src/tint/builtin/address_space.h" |
Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 18 | |
| 19 | #include <array> |
| 20 | |
| 21 | #include "benchmark/benchmark.h" |
| 22 | |
dan sinclair | 2a65163 | 2023-02-19 04:03:55 +0000 | [diff] [blame] | 23 | namespace tint::builtin { |
Ben Clayton | a123b89 | 2022-07-27 16:36:35 +0000 | [diff] [blame] | 24 | namespace { |
| 25 | |
| 26 | {{ Eval "BenchmarkParseEnum" $enum }} |
| 27 | |
| 28 | } // namespace |
dan sinclair | 2a65163 | 2023-02-19 04:03:55 +0000 | [diff] [blame] | 29 | } // namespace tint::builtin |