blob: 07fbc2ebf6127af4ac0e63f5a14ab3bf3b820c23 [file] [log] [blame]
// Copyright 2022 The Dawn & Tint Authors
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// 1. Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// 2. Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// 3. Neither the name of the copyright holder nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
////////////////////////////////////////////////////////////////////////////////
// File generated by 'tools/src/cmd/gen' using the template:
// src/tint/lang/core/builtin_value_bench.cc.tmpl
//
// To regenerate run: './tools/run gen'
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
#include "src/tint/lang/core/builtin_value.h"
#include <array>
#include "benchmark/benchmark.h"
namespace tint::core {
namespace {
void BuiltinValueParser(::benchmark::State& state) {
const char* kStrings[] = {
"_ccpoint_siz",
"_3poi_ile",
"__poiVt_size",
"__point_size",
"1_point_size",
"__pointJsqze",
"__lloint_siz77",
"clppp_disqHHancs",
"cli_dvsnces",
"cip_diGtances",
"clip_distances",
"clvp_distaniies",
"8lip_disWWances",
"clixx_disances",
"fXag_detgg",
"fag_XuVh",
"frag_dept3",
"frag_depth",
"frag_deptE",
"TTrag_dePPt",
"fragddxxpth",
"44ront_facing",
"fSSont_facinVV",
"fronR_Racing",
"front_facing",
"ron9_faciFg",
"front_facin",
"fVonRR_HaOing",
"global_iyvocatin_id",
"globrrlln_invocation_G77",
"glob00l_invocati4n_id",
"global_invocation_id",
"gloa_invocatinooid",
"globl_nvocationzzid",
"loal_piinvocat11on_id",
"instance_indXXx",
"55nstan99enIIindex",
"iHHstancSS_aanrrYx",
"instance_index",
"inskkaHce_dx",
"insRRanceijge",
"instance_inb",
"ljcal_invocation_id",
"local_invocaton_id",
"local_inqocain_id",
"local_invocation_id",
"local_invNNation_id",
"loalvvinvoction_id",
"ocal_invocatioQQ_id",
"rcal_invffcaton_index",
"lojal_invocation_index",
"lcNNwl_in2ocat8on_index",
"local_invocation_index",
"local_invcation_index",
"local_rrnvocation_index",
"local_invocatGon_index",
"num_workgroupFF",
"nEm_ogroups",
"numwrrrkgroups",
"num_workgroups",
"um_workgrops",
"DX_worJJgroups",
"nu8_orkgrop",
"ps11tk",
"positio",
"poitJon",
"position",
"posicion",
"positiOn",
"positiKK_vtt",
"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",
"subgroup_vocaton_id",
"subgroup_invocatoF_id",
"subgroup_invocwtion_i",
"subgroup_invocation_id",
"suKrffupGinvocation_d",
"subgroup_KKnvqcation_id",
"subgroup_inmmo3ation_iF",
"subgroup_ize",
"subgroup_izq",
"sbgroup_bbize",
"subgroup_size",
"sbiiroup_siz",
"sbgroqOp_size",
"TTubgroup_sivve",
"vertFFx_index",
"vertePfnQ00x",
"vePtex_index",
"vertex_index",
"vesstexinde77",
"vertex_indbbRC",
"vertex_indeXX",
"workgOOup_qOCC",
"wrkgrous_iL",
"workgroup_iX",
"workgroup_id",
"workgoup_id",
"orgrqqO_id",
"workg22oup_id",
};
for (auto _ : state) {
for (auto* str : kStrings) {
auto result = ParseBuiltinValue(str);
benchmark::DoNotOptimize(result);
}
}
} // NOLINT(readability/fn_size)
BENCHMARK(BuiltinValueParser);
} // namespace
} // namespace tint::core