blob: b3e410e591686133367b5360f3864abb8f116ce4 [file] [log] [blame]
Ben Claytonf50d56a2022-07-27 18:32:19 +00001// Copyright 2022 The Tint Authors.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15////////////////////////////////////////////////////////////////////////////////
16// File generated by tools/src/cmd/gen
17// using the template:
dan sinclaire4039c72023-02-17 21:58:59 +000018// src/tint/builtin/extension_bench.cc.tmpl
Ben Claytonf50d56a2022-07-27 18:32:19 +000019//
20// Do not modify this file directly
21////////////////////////////////////////////////////////////////////////////////
22
dan sinclaire4039c72023-02-17 21:58:59 +000023#include "src/tint/builtin/extension.h"
Ben Claytonf50d56a2022-07-27 18:32:19 +000024
25#include <array>
26
27#include "benchmark/benchmark.h"
28
dan sinclaire4039c72023-02-17 21:58:59 +000029namespace tint::builtin {
Ben Claytonf50d56a2022-07-27 18:32:19 +000030namespace {
31
32void ExtensionParser(::benchmark::State& state) {
Ben Claytoned3389f2023-02-09 23:56:42 +000033 const char* kStrings[] = {
Ben Claytondb368f12022-10-11 18:26:18 +000034 "chromium_disableuniformiccy_analysis",
35 "chromil3_disable_unifority_analss",
36 "chromium_disable_Vniformity_analysis",
37 "chromium_disable_uniformity_analysis",
38 "chromium_dis1ble_uniformity_analysis",
39 "chromium_qqisable_unifomity_anaJysis",
40 "chrollium_disable_uniformity_analysi77",
Ben Claytonf50d56a2022-07-27 18:32:19 +000041 "chromippHm_experqqmetal_dp4a",
42 "chrmium_expecimntal_dp4",
43 "chrmiumGexpebimental_dp4a",
44 "chromium_experimental_dp4a",
45 "chromium_exverimentiil_dp4a",
46 "chro8ium_experimenWWal_dp4a",
47 "chromiMm_eperimxxntal_dp4a",
Ben Clayton94706ec2022-11-30 19:13:29 +000048 "chromium_expeggimeXtal_full_ptr_paraeters",
49 "chromium_expVrimental_full_ptr_puraXeer",
50 "chromium_experimental_full_ptr3parameters",
51 "chromium_experimental_full_ptr_parameters",
52 "chromium_experimentalEfull_ptr_parameters",
53 "chromium_experimentalfull_ptr_PPaTTameters",
54 "chromium_ddxperimental_fullptrxxparameters",
55 "c44romium_experimental_push_constant",
56 "chromium_experimental_pSSsVV_constant",
57 "chrom22Rm_experimental_pushRonstant",
dan sinclair4abf28e2022-08-02 15:55:35 +000058 "chromium_experimental_push_constant",
Ben Clayton94706ec2022-11-30 19:13:29 +000059 "chromium_exp9rimFntal_ush_constant",
60 "chrmium_experimental_push_constant",
61 "cOOromium_experiVeHtal_puh_conRRtant",
James Price0b3400c2023-02-27 18:39:20 +000062 "chromium_internl_relaxyd_uniform_layout",
63 "chromnnum_internrr77_Gelaxell_uniform_layout",
64 "chromium_intern4l_relaxe00_uniform_layout",
65 "chromium_internal_relaxed_uniform_layout",
66 "chrmoom_internal_relaxed_uniform_lyout",
67 "chroium_internal_rlaxed_uniform_layzzut",
68 "chromium_internaii_r11axed_uppifor_layout",
69 "f1XX",
70 "55199II",
71 "frSSHHa",
Ben Claytondb368f12022-10-11 18:26:18 +000072 "f16",
James Price0b3400c2023-02-27 18:39:20 +000073 "U",
74 "jV3",
75 "",
Ben Claytonf50d56a2022-07-27 18:32:19 +000076 };
77 for (auto _ : state) {
Ben Claytoned3389f2023-02-09 23:56:42 +000078 for (auto* str : kStrings) {
Ben Claytonf50d56a2022-07-27 18:32:19 +000079 auto result = ParseExtension(str);
80 benchmark::DoNotOptimize(result);
81 }
82 }
83}
84
85BENCHMARK(ExtensionParser);
86
87} // namespace
dan sinclaire4039c72023-02-17 21:58:59 +000088} // namespace tint::builtin