blob: 296c04467ca1595fb6e73ea95d13bf3333845267 [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/cmd/bench/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[] = {
"clip_distacecc",
"c_disla3ces",
"cliV_distances",
"clip_distances",
"clip1distances",
"cqqiJ_distanes",
"clip_dllstance77",
"frqqgppepHHh",
"fv_dcpt",
"frabGdeth",
"frag_depth",
"frag_veiith",
"fr8g_depWWh",
"Mragxxepth",
"ggroXtfacing",
"Vot_fuciXg",
"front_fac3ng",
"front_facing",
"front_fEcing",
"fronPPfaTTing",
"ddroxxtfacing",
"global_invocatio44_id",
"global_invocaSSioVV_id",
"22loRal_invoRtion_id",
"global_invocation_id",
"globalFinvoction_id",
"gloal_invocation_id",
"RRlHOOaV_invoction_id",
"instance_ydex",
"instGlr77cnn_index",
"instan04e_index",
"instance_index",
"insacoo_inex",
"izstane_index",
"nippance_in11ex",
"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",
"num_workgffus",
"num_workgroujs",
"num_wrkgNNwoup8",
"num_workgroups",
"numworkgroups",
"num_workrrroups",
"num_worGgroups",
"pFFsition",
"pEiio",
"prrsitio",
"position",
"sition",
"poJJDtin",
"poi8i",
"smpke11nde",
"samle_index",
"saple_Jndex",
"sample_index",
"cample_index",
"sample_indOx",
"savvKKl___inttex",
"sam8le_xx5k",
"sampqq__msk",
"sampleqmask",
"sample_mask",
"33amOe_mas66",
"samoott6QQmask",
"66mple_mask",
"subxo66p_iOz",
"yyubgroup_id",
"ubgrZZH_id",
"subgroup_id",
"WWugroup_q4d",
"subgrOOu_id",
"sYohgoupid",
"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