| {{- /* | |
| -------------------------------------------------------------------------------- | |
| Template file for use with tools/src/cmd/gen to generate enums_core_bench.cc | |
| To update the generated file, run: | |
| ./tools/run gen | |
| See: | |
| * tools/src/cmd/gen for structures used by this template | |
| * https://golang.org/pkg/text/template/ for documentation on the template syntax | |
| -------------------------------------------------------------------------------- | |
| */ -}} | |
| {{- $I := LoadIntrinsics "src/tint/lang/core/core.def" -}} | |
| {{- Import "src/tint/utils/templates/enums.tmpl.inc" -}} | |
| {{- Eval "OverrideEnumName" "Enum" ($I.Sem.Enum "builtin_type") "Name" "BuiltinType" -}} | |
| // clang-format off | |
| #include <array> | |
| #include "benchmark/benchmark.h" | |
| #include "src/tint/lang/core/enums.h" | |
| namespace tint::core { | |
| namespace { | |
| {{ Eval "BenchmarkParseEnum" ($I.Sem.Enum "access") }} | |
| {{ Eval "BenchmarkParseEnum" ($I.Sem.Enum "address_space") }} | |
| {{ Eval "BenchmarkParseEnum" ($I.Sem.Enum "attribute") }} | |
| {{ Eval "BenchmarkParseEnum" ($I.Sem.Enum "builtin_type") }} | |
| {{ Eval "BenchmarkParseEnum" ($I.Sem.Enum "builtin_value") }} | |
| {{ Eval "BenchmarkParseEnum" ($I.Sem.Enum "interpolation_sampling") }} | |
| {{ Eval "BenchmarkParseEnum" ($I.Sem.Enum "interpolation_type") }} | |
| {{ Eval "BenchmarkParseEnum" ($I.Sem.Enum "texel_format") }} | |
| } // namespace | |
| } // namespace tint::core | |
| // clang-format on |