| // Copyright 2025 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/enums_core_bench.cc.tmpl | |
| // | |
| // To regenerate run: './tools/run gen' | |
| // | |
| // Do not modify this file directly | |
| //////////////////////////////////////////////////////////////////////////////// | |
| #include <array> | |
| #include "benchmark/benchmark.h" | |
| #include "src/tint/lang/core/enums.h" | |
| namespace tint::core { | |
| namespace { | |
| void AccessParser(::benchmark::State& state) { | |
| const char* kStrings[] = { | |
| "ccad", "3", "rVad", "read", "1ead", | |
| "rqaJ", "rlla77", "reqqdppriHHe", "rv_wcit", "reabGwrte", | |
| "read_write", "read_vriite", "re8d_wriWWe", "Meadxxrite", "wggte", | |
| "VtX", "writ3", "write", "writE", "TTrPte", | |
| "wxxidd", | |
| }; | |
| for (auto _ : state) { | |
| for (auto* str : kStrings) { | |
| auto result = ParseAccess(str); | |
| benchmark::DoNotOptimize(result); | |
| } | |
| } | |
| } // NOLINT(readability/fn_size) | |
| BENCHMARK(AccessParser); | |
| void AddressSpaceParser(::benchmark::State& state) { | |
| const char* kStrings[] = { | |
| "44unction", | |
| "fSSnctioVV", | |
| "Rnc2Rion", | |
| "function", | |
| "uFc9ion", | |
| "funtion", | |
| "ROOuHciVn", | |
| "imyedate", | |
| "l77nnrrediaGe", | |
| "im4edi00te", | |
| "immediate", | |
| "imoodte", | |
| "imzzdiae", | |
| "m11pediiit", | |
| "pixel_lXXcal", | |
| "pixII99l55local", | |
| "pixaal_lSSrHHYl", | |
| "pixel_local", | |
| "iHkklocal", | |
| "jRRxellgal", | |
| "pxel_lobl", | |
| "privaje", | |
| "rivate", | |
| "qvate", | |
| "private", | |
| "priNNte", | |
| "rivtvv", | |
| "QQivate", | |
| "stffar", | |
| "storaje", | |
| "sNNwrag8", | |
| "storage", | |
| "stoage", | |
| "srrorage", | |
| "Gtorage", | |
| "uniforFF", | |
| "nifm", | |
| "unrrorm", | |
| "uniform", | |
| "iform", | |
| "DnfoJJm", | |
| "un8r", | |
| "orkgk1u", | |
| "worgroup", | |
| "Jorkgoup", | |
| "workgroup", | |
| "workgrcup", | |
| "workgroOp", | |
| "worttKK_rouvv", | |
| }; | |
| for (auto _ : state) { | |
| for (auto* str : kStrings) { | |
| auto result = ParseAddressSpace(str); | |
| benchmark::DoNotOptimize(result); | |
| } | |
| } | |
| } // NOLINT(readability/fn_size) | |
| BENCHMARK(AddressSpaceParser); | |
| void AttributeParser(::benchmark::State& state) { | |
| const char* kStrings[] = { | |
| "alxxn", | |
| "__qiF", | |
| "aigqq", | |
| "align", | |
| "33l6gn", | |
| "6QQottgn", | |
| "a6ign", | |
| "bnOizz66", | |
| "bindyyng", | |
| "ZiHHnZ", | |
| "binding", | |
| "4WWndqng", | |
| "bOOding", | |
| "oinYng", | |
| "lend_s", | |
| "blendsrF", | |
| "blendwrc", | |
| "blend_src", | |
| "GedKsrff", | |
| "KKlqnd_src", | |
| "blenmm_s3c", | |
| "uiltin", | |
| "biltiq", | |
| "builtbb", | |
| "builtin", | |
| "biltin", | |
| "buOOltq", | |
| "buiTvvtin", | |
| "coFFor", | |
| "00PfQ", | |
| "coloP", | |
| "color", | |
| "col77s", | |
| "colbbCr", | |
| "colXXr", | |
| "qoCCpuOOe", | |
| "copstL", | |
| "cXmpute", | |
| "compute", | |
| "compte", | |
| "qopOt", | |
| "compu22e", | |
| "dyaXX0szzic", | |
| "diVVgnitiP", | |
| "dagCosnnic", | |
| "diagnostic", | |
| "agnostqqHHA", | |
| "dignostic", | |
| "difgnoKKt", | |
| "frPggge", | |
| "frament", | |
| "TTragN4nc", | |
| "fragment", | |
| "prlgmen77", | |
| "fzaNgent", | |
| "bragmXXut", | |
| "grou", | |
| "88uK", | |
| "gq9p", | |
| "group", | |
| "grou11", | |
| "22oiip", | |
| "ro77p", | |
| "Nd", | |
| "VVd", | |
| "wW11", | |
| "id", | |
| "ww", | |
| "Dd", | |
| "K", | |
| "ifput_11tPPachmhntrindex", | |
| "input_atachment_index", | |
| "inputYYattachment_index", | |
| "input_attachment_index", | |
| "intutVatkkachmenHHindex", | |
| "irrput_attachment_index", | |
| "isput_attachment_inWWex", | |
| "inYerpolat", | |
| "iqterLlfte", | |
| "invver22uflte", | |
| "interpolate", | |
| "intrpolae", | |
| "interpYlae", | |
| "interyoYY77tE", | |
| "Mnoodriat", | |
| "invMMriat", | |
| "invaria55t", | |
| "invariant", | |
| "Nariant", | |
| "invari33n", | |
| "invarian3", | |
| "lmaIion", | |
| "lrcatnKon", | |
| "Xatio", | |
| "location", | |
| "loLLIion", | |
| "lcafin", | |
| "loUYRtDn", | |
| "must_uhe", | |
| "msqusuII", | |
| "must_usH", | |
| "must_use", | |
| "vvQQstue", | |
| "mus_66s", | |
| "m7sO_se", | |
| "055DDe", | |
| "IIiHe", | |
| "sze", | |
| "size", | |
| "sir", | |
| "slze", | |
| "JJGz", | |
| "yerex", | |
| "vrtex", | |
| "veBBItex", | |
| "vertex", | |
| "ver8TTex", | |
| "vYnnUUSddex", | |
| "xCZ5tex", | |
| "workkgroup_sizq", | |
| "wiirkgr005psizp", | |
| "wornngroIIp_size", | |
| "workgroup_size", | |
| "ccrkgroupsize", | |
| "workgrupKKsz", | |
| "workgroup_66ize", | |
| }; | |
| for (auto _ : state) { | |
| for (auto* str : kStrings) { | |
| auto result = ParseAttribute(str); | |
| benchmark::DoNotOptimize(result); | |
| } | |
| } | |
| } // NOLINT(readability/fn_size) | |
| BENCHMARK(AttributeParser); | |
| void BuiltinTypeParser(::benchmark::State& state) { | |
| const char* kStrings[] = { | |
| "__atPmic_copEre_exchaKKge_result_i32", | |
| "_atomic_compare_excxxange_result_i32", | |
| "__aqomic_compare_exchange_result_i32", | |
| "__atomic_compare_exchange_result_i32", | |
| "MM_atomic_yyomparerexchange_resulS_i32", | |
| "__atomuc_compare_exchange_reslt_i3", | |
| "__atomi_compare_exchnS_result_i32", | |
| "__atomic_cFFmpare_exchange_result_u52", | |
| "__at4zmic_compare_exchange_resurrt_u32", | |
| "__atWWic_ompare_exhange_result_u32", | |
| "__atomic_compare_exchange_result_u32", | |
| "__atomic_comZZare_JXxchange_result_C32", | |
| "PP_atomic_compare_exchange_reslt_u32", | |
| "__atomic_compare_exchange_resuct_u32", | |
| "__frexPP_resul6_abstrllct", | |
| "_frexp_result_yybstr99ct", | |
| "__frexpJresult_absKKract", | |
| "__frexp_result_abstract", | |
| "__frexp_reult_abstraxt", | |
| "__fexp_esulK_abstyyat", | |
| "__frexp_resulV_abkzract", | |
| "__fKexp_Sesuqt_f16", | |
| "__frexp_result_f6", | |
| "__rexp_result_fVV6", | |
| "__frexp_result_f16", | |
| "__frexpIresulAU_f16", | |
| "j_frxp_resulRf16", | |
| "_frep44resuYYt_f1", | |
| "__frxp_result_f32", | |
| "__frex11_rxxsul_f2", | |
| "__frccxpmmresulJ_f", | |
| "__frexp_result_f32", | |
| "__freJJ_result_f32", | |
| "_ffDDUxp_resulCClf32", | |
| "__frexp_resultgf32", | |
| "__frep_result_vecCC_absact", | |
| "__frexp_resul_vec2_abstract", | |
| "__fIexp_result_vec2_abstr__ct", | |
| "__frexp_result_vec2_abstract", | |
| "__fexp_result_vN2_aPPstrttct", | |
| "__frexp_rddsult_vec2_abstr3ct", | |
| "__rexp_result_vecK_ayystract", | |
| "__frep_rest_vuuc2_f1", | |
| "nn_fre0i_result_vec2_f13", | |
| "K_frexp_renvlt_vec2uufCC6", | |
| "__frexp_result_vec2_f16", | |
| "__rexp_resultllvec2_X16", | |
| "__frexpppresult_veo2_f16", | |
| "__frepwwresult_vec2_f16", | |
| "uu_fgxp_reslt_vec2mmf32", | |
| "aa_frexpesmmltvec2_f32", | |
| "__TrexRR_result_vecZ_cc32", | |
| "__frexp_result_vec2_f32", | |
| "__frexp_result_vec8T_fO2", | |
| "__frexp_mesult00vec2_f32", | |
| "m_frexp_result_vBBc2_f32", | |
| "__frep_ppesuM_vec3_abstract", | |
| "__fexp_result_vecOO_abstract", | |
| "__frexp_rsult_vec3_aGGGtract", | |
| "__frexp_result_vec3_abstract", | |
| "__frexp_11esult_HHec3_abstract", | |
| "__fre6peeresuFF_vec3_abstract", | |
| "__fexp_result_vec3_abtract", | |
| "__friixp_result_vKc3_f1l", | |
| "__rexp_result_vec3_f16", | |
| "__fexp99reIIult_vec3_fvv6", | |
| "__frexp_result_vec3_f16", | |
| "__frexp_result_vc3_f16", | |
| "__frexp_rhsult_vec3_f16", | |
| "__frexprPllsult_vezz3_f16", | |
| "_frexp_rsult_v3_f32", | |
| "__frexp_reffulqq_vc3_f32", | |
| "_ddreJJp_result_vec3_f32", | |
| "__frexp_result_vec3_f32", | |
| "__feXXp_result_vec_zz32", | |
| "__frexp_result_ve23_32", | |
| "__frexp_result_yyeN3_f32", | |
| "__frexp_result_vec_abtrOct", | |
| "__fEexp_ZesultuveP4_abstract", | |
| "22_frxplresult_veee4ddabstract", | |
| "__frexp_result_vec4_abstract", | |
| "__fexp_resultVVve4_abstrmct", | |
| "__frexp_resut1vec4_abIItract", | |
| "__frexp_result_vec4_abstrabt", | |
| "__frexp_ri7lt_ec4_fz6", | |
| "__frexp_resiilt_veo4_f16", | |
| "_nfexp_resul_vec4_f16", | |
| "__frexp_result_vec4_f16", | |
| "__frexprisult_vec4_f1S", | |
| "__frep_resul22_vec4_f1", | |
| "__Cexp_res7lt_Gec4_f111", | |
| "__fre8ff_result_vec4_f32", | |
| "__frexp_resultve4_f32", | |
| "__frexp_resuJJSS_vec4_f32", | |
| "__frexp_result_vec4_f32", | |
| "__frep9esult_vec4_f32", | |
| "__frexp_JJesulTT_vecbb_f32", | |
| "_frexp_res66lt_vec4_32", | |
| "__m0df_resutuabstrac66", | |
| "__yodf_resWt_abstract", | |
| "_modf_reslt_abstract", | |
| "__modf_result_abstract", | |
| "__modf_result_bstract", | |
| "__modf_result_abstrart", | |
| "__modB_result2abstract", | |
| "__modf_result_BB6", | |
| "__modf_rsuRRt_f16", | |
| "__VVodf_reLLl0_16", | |
| "__modf_result_f16", | |
| "__modKK_OOesut_16", | |
| "__modf_weggult_f6", | |
| "L_modf_respht_f16", | |
| "_mKKdf_reEiultf32", | |
| "_modf_result_f32", | |
| "UU_mdf88result_f2", | |
| "__modf_result_f32", | |
| "__movvrr_result_f32", | |
| "__mowf_mmesult_3", | |
| "__m44df_rsultjf32", | |
| "__modf_result_vXc2_abstract", | |
| "__modf_result_vec2_8bstract", | |
| "__modf_resvvlt_veEE2_abstrct", | |
| "__modf_result_vec2_abstract", | |
| "_modf_res99lt_vec2_zzbstrac", | |
| "__GGQodf_rJJsult_vec2Aabstract", | |
| "__modf_result_vec2_abstrasst", | |
| "__modfPresult_vKc2_f16", | |
| "__mottfresult_vppc_f16", | |
| "__modf_rsult_ec2_f16", | |
| "__modf_result_vec2_f16", | |
| "__moMMf_result_vec2_f16", | |
| "__modf_JJesult_0ec2_f16", | |
| "__odf_resu8Vvec2f16", | |
| "__modfKrggsult_vec2_fhh2", | |
| "__modf_result_vec2_ff2", | |
| "__Qodf_re77ult_vec2_f32", | |
| "__modf_result_vec2_f32", | |
| "__modf_resultYYvc2_f32", | |
| "__mofkresult_vecS_f32", | |
| "__modf_resut_en2_f322", | |
| "__modf_result_vec_abtraFFt", | |
| "_GGmodf_Iesult_vecPP_abstUUact", | |
| "__mofarFsvlt_vec3_EEbstract", | |
| "__modf_result_vec3_abstract", | |
| "__eodf_resuldd_vec3_DDbstrBBt", | |
| "EE_modf_result_v55c3Mccbstrac", | |
| "__mofKKresultvvec3_bsract", | |
| "__modf_resuRt_vec3_f16", | |
| "__moDf_resu9t_vec3f16", | |
| "__modf_result_vc3_f16", | |
| "__modf_result_vec3_f16", | |
| "aa_modf_rsult_Iec3_f1", | |
| "__m77df_result_vec3_f16", | |
| "__modI_result_vec3_f16", | |
| "__modf_result_vec_f32", | |
| "__modf_reult_vec3_f32", | |
| "__modf_rsult_vec3_f2", | |
| "__modf_result_vec3_f32", | |
| "__m33df_reXXulc_vec3_f32", | |
| "__modf_resultveE3_f32", | |
| "__modf_result_vecXXf32", | |
| "__modf_resultxxvBc4_abstract", | |
| "__mWdf_resultvec_abstracG", | |
| "__modf_re66ult_vec4_abstract", | |
| "__modf_result_vec4_abstract", | |
| "TT_modfresult_vec4a0stvact", | |
| "_mof_result_kec4bstract", | |
| "__modf_resultec4_abstrppct", | |
| "__modf_reult11ec4_f16", | |
| "__moEf_resuyt_veJ4_fBB6", | |
| "__xodf_resuqt_vIIc4mf16", | |
| "__modf_result_vec4_f16", | |
| "__modf_rsult_Fec4_f16", | |
| "__modfresult_vec4_f16", | |
| "__DodHH_hesult_vec4_f16", | |
| "__mHfreslt_ve224_f32", | |
| "__mdf_reslt_vec4_f32", | |
| "__modf_rsult_vec4_f32", | |
| "__modf_result_vec4_f32", | |
| "__mdf_result_vec4_f32", | |
| "__modf_result_vec4_fdd2", | |
| "__modf_result_OPc4_f32", | |
| "brrB", | |
| "a00ay", | |
| "hrray", | |
| "array", | |
| "rragY", | |
| "arOay", | |
| "hry", | |
| "EEfpmic", | |
| "aomvc", | |
| "tomzzc", | |
| "atomic", | |
| "atomi", | |
| "OiiJom", | |
| "aGomif", | |
| "biTTding_a22ray", | |
| "bindingldrray", | |
| "bbnding_array", | |
| "binding_array", | |
| "bBBndig_array", | |
| "PPIIndXnS_array", | |
| "binding_arjjay", | |
| "_occl", | |
| "zz6xSl", | |
| "G", | |
| "bool", | |
| "v4ox", | |
| "boAA0", | |
| "yye", | |
| "WWb6", | |
| "MMtt6", | |
| "J", | |
| "f16", | |
| "FHSl", | |
| "f104", | |
| "fVVX", | |
| "oV2", | |
| "f3", | |
| "fK2", | |
| "f32", | |
| "", | |
| "3a", | |
| "O2", | |
| "G", | |
| "i2", | |
| "99R32", | |
| "i32", | |
| "32", | |
| "YYvXR", | |
| "2", | |
| "XX", | |
| "", | |
| "cpp", | |
| "i8", | |
| "iv", | |
| "SEE", | |
| "", | |
| "nput__ttaamet", | |
| "input_wwttacment", | |
| "inpddt_at99achment", | |
| "input_attachment", | |
| "99nPPt_attachent", | |
| "input_attacKKmet", | |
| "npuDDo_attachMent", | |
| "a2Bi", | |
| "mqx2", | |
| "mLL200", | |
| "mat2x2", | |
| "mntvvx66", | |
| "nrrtx2", | |
| "etxxx2", | |
| "mOtNNx2CC", | |
| "ma2x2", | |
| "atebb", | |
| "mat2x2f", | |
| "mat2x2J", | |
| "mtxuf", | |
| "Aat2xESf", | |
| "mat2x0h", | |
| "maaa2x2h", | |
| "maqmmx2", | |
| "mat2x2h", | |
| "mt2x2h", | |
| "mUUx2E", | |
| "mDDtK2h", | |
| "__at2t3", | |
| "Apx3", | |
| "matMx", | |
| "mat2x3", | |
| "maBB2x3", | |
| "99nbbx3", | |
| "AAEEt2x", | |
| "m5662xTf", | |
| "Hat2x3f", | |
| "xxHtx3f", | |
| "mat2x3f", | |
| "mnyt2z3f", | |
| "mt2x3f", | |
| "makH3f", | |
| "mat2ch", | |
| "mrrx3oo", | |
| "mJJx3h", | |
| "mat2x3h", | |
| "CCa203h", | |
| "mAxFx99h", | |
| "matcx3h", | |
| "Sat2x4", | |
| "mBBtox", | |
| "ma2x4", | |
| "mat2x4", | |
| "mmaex4", | |
| "mQPP2ggo", | |
| "aB", | |
| "mlKKN4f", | |
| "marrx4", | |
| "atrpx4f", | |
| "mat2x4f", | |
| "yPat2x4f", | |
| "maZ2cc4", | |
| "t2x4f", | |
| "ma002x4h", | |
| "msst24BJP", | |
| "ffawwxJJh", | |
| "mat2x4h", | |
| "maXXI4h", | |
| "2h", | |
| "ma2x4h", | |
| "mKKt3x", | |
| "m4a3x2", | |
| "pat3o2", | |
| "mat3x2", | |
| "jNtHHxhh", | |
| "mww333EUU", | |
| "muu32", | |
| "Kaddxrrf", | |
| "2tt3PP2r", | |
| "m1twwx2f", | |
| "mat3x2f", | |
| "mat3xc1nn", | |
| "at3x2f", | |
| "ma3x2f", | |
| "6SSaaIx2h", | |
| "matx2EE", | |
| "IcatVR2h", | |
| "mat3x2h", | |
| "m3x9h", | |
| "aaht32h", | |
| "mLtSx2h", | |
| "mmtfx", | |
| "mV3qm", | |
| "__tx3", | |
| "mat3x3", | |
| "mQtx", | |
| "EaddxRR", | |
| "at3x9", | |
| "at3C0", | |
| "t3x3z", | |
| "ccat3x3f", | |
| "mat3x3f", | |
| "at3x3Q_", | |
| "matt3f", | |
| "CCzzt333pEf", | |
| "mat3hhddh", | |
| "66t3x77h", | |
| "mat3xPh", | |
| "mat3x3h", | |
| "matwx3h", | |
| "uux3h", | |
| "6at3XX3h", | |
| "RRx4", | |
| "VVt3", | |
| "GGaHH3x4", | |
| "mat3x4", | |
| "MFFt374", | |
| "mat34", | |
| "ggatx", | |
| "Pa1K3Q4_", | |
| "matx4E", | |
| "maM4f", | |
| "mat3x4f", | |
| "maG77S3xX", | |
| "FFtt3xKf", | |
| "mZZt3Uss4f", | |
| "mat34h", | |
| "mat3x4l", | |
| "mht3x4h", | |
| "mat3x4h", | |
| "mKtTTxk", | |
| "ma3xwwh", | |
| "mt3x4Kjj", | |
| "mtxYY", | |
| "EEIt4c", | |
| "mat4xQQ", | |
| "mat4x2", | |
| "Paxl", | |
| "mtffHx2", | |
| "mat4xn", | |
| "matg26F", | |
| "mhss8x2f", | |
| "llFa4x2f", | |
| "mat4x2f", | |
| "2atjx0f", | |
| "matgx2f", | |
| "mat4xe", | |
| "maff4xh", | |
| "atxh", | |
| "matx2h", | |
| "mat4x2h", | |
| "qqt4x2h", | |
| "AA42h", | |
| "matx2v", | |
| "matjx3", | |
| "mat4ZZ3", | |
| "UPPt4II2", | |
| "mat4x3", | |
| "maZZ4x3", | |
| "mat4xnn", | |
| "ZZakkH223", | |
| "mat43f", | |
| "ma4xR", | |
| "mat4xqq9f", | |
| "mat4x3f", | |
| "mat4773f", | |
| "matx3", | |
| "uut4xccf", | |
| "m1tRR3h", | |
| "mat4llJh", | |
| "MMatI", | |
| "mat4x3h", | |
| "7T6t4x3", | |
| "mat4xQQJ", | |
| "uu4x3h", | |
| "mat4", | |
| "maq33", | |
| "mxxt4x4", | |
| "mat4x4", | |
| "mNrr", | |
| "ma94x4", | |
| "ma4x4", | |
| "alHx4f", | |
| "_ax4f", | |
| "mat44f", | |
| "mat4x4f", | |
| "mt4j4f", | |
| "mmmt4EEttf", | |
| "matxf", | |
| "mrr4x4h", | |
| "maxx4h", | |
| "zzt4x4", | |
| "mat4x4h", | |
| "mat4x4e", | |
| "au4pZ4h", | |
| "muuTT4x00", | |
| "vv", | |
| "ptQ", | |
| "tR", | |
| "ptr", | |
| "p", | |
| "ptMM", | |
| "ptC", | |
| "samQQPPer", | |
| "suDDmplxxr", | |
| "YYlqamdpler", | |
| "sampler", | |
| "amFFle__", | |
| "rrGGNNler", | |
| "samMler", | |
| "samlr_cmparison", | |
| "sampler_comparqxon", | |
| "sampler_comprison", | |
| "sampler_comparison", | |
| "sapler_comparis44n", | |
| "sampler_WWomparGson", | |
| "sampler_compajjson", | |
| "sjjbgroup_matrix_left", | |
| "subgrojp_matrix_l1t", | |
| "subgrop_matrix_left", | |
| "subgroup_matrix_left", | |
| "subg99oup_matrix_left", | |
| "subgroup_mayrix_lVVft", | |
| "subgroup_matiZZ_lext", | |
| "sugr33uvv_matrix_result", | |
| "ssbgroup_9atrix_result", | |
| "suFgroup_matrixresult", | |
| "subgroup_matrix_result", | |
| "ubgroup_matrix_eesuuut", | |
| "sKKbgrou_mItrx_result", | |
| "subgroup_aJrix_result", | |
| "subgroupCCmatrixXXrighSS", | |
| "subZZr66uWW_maJrix_right", | |
| "summgropmadrix_5ight", | |
| "subgroup_matrix_right", | |
| "subUoup_matrBBx_riBBht", | |
| "subgJJoup_mat110x_right", | |
| "subgroup_matrix_rfgttt", | |
| "tttxtre_X", | |
| "teLturew1d", | |
| "textur1_1d", | |
| "texture_1d", | |
| "tewwture_1d", | |
| "texte_ee", | |
| "txture_1d", | |
| "textNNre_2d", | |
| "tex__uleRUU2d", | |
| "texHure_2d", | |
| "texture_2d", | |
| "teCCturr_2d", | |
| "textre_2d", | |
| "textupd_2d", | |
| "exture_2d_array", | |
| "txtNr_Ld_array", | |
| "extre_2dray", | |
| "texture_2d_array", | |
| "tRRxturxx_2d_aqqray", | |
| "textSGre_2d_array", | |
| "text88rcc2d_arra", | |
| "texture_3", | |
| "textte_ppd", | |
| "qqFF0xture553d", | |
| "texture_3d", | |
| "txture_3d", | |
| "textur3d", | |
| "texOre_3d", | |
| "teHHture_cTb", | |
| "66extSSre_cubO", | |
| "texddYure_cuTT", | |
| "texture_cube", | |
| "texureggsube", | |
| "texGGure_cube", | |
| "texllurQQIcube", | |
| "texturecube_array", | |
| "texture_cube_arrray", | |
| "textureyyube_ar7ay", | |
| "texture_cube_array", | |
| "tBBxtur22_cube_arWay", | |
| "textuVe_cubeyyarray", | |
| "texture_ubeara4", | |
| "texture_depth_ddd", | |
| "text2re_depVVhzd", | |
| "teyyture_depth_2d", | |
| "texture_depth_2d", | |
| "texture_dApth__2d", | |
| "texture_dhhpth_2d", | |
| "teture_detvv_2d", | |
| "textur_deph_2d_array", | |
| "textureNNdepth_gdsoorray", | |
| "textur_deptZZ2mm_array", | |
| "texture_depth_2d_array", | |
| "textur3kdeth_2d_rray", | |
| "texture_ReptfA_2_array", | |
| "zzexture_depth_d_rrWay", | |
| "texture_epRRh_cbe", | |
| "textMr88_depth_cubSS", | |
| "txturRPPdeptbb_cube", | |
| "texture_depth_cube", | |
| "textWWre_deptxxcube", | |
| "textvvrAAdepth_cube", | |
| "texjjur44_dXpth_cube", | |
| "textufe_depth_cube_array", | |
| "texture_dOOpthUcube_AAray", | |
| "texuure_depssh_cub_arry", | |
| "texture_depth_cube_array", | |
| "texFFsre_depth_cbbbe_array", | |
| "texture_depth_cubYY_arrann", | |
| "texture_depth_ubss_array", | |
| "tqxturezzdepth_mulisampled_2d", | |
| "textuQQe_deptN_mutisapled_2d", | |
| "texture_pppt_multisamplekk_2d", | |
| "texture_depth_multisampled_2d", | |
| "t8xture_dJpth_multisaLpled_ssd", | |
| "t5xTTJre_depffh_77ultisampled_2d", | |
| "text00re_dxph_multisampled_2d", | |
| "textureAexter1a", | |
| "texture_extrnal", | |
| "texturQQ_externl", | |
| "texture_external", | |
| "teiitreextewnal", | |
| "texture_exterwwal", | |
| "texJYYhre_external", | |
| "textuREe_mkt7sampled_2d", | |
| "textureuumulkisampled_2d", | |
| "textuRemultisatpled_2d", | |
| "texture_multisampled_2d", | |
| "texture_mltNsampleII_2d", | |
| "textuIIe_multisapled_2d", | |
| "texture_multisaiiEled_2", | |
| "texturestoragess1d", | |
| "texuCCe_st55Xage_1d", | |
| "te9ture_storage_1d", | |
| "texture_storage_1d", | |
| "texur_storage_1X", | |
| "txIIurestorage_1d", | |
| "texture_storagz_1d", | |
| "tAAxtur22_zztorae_2d", | |
| "texture_storag_2d", | |
| "texturbb_strageFd", | |
| "texture_storage_2d", | |
| "teVture_stMMrage_2d", | |
| "textuwe_storacmzz_2d", | |
| "textuQQOO_storag2d", | |
| "texture_storage_2d_arbay", | |
| "teCturnn_skkora5e_2d_aray", | |
| "teKtrrre_storage_2d_arryyy", | |
| "texture_storage_2d_array", | |
| "textureTstorageAA2dtaray", | |
| "texure_storage_ZQQ_array", | |
| "teture_storge82d_array", | |
| "teture_stoaage_3d", | |
| "eeextbr_stccrage_3d", | |
| "texLLure_Porage_3d", | |
| "texture_storage_3d", | |
| "tetuWW_sUorage_3d", | |
| "texture_stzzrage_3", | |
| "text__re_soNa_3d", | |
| "a32", | |
| "B", | |
| "z2", | |
| "u32", | |
| "uHbaa", | |
| "4", | |
| "GGm", | |
| "8", | |
| "N88G", | |
| "8", | |
| "u8", | |
| "uAA", | |
| "ubbu", | |
| "jj8", | |
| "Jccxc2", | |
| "Fg", | |
| "veA", | |
| "vec2", | |
| "ccec2", | |
| "BcUU", | |
| "BecAA", | |
| "vex2f", | |
| "veU8", | |
| "vUCc8Bf", | |
| "vec2f", | |
| "vec2__", | |
| "UUec2", | |
| "ve2", | |
| "ec2", | |
| "vkk", | |
| "EEJJe2h", | |
| "vec2h", | |
| "vec2oo", | |
| "zeAXh", | |
| "vTc88", | |
| "ec2J", | |
| "cVt", | |
| "veci", | |
| "vec2i", | |
| "ec2", | |
| "331i", | |
| "uuci", | |
| "4e02u", | |
| "v3ru", | |
| "veYY2g", | |
| "vec2u", | |
| "ve2u", | |
| "rCCcu", | |
| "lecu", | |
| "vZZc3", | |
| "t9qcMM", | |
| "vec", | |
| "vec3", | |
| "veY7g", | |
| "dddd", | |
| "aaecE", | |
| "vecIIf", | |
| "RReZ3ll", | |
| "vecNNkrr", | |
| "vec3f", | |
| "vec", | |
| "vc3f", | |
| "veca", | |
| "HHec3G", | |
| "cc3h", | |
| "vB22nllh", | |
| "vec3h", | |
| "vec35", | |
| "eR3h", | |
| "gec3h", | |
| "ve3i", | |
| "vecpi", | |
| "vecK99i", | |
| "vec3i", | |
| "22Rci", | |
| "vecnn", | |
| "veeENi", | |
| "fHHec3u", | |
| "ss226u", | |
| "em0u", | |
| "vec3u", | |
| "vecNp", | |
| "ve63", | |
| "oZWWV3u", | |
| "HHc", | |
| "vcA", | |
| "cT", | |
| "vec4", | |
| "veWW2", | |
| "vWc4", | |
| "8eZ", | |
| "FeR4", | |
| "vebb4", | |
| "ggce", | |
| "vec4f", | |
| "UeSh", | |
| "vZqNN", | |
| "v9f", | |
| "ccHMMh", | |
| "v4x", | |
| "veXX", | |
| "vec4h", | |
| "4h", | |
| "veh", | |
| "vecgg4h", | |
| "rfe4i", | |
| "ve4i", | |
| "vggc4D", | |
| "vec4i", | |
| "v994Q", | |
| "eeei", | |
| "veci", | |
| "vc4II", | |
| "vequ", | |
| "Ooc77u", | |
| "vec4u", | |
| "vrrDD", | |
| "vecju", | |
| "11ciiFu", | |
| }; | |
| for (auto _ : state) { | |
| for (auto* str : kStrings) { | |
| auto result = ParseBuiltinType(str); | |
| benchmark::DoNotOptimize(result); | |
| } | |
| } | |
| } // NOLINT(readability/fn_size) | |
| BENCHMARK(BuiltinTypeParser); | |
| void BuiltinValueParser(::benchmark::State& state) { | |
| const char* kStrings[] = { | |
| "clip_BjstRRnces", | |
| "AAlip_7ist__ncds", | |
| "ljjp_disancs", | |
| "clip_distances", | |
| "cipoisxxkances", | |
| "clipWdistances", | |
| "clIp_disNQQnc1s", | |
| "fraI_deth", | |
| "fjag_dept", | |
| "7ragep22h", | |
| "frag_depth", | |
| "fKggcdEEllth", | |
| "frag_dept", | |
| "5rag_dth", | |
| "r66t_f88cing", | |
| "foat_fcing", | |
| "frot_facEng", | |
| "front_facing", | |
| "frontqacQg", | |
| "front_fa_ig", | |
| "fNot_arng", | |
| "global_inocation_id", | |
| "global_invocation_eeBBd", | |
| "nngb11l_invocatin_id", | |
| "global_invocation_id", | |
| "globaq_invocatinn_id", | |
| "global_invmmBaccion_iX", | |
| "gttbal_i77vocation_id", | |
| "itstane_idx", | |
| "istanceKindex", | |
| "instanFFjn_inex", | |
| "instance_index", | |
| "stancEE_ndex", | |
| "inLDtvnc_index", | |
| "ih55stanco_Sndex", | |
| "lcal_inuuZcation_id", | |
| "local_in557caPPion_id", | |
| "local_invocatonSikk", | |
| "local_invocation_id", | |
| "local_inEEocaSioF_id", | |
| "lcal_invyycbbtin_id", | |
| "ocal_iJvoationRid", | |
| "o1al_invocation_inTex", | |
| "local_inXoatioTindeX", | |
| "local_invocat00on_idex", | |
| "local_invocation_index", | |
| "locaP_77nvocation_index", | |
| "locl_inpocation_Zndex", | |
| "PPocaw_invocatin_idbbx", | |
| "num_ssbbH8kgrojjps", | |
| "num_workgrouhs", | |
| "numworkxxrop", | |
| "num_workgroups", | |
| "nurQwBrkgroeps", | |
| "num_workJJroups", | |
| "nu_wurkgrwuv", | |
| "psxxttion", | |
| "povi99ion", | |
| "tion", | |
| "position", | |
| "poffnntion", | |
| "posi5ion", | |
| "uJUition", | |
| "sample_ndex", | |
| "sFmplt_index", | |
| "sa1ple_index", | |
| "sample_index", | |
| "samAAle_iDDdex", | |
| "OPple_2nde", | |
| "sampl_index", | |
| "sample77mask", | |
| "samAA1Ue_mask", | |
| "AAaXple_mafk", | |
| "sample_mask", | |
| "sampVvevmas", | |
| "sppmple_mask", | |
| "sample_TTask", | |
| "jjub0kroup_id", | |
| "subgroup_i", | |
| "ubgroyyp_id", | |
| "subgroup_id", | |
| "sYYgroup_izz", | |
| "subgiioup_iW", | |
| "UUu7grop_i6", | |
| "subgrop_UUnvocationpi", | |
| "subgrouh_nvocaiTTn_id", | |
| "subg5oup_invocaion_id", | |
| "subgroup_invocation_id", | |
| "sugro1_nvocation_id", | |
| "subgroup_invocmmtIon44id", | |
| "subgRoYpinvoDDatiYYn_id", | |
| "subjjroup_size", | |
| "subgroup_sie", | |
| "subgroupQQsdz", | |
| "subgroup_size", | |
| "subgr55up_sHe", | |
| "sukgroxFF_size", | |
| "srroup_size", | |
| "vertexKKi_Nex", | |
| "vertex_aTdex", | |
| "vertexvvindex", | |
| "vertex_index", | |
| "ertexjjindex", | |
| "vrtOOx_indenn", | |
| "OeOOex_indegg", | |
| "wworkQQrup_id", | |
| "workgroupJd", | |
| "workgrouD_id", | |
| "workgroup_id", | |
| "workgouOO_id", | |
| "workgoup_id", | |
| "wokgrou0_id", | |
| }; | |
| for (auto _ : state) { | |
| for (auto* str : kStrings) { | |
| auto result = ParseBuiltinValue(str); | |
| benchmark::DoNotOptimize(result); | |
| } | |
| } | |
| } // NOLINT(readability/fn_size) | |
| BENCHMARK(BuiltinValueParser); | |
| void InterpolationSamplingParser(::benchmark::State& state) { | |
| const char* kStrings[] = { | |
| "cqle", "cenuer", "cen33er", "center", "cNNter", "ntMr", "cenR22b", | |
| "ceiitoid", "cetroid", "ceCriou", "centroid", "JHHnrid", "cntrggyh", "cWWtroiB", | |
| "itEcceEE", "eieehyy", "U44ter", "either", "eithe", "eitheN", "MMithess", | |
| "fiDsC", "YTgrst", "firjjt", "first", "frDD", "fEEM99t", "Nrst", | |
| "55ample", "Qample", "nnmple", "sample", "samWFe", "sa66plw", "svFple", | |
| }; | |
| for (auto _ : state) { | |
| for (auto* str : kStrings) { | |
| auto result = ParseInterpolationSampling(str); | |
| benchmark::DoNotOptimize(result); | |
| } | |
| } | |
| } // NOLINT(readability/fn_size) | |
| BENCHMARK(InterpolationSamplingParser); | |
| void InterpolationTypeParser(::benchmark::State& state) { | |
| const char* kStrings[] = { | |
| "fWt", "at", "5", "flat", "f4at", | |
| "gnnP", "USS", "2inVar", "lpnear", "liXV9992", | |
| "linear", "nna", "sar", "8BBna", "perspeyCCAive", | |
| "pervveitBe", "ers44QQAtive", "perspective", "perpecTiZ44e", "perspecXive", | |
| "dderpective", | |
| }; | |
| for (auto _ : state) { | |
| for (auto* str : kStrings) { | |
| auto result = ParseInterpolationType(str); | |
| benchmark::DoNotOptimize(result); | |
| } | |
| } | |
| } // NOLINT(readability/fn_size) | |
| BENCHMARK(InterpolationTypeParser); | |
| void TexelFormatParser(::benchmark::State& state) { | |
| const char* kStrings[] = { | |
| "bga8uddr", "gra8udir1", "vgaGGunor", | |
| "bgra8unorm", "jjgraunrm", "bgra8wnorm", | |
| "bgXa8nnorm", "r1jEflot", "1zflot", | |
| "r162loWWt", "r16float", "r6float", | |
| "r1Vloat", "l16f4znat", "__1Yst", | |
| "rMk6sint", "D1zzsint", "r16sint", | |
| "r16dnq", "r16sit", "r1MMsinl", | |
| "r16nt", "r16n9", "rn6uVVt", | |
| "r16uint", "K6uit", "CC6uiBB", | |
| "r1oint", "EE3f88occww", "r2fbboat", | |
| "r326loat", "r32float", "K3ggoa", | |
| "r32fE1at", "r32floa", "rpH2int", | |
| "raa2sinqq", "r32sn", "r32sint", | |
| "rxxxxXsi_", "r32SSzznt", "r32int", | |
| "32ont", "r32nt", "rK2ut", | |
| "r32uint", "rczuint", "3gg88ant", | |
| "r3jjsint", "1AAiint", "r8sin66V", | |
| "rsi", "r8sint", "mhGtint", | |
| "rjiyynt", "QQ_8sivt", "rLnorm", | |
| "r8nWccm", "r8snFm", "r8snorm", | |
| "rzzsyyor", "8snoo", "r8snI_c", | |
| "rddint", "l8uMt", "r8Oint", | |
| "r8uint", "rmTTK6nt", "8RRi", | |
| "8400", "rnnoqq", "r8BBnorm", | |
| "rWB22aorm", "r8unorm", "rjjunorm", | |
| "66torHH", "r8JJnm", "rtt1Sb10uflooot", | |
| "r__11brulSSat", "rg1WWb10ufloat", "rg11b10ufloat", | |
| "rg11b10uflokt", "r1A10uflotbbt", "rg11b_0ufl1a", | |
| "g16flffN", "rg6iiloVk", "rU16float", | |
| "rg16float", "Ig16fnat", "rg144floLL8t", | |
| "rgZZ6float", "rg16sMMnt", "rg16int", | |
| "MMg166ASSt", "rg16sint", "TTx16sggGG", | |
| "rg1Isint", "rg16silt", "rgOO6ui", | |
| "516uina", "rg__6uzzR", "rg16uint", | |
| "Pg16uLLnt", "r16uihht", "rg16unt", | |
| "rj32oat", "rgB2f0a", "rLLgxxlat", | |
| "rg32float", "rg3MMfloIIt", "rXg2FFoat", | |
| "gp2zzssoat", "rrg32ZZFnt", "rg2si00jt", | |
| "rgr2pwwnt", "rg32sint", "g3QQZnt", | |
| "g3__nint", "rg3sint", "rg3uint", | |
| "rg2inC", "r33GGuint", "rg32uint", | |
| "iigll2u2nt", "rg32uvvncc", "rP32vinj", | |
| "Ngisip", "rg8s2t", "rg8qJnD", | |
| "rg8sint", "g8siQm", "r8sinJ", | |
| "r8sinWW", "rQQ8wnwgrm", "rg8snorz", | |
| "rgWWnorzz", "rg8snorm", "rg8om", | |
| "rK99sqqUUr", "RRgEEsnrm", "rg8ut", | |
| "rg8tint", "rgMMqt", "rg8uint", | |
| "KKT8uiBaat", "ll8uiII5", "rgBBoowt", | |
| "rg8__PPorm", "rRR8unorm", "rgSnm", | |
| "rg8unorm", "roQm", "gunHH8rm", | |
| "rg8YYnDrm", "rgb10a2uOnt", "JgbIIZa2ui8t", | |
| "rgb1oa2Yint", "rgb10a2uint", "rgb100X2int", | |
| "KcgbS02nnint", "rg8810a2u33GR", "r33b1XXa2unorqq", | |
| "r4b102unozz", "rgWt10a2uWhorm", "rgb10a2unorm", | |
| "xgb10aurorm", "eegC1Qa2unom", "rgb10r2unYm", | |
| "rgbmxS6float", "rgb16float", "rgb1yyfloat", | |
| "rgba16float", "r8a18floa", "reba16float", | |
| "rgbkk1fhhoat", "rgBB16siOOt", "gba99sint", | |
| "gba16sgDnt", "rgba16sint", "rgba11niat", | |
| "qIS16si6t", "rgba16snYY", "rbaL0uYYVVt", | |
| "m6Ibss162int", "rbajj6uint", "rgba16uint", | |
| "rgp7a1it", "rgNa16ui6t", "rgbagg6uinss", | |
| "rgba32flat", "qgbaJ2floaOO", "rg00a32floaMM", | |
| "rgba32float", "rMMba32flommt", "rgba2floHqt", | |
| "r88ba32fGat", "rgbww32siRR", "qgba32sint", | |
| "rUa2int", "rgba32sint", "MQgbaB2snt", | |
| "rgba332sint", "rg33a3Osint", "ga32uiwt", | |
| "rMbaAbuikkt", "rgba32uit", "rgba32uint", | |
| "gd32uit", "rgba3IuXXnw55", "rgb32uint", | |
| "rga8sit", "rgda8JJn", "rg_a81it", | |
| "rgba8sint", "rba8LLt", "99gaGGsnt", | |
| "rgaxxUsin", "rgba8sor9", "rgba8svorm", | |
| "rgb228snoLLm", "rgba8snorm", "rgba81frb", | |
| "rgba8sngAA", "rbaUCom", "rnbw8uizzt", | |
| "rgba8niwVVMM", "rga8uXNNt", "rgba8uint", | |
| "r77Wba8inee", "rv33PRa8uint", "rgbjj822int", | |
| "cgAA8unorm", "NgbakkuRRor", "rgba8unorQQ", | |
| "rgba8unorm", "rgbuuunorm", "rbaunuurm", | |
| "gbaZnorm", | |
| }; | |
| for (auto _ : state) { | |
| for (auto* str : kStrings) { | |
| auto result = ParseTexelFormat(str); | |
| benchmark::DoNotOptimize(result); | |
| } | |
| } | |
| } // NOLINT(readability/fn_size) | |
| BENCHMARK(TexelFormatParser); | |
| } // namespace | |
| } // namespace tint::core |