mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-05 11:45:54 +00:00
Emit unit tests for parsing and printing. Emit benchmarks for parsing. Uses intrinsics.def as a single-source-of-truth. The generators provide a way to optimize the enum parsers. Change-Id: I7f13128f510b2156c2ef724c89df7bb85dae17ed Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97151 Commit-Queue: Ben Clayton <bclayton@chromium.org> Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
27 lines
694 B
Cheetah
27 lines
694 B
Cheetah
{{- /*
|
|
--------------------------------------------------------------------------------
|
|
Template file for use with tools/src/cmd/gen to generate extension_bench.cc
|
|
|
|
See:
|
|
* tools/src/cmd/gen for structures used by this template
|
|
* https://golang.org/pkg/text/template/ for documentation on the template syntax
|
|
--------------------------------------------------------------------------------
|
|
*/ -}}
|
|
|
|
{{- Import "src/tint/templates/enums.tmpl.inc" -}}
|
|
{{- $enum := (Sem.Enum "extension") -}}
|
|
|
|
#include "src/tint/ast/extension.h"
|
|
|
|
#include <array>
|
|
|
|
#include "benchmark/benchmark.h"
|
|
|
|
namespace tint::ast {
|
|
namespace {
|
|
|
|
{{ Eval "BenchmarkParseEnum" $enum }}
|
|
|
|
} // namespace
|
|
} // namespace tint::ast
|