blob: 0a4048c5e12f2b5b8f2ded49b8078afb75525c82 [file] [log] [blame]
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// src/tint/ast/builtin_value_bench.cc.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
#include "src/tint/ast/builtin_value.h"
#include <array>
#include "benchmark/benchmark.h"
namespace tint::ast {
namespace {
void BuiltinValueParser(::benchmark::State& state) {
std::array kStrings{
"pccsitin",
"oiti3",
"positVon",
"position",
"1osition",
"osJtqqon",
"llos77tion",
"vrtHHppx_index",
"vertx_icx",
"veGtex_bnde",
"vertex_index",
"vertex_inveii",
"veWWtex_ind8x",
"vxxrtMx_indx",
"isXance_indegg",
"insanc_iXVex",
"instance_in3ex",
"instance_index",
"instancE_index",
"nsTTance_PPndex",
"nstancxx_indddx",
"44ront_facing",
"fSSont_facinVV",
"fronR_Racing",
"front_facing",
"ron9_faciFg",
"front_facin",
"fVonRR_HaOing",
"fyag_epth",
"f77ag_nnellrrh",
"fra400depth",
"frag_depth",
"fa_epooh",
"frg_ezzth",
"f11a_eppiih",
"local_invXXcation_id",
"lIIcal_i5599ocation_inn",
"HHrrcal_inSSocation_Yaa",
"local_invocation_id",
"lokkal_invocatini",
"jocal_invocRRongid",
"local_inocatbon_i",
"local_injocation_index",
"local_invocatio_index",
"locl_invocqtion_ndex",
"local_invocation_index",
"localNNinvocaton_index",
"local_invocatin_ivvdx",
"locl_invocatioQQ_index",
"globalrnvocaton_iff",
"global_invocation_jd",
"NNlbal_wwnvocation82d",
"global_invocation_id",
"global_invocationid",
"globalrrinvocation_id",
"globaG_invocation_id",
"workgroupFFid",
"worgrupid",
"workgroup_rr",
"workgroup_id",
"workgrouid",
"DokgXoJJp_id",
"8orgrup_i",
"num_wkkr11up",
"numworkgroups",
"Ju_workgroups",
"num_workgroups",
"num_corkgroups",
"num_woOkgroups",
"num_workKK__vvttps",
"smple5inxxe8",
"s__mle_qFdex",
"saqqple_idex",
"sample_index",
"saOpe_33nde66",
"s6oople_indttQx",
"sam66le_inex",
"samxe66masOz",
"yyample_mask",
"amplZZHask",
"sample_mask",
"WWaple_maq4k",
"samplOO_ask",
"sYohpe_msk",
};
for (auto _ : state) {
for (auto& str : kStrings) {
auto result = ParseBuiltinValue(str);
benchmark::DoNotOptimize(result);
}
}
}
BENCHMARK(BuiltinValueParser);
} // namespace
} // namespace tint::ast