| // 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 |
| //////////////////////////////////////////////////////////////////////////////// |
| |
| // clang-format off |
| |
| #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", |
| "subgoup_syze", |
| "ubgroup_size", |
| "subIIroupBBsize", |
| "subgroup_size", |
| "su8gTToup_s33ze", |
| "dnnUUbgrouSSY_size", |
| "xCu5groupZsize", |
| "vqkrtex", |
| "5iirp00", |
| "vnnrIIex", |
| "vertex", |
| "cceKe", |
| "vrKK", |
| "ve66tex", |
| "wKKkgroEp_PPiz", |
| "xorkgroup_size", |
| "workgroqp_size", |
| "workgroup_size", |
| "rorkgroupyMMSize", |
| "wrgroup_uize", |
| "wrkgrouSsie", |
| }; |
| 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[] = { |
| "__atomic_cFFmpare_exchange_result_i52", |
| "__at4zmic_compare_exchange_resurrt_i32", |
| "__atWWic_ompare_exhange_result_i32", |
| "__atomic_compare_exchange_result_i32", |
| "__atomic_comZZare_JXxchange_result_C32", |
| "PP_atomic_compare_exchange_reslt_i32", |
| "__atomic_compare_exchange_resuct_i32", |
| "__a6llmic_comparePPexchange_result_u32", |
| "__a99omic_compare_xchanyye_result_u32", |
| "__atoKKic_compare_exchange_result_u32", |
| "__atomic_compare_exchange_result_u32", |
| "__atomic_xompareexchange__esult_u32", |
| "__atomi_compare_exhanyy_result_uK2", |
| "__atomic_compare_zxchangeVresukt_u32", |
| "__freqp_rKsult_abstract", |
| "__rexp_result_abstract", |
| "__frexpresult_abstrVVct", |
| "__frexp_result_abstract", |
| "__frAAUp_resIlt_abstract", |
| "jfrexp_result_astrabt", |
| "__44YYxp_resultabstrat", |
| "__frxp_result_f16", |
| "__frex11_rxxsul_f6", |
| "__frccxpmmresulJ_f", |
| "__frexp_result_f16", |
| "__freJJ_result_f16", |
| "_ffDDUxp_resulCClf16", |
| "__frexp_resultgf16", |
| "_frexp_rult_CC32", |
| "_frexp_result_f32", |
| "__freIp_res__lt_f32", |
| "__frexp_result_f32", |
| "__frttp_PPsult_f32", |
| "__frexp_resul3d_f32", |
| "_frexp_Kesultyyf32", |
| "__rexp_resultvec2_abstacu", |
| "__frexi_re3ult_venn2_abs0ract", |
| "__frexpKrenultuuvecCC_vbstract", |
| "__frexp_result_vec2_abstract", |
| "__frllxp_Xesult_ec2_abstract", |
| "__frexp_result_vec2_aostrppct", |
| "ww_frexp_result_vec2_abstrat", |
| "uu_fgxp_reslt_vec2mmf16", |
| "aa_frexpesmmltvec2_f16", |
| "__TrexRR_result_vecZ_cc16", |
| "__frexp_result_vec2_f16", |
| "__frexp_result_vec8T_fO6", |
| "__frexp_mesult00vec2_f16", |
| "m_frexp_result_vBBc2_f16", |
| "__frex_ppeslt_vecM_f32", |
| "__fexp_result_vOOc2_f32", |
| "__GGrexp_reult_Gec2_f32", |
| "__frexp_result_vec2_f32", |
| "__frex11_resulHH_vec2_f32", |
| "_eere6p_resulFF_vec2_f32", |
| "__frexpresult_vec2_f2", |
| "__friixplresult_vec3_abstrKct", |
| "__frexp_esult_vec3_abstract", |
| "__rexII_result99vec3_abvvtract", |
| "__frexp_result_vec3_abstract", |
| "__frexp_result_vec_abstract", |
| "__frhxp_result_vec3_abstract", |
| "__frexp_result_llec3_zzbtraPPt", |
| "_frexp_rsult_v3_f16", |
| "__frexp_reffulqq_vc3_f16", |
| "_ddreJJp_result_vec3_f16", |
| "__frexp_result_vec3_f16", |
| "__feXXp_result_vec_zz16", |
| "__frexp_result_ve23_16", |
| "__frexp_result_yyeN3_f16", |
| "__frexpresult_ve3_3OO", |
| "__fZePp_rusrlt_vec3_fE2", |
| "__freeepresddll_vec3_2232", |
| "__frexp_result_vec3_f32", |
| "mfrexp_r9sult_ec3_fVV2", |
| "__IIrexp1result_vec3_f3", |
| "__frexp_result_vec3_f3b", |
| "__frexp_result_e7i_abstrat", |
| "__frexp_oesult_vecii_abstract", |
| "__fxp_r5sult_vecn_abstract", |
| "__frexp_result_vec4_abstract", |
| "__frexp_resultvec4Sabstract", |
| "_22frexp_reslt_vec4_abstrct", |
| "__Grexp_result7vecC_abst11ac", |
| "__fre8ff_result_vec4_f16", |
| "__frexp_resultve4_f16", |
| "__frexp_resuJJSS_vec4_f16", |
| "__frexp_result_vec4_f16", |
| "__frep9esult_vec4_f16", |
| "__frexp_JJesulTT_vecbb_f16", |
| "_frexp_res66lt_vec4_16", |
| "__fre0p_r66sultuvec_f32", |
| "__frexp_resuyW_ec4_f32", |
| "__frep_result_vec_f32", |
| "__frexp_result_vec4_f32", |
| "__frxp_result_vec4_f32", |
| "__frexp_result_vec4rf32", |
| "__frexp_2esult_vec4_f3B", |
| "__modf_resultBBastract", |
| "RR_modf_reult_abstract", |
| "_LLmodf_resulVV0btract", |
| "__modf_result_abstract", |
| "__modOO_resltKKabstrac", |
| "__modw_rggsult_absract", |
| "__mod_resultLhabstrpct", |
| "_mKKdf_reEiultf16", |
| "_modf_result_f16", |
| "UU_mdf88result_f6", |
| "__modf_result_f16", |
| "__movvrr_result_f16", |
| "__mowf_mmesult_1", |
| "__m44df_rsultjf16", |
| "__modf_resulX_f32", |
| "8_modf_result_f32", |
| "EE_modf_reultvvf32", |
| "__modf_result_f32", |
| "__modziesult99f32", |
| "__modfJJresnlGG_QQ32", |
| "__modf_resultssf32", |
| "K_modf_result_Pec2_abstract", |
| "__modf_resut_vc2_abstrpttct", |
| "__modf_reult_vec2_abstrct", |
| "__modf_result_vec2_abstract", |
| "__modMM_result_vec2_abstract", |
| "__modf_result_vec2_absJ0ract", |
| "__modf_resul_vV2_ab8trac", |
| "__modfKrggsult_vec2_fhh6", |
| "__modf_result_vec2_ff6", |
| "__Qodf_re77ult_vec2_f16", |
| "__modf_result_vec2_f16", |
| "__modf_resultYYvc2_f16", |
| "__mofkresult_vecS_f16", |
| "__modf_resut_en2_f122", |
| "__modf_rsult_FFec2_f2", |
| "u_modf_resultUUvGGPP2_f3I", |
| "_amodfFresult_vec2EEfv", |
| "__modf_result_vec2_f32", |
| "e_DDof_rddsult_vec2_BB32", |
| "__Modf_reEEult_v55c2_cc3", |
| "_mKKdvresult_vc2_f32", |
| "__modf_Result_vec3_abstract", |
| "__modf_re9ut_vec3_abstract", |
| "__modf_result_ve3_abstract", |
| "__modf_result_vec3_abstract", |
| "aa_mdI_result_ec3_abstract", |
| "__77odf_result_vec3_abstract", |
| "__mIdf_result_vec3_abstract", |
| "__modf_result_vec_f16", |
| "__modf_reult_vec3_f16", |
| "__modf_rsult_vec3_f6", |
| "__modf_result_vec3_f16", |
| "__m33df_reXXulc_vec3_f16", |
| "__modf_resultveE3_f16", |
| "__modf_result_vecXXf16", |
| "__modxx_result_veB3_f32", |
| "_modfresultGGec3_f32", |
| "__modf_result_vec3_f366", |
| "__modf_result_vec3_f32", |
| "__0dv_result_veTT_f32", |
| "__mdfresukt_ve_f32", |
| "__mdf_reult_vec3_fpp2", |
| "__modf_result_vec11_abstrt", |
| "__Jodf_resulE_vec4BBybstract", |
| "_qmodx_IImsult_vec4_abstract", |
| "__modf_result_vec4_abstract", |
| "__modf_result_vec4_aFstrac", |
| "_modf_rYsult_vec4_abstract", |
| "__modh_reHHult_vec4_abstDact", |
| "__mHfreslt_ve224_f16", |
| "__mdf_reslt_vec4_f16", |
| "__modf_rsult_vec4_f16", |
| "__modf_result_vec4_f16", |
| "__mdf_result_vec4_f16", |
| "__modf_result_vec4_fdd6", |
| "__modf_result_OPc4_f16", |
| "_modabbresult_vec4_f3", |
| "__m00df_result_vec4_32", |
| "__modf_result_hec4_f32", |
| "__modf_result_vec4_f32", |
| "__modf_YYesult_veg4_32", |
| "__modf_result_Oec4_f32", |
| "_hmodfresult_vec_f32", |
| "fEppay", |
| "rrvy", |
| "arazz", |
| "array", |
| "arra", |
| "OiiJa", |
| "aGray", |
| "aTT22mic", |
| "ltomic", |
| "atbmic", |
| "atomic", |
| "atomiB", |
| "aPIIoXiS", |
| "atojjic", |
| "bccnding_a_ray", |
| "bndiS6xx_azzray", |
| "iing_array", |
| "binding_array", |
| "Nindi4g_vxxay", |
| "iAAdingpp00rra", |
| "byning_aeeya", |
| "bWWbl", |
| "MMtmol", |
| "d", |
| "bool", |
| "_oo", |
| "bEEoV", |
| "boo4", |
| "bVVfgeX", |
| "ouffVr", |
| "buffe", |
| "buffer", |
| "btfKKr", |
| "uGr", |
| "uafer", |
| "O6", |
| "G", |
| "f6", |
| "f16", |
| "99R16", |
| "12", |
| "YYvXR", |
| "2", |
| "XX5", |
| "3", |
| "f32", |
| "ppcc", |
| "v32", |
| "EESS", |
| "i", |
| "", |
| "i3w", |
| "i32", |
| "id992", |
| "99P", |
| "KK3", |
| "oDD", |
| "22", |
| "q", |
| "i8", |
| "0L", |
| "vv66", |
| "nr", |
| "ineeut_aachmxxnt", |
| "NNnput_aCCtOchment", |
| "input_attachmnt", |
| "input_attachment", |
| "inp4t_attacament", |
| "inNNut_attachmNNt", |
| "input_atachment", |
| "mux2", |
| "at2YSEE", |
| "m0t2x2", |
| "mat2x2", |
| "mataax2", |
| "mmm2qq", |
| "matx2", |
| "mUUx2E", |
| "mDDtK2f", |
| "mat2x0t_", |
| "mat2x2f", |
| "lApxf", |
| "mtMx2f", |
| "mat2xBBf", |
| "nnt99bbh", |
| "EEAA1x2h", |
| "m5662xTh", |
| "mat2x2h", |
| "Hat2x2h", |
| "xxHtx2h", |
| "mnyt2z2h", |
| "mat23", |
| "mktxH", |
| "atcx3", |
| "mat2x3", |
| "orrtx3", |
| "mtJJ3", |
| "0CCt2x", |
| "mAxFx99f", |
| "matcx3f", |
| "mat2S3f", |
| "mat2x3f", |
| "masoxBB", |
| "matx3f", |
| "matx3em", |
| "oPPtx3gQQ", |
| "Btx", |
| "mlKKN3h", |
| "mat2x3h", |
| "marrx3", |
| "atrpx3h", |
| "yPat2x3h", |
| "cc2ZZ4", |
| "mt24", |
| "m00t2x4", |
| "mat2x4", |
| "ssPBat24", |
| "ffwaJJxf", |
| "mIt2XX", |
| "2f", |
| "ma2x4f", |
| "utKKx4f", |
| "mat2x4f", |
| "ma442df", |
| "motpx4f", |
| "mathhjN4f", |
| "ma33UUEwwh", |
| "matxuh", |
| "Kaddxrrh", |
| "mat2x4h", |
| "2tt2PP4r", |
| "m1twwx4h", |
| "mat2xc1nn", |
| "mt3x2", |
| "mat32", |
| "aatSS6xI", |
| "mat3x2", |
| "EED3x2", |
| "ccatIVR", |
| "atx2", |
| "aaht32f", |
| "mLtSx2f", |
| "mfmm32", |
| "mat3x2f", |
| "mm4V2f", |
| "matx__", |
| "Qat2f", |
| "mdRRE3x2", |
| "m93x2h", |
| "at3C0", |
| "mat3x2h", |
| "t3x2z", |
| "ccat3x2h", |
| "at3x2Q_", |
| "ma3xt", |
| "EpptCCzzx3", |
| "mahh3dd3", |
| "mat3x3", |
| "_a66x77", |
| "mPt3x3", |
| "mwt3x3", |
| "uux3f", |
| "6at3XX3f", |
| "mR33f", |
| "mat3x3f", |
| "m33VV", |
| "mHHt3GG3f", |
| "mMtFF73f", |
| "9at3x3", |
| "at3x33", |
| "BBa3x3_", |
| "mat3x3h", |
| "matxBOOa", |
| "mat3AAh", |
| "maGG3yh", |
| "77a3xX", |
| "mFFttxK", |
| "mZZossUU4", |
| "mat3x4", |
| "mt3x4", |
| "mal3x4", |
| "mah3x4", |
| "mKtTTxk", |
| "ma3xwwf", |
| "mt3x4Kjj", |
| "mat3x4f", |
| "atxYYf", |
| "mat3EE4", |
| "QQat3x4f", |
| "lat3P", |
| "at3x4Hff", |
| "man3x4h", |
| "mat3x4h", |
| "matg46F", |
| "mhss8x4h", |
| "llFa3x4h", |
| "2t4002", |
| "mag4x2", |
| "eatx2", |
| "mat4x2", |
| "mft4x2", |
| "at4", |
| "matx2", |
| "qqt4x2f", |
| "AA42f", |
| "matx2v", |
| "mat4x2f", |
| "mjjt4xf", |
| "ZZat4x2f", |
| "mPIItO22f", |
| "mZZt4x2h", |
| "mat4x2nn", |
| "kkZa224x2h", |
| "mat4x2h", |
| "mat42h", |
| "ma4xR", |
| "mat4xqq9h", |
| "m77t4x3", |
| "at3x", |
| "macc4x3", |
| "mat4x3", |
| "RR14x3", |
| "mJJll4x", |
| "IaMM", |
| "7T6t4x3", |
| "mat4xQQJ", |
| "uu4x3f", |
| "mat4x3f", |
| "mat4f", |
| "m433qf", |
| "maxx4x3f", |
| "Nrr4h", |
| "a994x3h", |
| "at4x3", |
| "mat4x3h", |
| "mat4H3h", |
| "_at4x3h", |
| "m44t4x3h", |
| "mt4x4", |
| "jt4x4", |
| "matt4mEE4", |
| "mat4x4", |
| "t4x4", |
| "mrrt44", |
| "xatx4", |
| "zzt4x4", |
| "mat4x4e", |
| "au4pZ4f", |
| "mat4x4f", |
| "muuTT4x00", |
| "mvvxJJ", |
| "maQ4x4f", |
| "mC4R4h", |
| "aCx", |
| "ma4xPPpr", |
| "mat4x4h", |
| "muDDt4xxxh", |
| "YYlqamd4x4h", |
| "atFFx4__", |
| "NNGtr", |
| "Mlr", |
| "", |
| "ptr", |
| "xlq", |
| "tr", |
| "44a", |
| "WWGmpler", |
| "sjjmplr", |
| "sajjpler", |
| "sampler", |
| "sa1jer", |
| "sample", |
| "99ampler", |
| "samVVler_comparison", |
| "ZZampler_cmparxson", |
| "sampl33r_ompavvison", |
| "sampler_comparison", |
| "sampler9comparisos", |
| "samler_Fomparison", |
| "sampuer_compaeison", |
| "subgroup_mtIixlefKK", |
| "subgroJ_matrix_left", |
| "sXXCCgrouSS_matrix_left", |
| "subgroup_matrix_left", |
| "subgroup_matrWW66_ZZJft", |
| "ubgoup_mdmt5ix_left", |
| "subgroup_mUrBBBx_left", |
| "subgr0up_mJJtri11_result", |
| "subfroup_matrix_rettult", |
| "subgrXupmtttrix_rsult", |
| "subgroup_matrix_result", |
| "subgroLp_matrix_reswlt", |
| "su1group_matrix_result", |
| "subgroup_matrix_resuwwt", |
| "subgou_atrix_righee", |
| "subgroup_matrx_right", |
| "subgroup_matNNix_right", |
| "subgroup_matrix_right", |
| "__RRbgroup_matrix_riUUhl", |
| "sHbgroup_matrix_right", |
| "subgrour_maCCrix_right", |
| "exel_buffer", |
| "texppl_bdfIr", |
| "texel_bufer", |
| "texel_buffer", |
| "Lexel_bNfr", |
| "e_buffe", |
| "teGRRexx_uqqfer", |
| "texturS_GGd", |
| "88tucce_1d", |
| "texture_1", |
| "texture_1d", |
| "textte_ppd", |
| "qqFF0xture551d", |
| "txture_1d", |
| "textur2d", |
| "texOre_2d", |
| "textuHHe_2", |
| "texture_2d", |
| "66extureSS2O", |
| "tTTturddY_2d", |
| "textursg2d", |
| "texGGure_2d_array", |
| "teQQtOreI2ll_array", |
| "texture_2d_aray", |
| "texture_2d_array", |
| "texture_2d_arrray", |
| "texture2d_ar7yyy", |
| "tBBxtur22_2d_WrrYy", |
| "textyyVe_3d", |
| "x4ure_3", |
| "texture_ddd", |
| "texture_3d", |
| "texuVVez2d", |
| "teyyture_3d", |
| "tex__ure_Ad", |
| "texture_chhbe", |
| "ttvvre_cube", |
| "textureube", |
| "texture_cube", |
| "textoorsNNgube", |
| "textrmm_Zube", |
| "3extkecube", |
| "texAur_ffube_aRray", |
| "Wxturrr_cube_zzrry", |
| "texture_ubRR_aray", |
| "texture_cube_array", |
| "textMr88_cube_arraSS", |
| "txturRPPcubebbarray", |
| "textWWre_cubexxrray", |
| "texture_dptAAv_2d", |
| "tj44xXure_depth_2d", |
| "texture_depthf2d", |
| "texture_depth_2d", |
| "texAAureUepth_2OO", |
| "textur_ssept_2d", |
| "texbbure_depFsh_2d", |
| "texture_depth_2d_annraYY", |
| "teture_depth_2d_arrass", |
| "texture_depth_zzd_araq", |
| "texture_depth_2d_array", |
| "texture_deptNN_d_arrQ", |
| "texturekppdpth_2darray", |
| "texturs8_depLh_Jd_array", |
| "77exJure_depthff5TTbe", |
| "texure_d00pth_cubx", |
| "Ae1ture_deph_cube", |
| "texture_depth_cube", |
| "texture_depthcube", |
| "textuQQe_depth_ube", |
| "texture_weptiicbe", |
| "texture_depth_cube_arwway", |
| "texJJure_dephYh_cube_array", |
| "kexture_deptRR_cube_E7ay", |
| "texture_depth_cube_array", |
| "texture_depth_kuube_array", |
| "textureRdept_cube_trray", |
| "textrN_depth_cIIbe_array", |
| "texture_deptII_multisampled_d", |
| "texture_depthmultisamiiledE2d", |
| "textssre_depth_multisamped_2d", |
| "texture_depth_multisampled_2d", |
| "CCxture55Xepth_multisampled_2d", |
| "tex9ure_depth_multisampled_2d", |
| "texture_Xepth_mulisamped_2d", |
| "txture_eteIInal", |
| "texturz_external", |
| "texurAAzz22xternal", |
| "texture_external", |
| "textur_external", |
| "Fbbxtre_eternal", |
| "texture_MMxVernal", |
| "texturA_mwcmmisamplzzd_2d", |
| "texture_muOOtisampeQQ2d", |
| "texture_mbltisampled_2d", |
| "texture_multisampled_2d", |
| "texture_multisaCpleknn25", |
| "texture_multisaplyyKK_2rr", |
| "tAAture_multisampleT_2d", |
| "QQexture_sorage_1d", |
| "texture_t8rage_d", |
| "teture_stoaage_1d", |
| "texture_storage_1d", |
| "eeextbr_stccrage_1d", |
| "texLLure_Porage_1d", |
| "tetuWW_sUorage_1d", |
| "texture_stzzrage_2", |
| "text__re_soNa_2d", |
| "texture_storagea2d", |
| "texture_storage_2d", |
| "texre_stoBage_2d", |
| "zzexture_torge_2d", |
| "textureUaatorbge_HHd", |
| "texturesOo4ag_2d_array", |
| "textume_sGGrage_2d_array", |
| "texture_torage_2d_array", |
| "texture_storage_2d_array", |
| "texture_storazzeN2d_aG8ray", |
| "teture_storage_2d_array", |
| "textuxe_storaAAe_2d_array", |
| "tbbxture_suuorage_3d", |
| "tejjture_storage_3d", |
| "texturJJ_stoqqgccx3d", |
| "texture_storage_3d", |
| "teggtFe_torge_3d", |
| "textvre_soragA_3d", |
| "texture_storagcc_3d", |
| "BUU", |
| "uAAB", |
| "x16", |
| "u16", |
| "U8", |
| "uU8CC", |
| "u__6", |
| "UU2", |
| "32", |
| "uu77r", |
| "u32", |
| "ukk", |
| "ul2", |
| "32", |
| "Y3", |
| "u44", |
| "8", |
| "u8", |
| "urP88", |
| "8", |
| "", |
| "sae", |
| "vg", |
| "bece", |
| "vec2", |
| "rrp", |
| "YYe2", |
| "vc2", |
| "rCCcf", |
| "lecf", |
| "vec2ZZ", |
| "vec2f", |
| "tqm9MMf", |
| "veUf", |
| "vgc77n", |
| "vdddh", |
| "vEcaah", |
| "vecIIh", |
| "vec2h", |
| "RReZ2ll", |
| "vecNNkrr", |
| "vec", |
| "vc2i", |
| "veca", |
| "HHec2G", |
| "vec2i", |
| "cc2i", |
| "vB22nlli", |
| "vec25", |
| "eR2u", |
| "gec2u", |
| "ve2u", |
| "vec2u", |
| "vecpu", |
| "vecK99u", |
| "22Rcu", |
| "nnc3", |
| "eeeEE", |
| "3effH3", |
| "vec3", |
| "22Us6", |
| "vm0", |
| "vppN", |
| "ve63", |
| "oZWWV3f", |
| "vHHf", |
| "vec3f", |
| "vAcf", |
| "vTf", |
| "2ec3f", |
| "ve443W", |
| "8Z77", |
| "FeR3", |
| "vec3h", |
| "vebb3", |
| "ggce", |
| "UeSh", |
| "vZqNN", |
| "v9i", |
| "ccHMMi", |
| "vec3i", |
| "v3x", |
| "veXX", |
| "3i", |
| "veu", |
| "vecgg3u", |
| "rfe3u", |
| "vec3u", |
| "ve3u", |
| "vggc3D", |
| "v993Q", |
| "eec", |
| "ec4", |
| "IIec", |
| "vec4", |
| "ecq", |
| "o77O4", |
| "rrDD", |
| "vecjf", |
| "11ciiFf", |
| "jBcRRf", |
| "vec4f", |
| "vdAc_7f", |
| "4jj", |
| "xxkeo", |
| "veW4h", |
| "IQQN1h", |
| "veIh", |
| "vec4h", |
| "vjc4", |
| "e722", |
| "vEElc4g", |
| "ve74", |
| "vec66m88", |
| "a4i", |
| "vec4i", |
| "vE4i", |
| "hqi", |
| "vc4_", |
| "cr", |
| "veBB4", |
| "11nned4BB", |
| "vec4u", |
| "neFFu", |
| "mmBc4cc", |
| "vtt77u", |
| }; |
| 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[] = { |
| "btryetrc_coord", |
| "barycentriKcoord", |
| "barycenFFrc_coonjd", |
| "barycentric_coord", |
| "baryentric_cE8r", |
| "barvcentric_coDDr", |
| "barycentrh55ocoorSS", |
| "clip_dstaZuues", |
| "clip_disPPa7ce55", |
| "clipSdistnckks", |
| "clip_distances", |
| "cFSp_disEEances", |
| "lip_yystancebb", |
| "lRp_ditances", |
| "rag_deT1h", |
| "frXgXdTh", |
| "f00ag_dpth", |
| "frag_depth", |
| "frag77dePth", |
| "fZagpdept", |
| "fbbag_PPtw", |
| "HH8bjjnss_facing", |
| "hront_facing", |
| "frxxntfacg", |
| "front_facing", |
| "frrQnt_acenB", |
| "front_faciJJg", |
| "ronw_fucig", |
| "globttl_invcatioZ_ixx", |
| "global_invov99tion_id", |
| "globalinocaton_d", |
| "global_invocation_id", |
| "glonnal_invocaffion_id", |
| "glob5l_invocation_id", |
| "global_invUcaJiou_Id", |
| "instanc_index", |
| "itstance_inFex", |
| "instance_i1dex", |
| "instance_index", |
| "iAAstanDDe_index", |
| "OstanP2_idex", |
| "instance_ndex", |
| "77ocal_invocation_id", |
| "mmoca_UUnvocatio1_iAA", |
| "loAAal_invfcatiXn_id", |
| "local_invocation_id", |
| "vocl_invocvtion_VVd", |
| "local_invoppation_id", |
| "local_invTTcation_id", |
| "jjoc00l_invocation_ikdex", |
| "local_invoation_index", |
| "ocalyyinvocation_index", |
| "local_invocation_index", |
| "ocal_invoczzYYion_index", |
| "local_invoWatioii_Wndex", |
| "lo7alUUinvo6ation_ndex", |
| "pum_UUubgops", |
| "TTm_subgrohp", |
| "5um_sugroups", |
| "num_subgroups", |
| "n_sb1roups", |
| "num_mmubgr44Ips", |
| "YYumDDRbgroupY", |
| "nujj_workgroups", |
| "nu_workgroups", |
| "num_wrkgrQQdps", |
| "num_workgroups", |
| "55um_workgrups", |
| "num_workkroxFps", |
| "Dum_orkgoupr", |
| "posi_NKKn", |
| "posaTion", |
| "povvition", |
| "position", |
| "ositiojj", |
| "ponOOtion", |
| "pggsiOoOO", |
| "primitiQQewwinex", |
| "rimitive_Jndex", |
| "primitive_iDdex", |
| "primitive_index", |
| "prmitiOOe_index", |
| "primitiv_index", |
| "primiti00_inde", |
| "sampl_iqle", |
| "sample_inuex", |
| "sam33le_index", |
| "sample_index", |
| "ample_NNndex", |
| "samplendMx", |
| "samplb22Ridex", |
| "sampleiimas", |
| "ample_mask", |
| "uCpe_masoo", |
| "sample_mask", |
| "sapeHHmasJ", |
| "samhlemggyg", |
| "samplWWasBB", |
| "EEubgrouCEicc", |
| "Gugroueeyyid", |
| "s44Ubgrou_d", |
| "subgroup_id", |
| "subroup_id", |
| "sNbgroup_id", |
| "subgrouMM_iss", |
| "subgDoup_invCcation_id", |
| "subgrouY_invocggtTon_id", |
| "subgroup_invocatiojj_id", |
| "subgroup_invocation_id", |
| "sbgDDoup_nvocation_id", |
| "MMubroup_invEEcation_i99", |
| "subgroup_invcaNion_id", |
| "55ubgroup_size", |
| "subgroup_siQe", |
| "subgronp_size", |
| "subgroup_size", |
| "subgup_sWWFFe", |
| "subgroup_s66we", |
| "sFbgroup_svze", |
| "verteWWindx", |
| "vertxindex", |
| "5rtex_ndK", |
| "vertex_index", |
| "vertex_in4ex", |
| "vgtex_innnPx", |
| "v7teS_iUdex", |
| "worVgr2up_id", |
| "wprkgroup_id", |
| "wor99VXroup_i2", |
| "workgroup_id", |
| "orgrun_id", |
| "sorkgo_iB", |
| "worg8upBBi8", |
| }; |
| 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[] = { |
| "AyACCter", |
| "citBv", |
| "A4QQner", |
| "center", |
| "ZZnteT4", |
| "Xenler", |
| "ddener", |
| "ddroid", |
| "cin1rod", |
| "cerGGvd", |
| "centroid", |
| "jjenroi", |
| "centrwid", |
| "centroXn", |
| "ji9her", |
| "eihr", |
| "eit2WWr", |
| "either", |
| "eiter", |
| "ethVr", |
| "lnz4her", |
| "fY_s", |
| "fkkHsM", |
| "fzDrIt", |
| "first", |
| "fdrq", |
| "fiht", |
| "fMMlst", |
| "saml", |
| "9Amx", |
| "VVmnle", |
| "sample", |
| "aKpe", |
| "sampBC", |
| "aople", |
| }; |
| 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[] = { |
| "flaE88c", |
| "fbbt", |
| "fla6", |
| "flat", |
| "gl", |
| "E11t", |
| "fla", |
| "ppiHar", |
| "Gqqnaaar", |
| "lnar", |
| "linear", |
| "lxxxxXXa", |
| "zziSSear", |
| "liner", |
| "p4rooetiv", |
| "persectiv", |
| "prspctiKe", |
| "perspective", |
| "pcrzpective", |
| "pergg8ectiv5", |
| "persjjecsive", |
| }; |
| 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[] = { |
| "b1ra8uniArm", |
| "bgrlV8uno66m", |
| "bgra8ov", |
| "bgra8unorm", |
| "ghm8uGGortt", |
| "bgryyiunojm", |
| "QQgttv_unorm", |
| "r6foLLt", |
| "r16Wlo7t", |
| "6fvvoFr", |
| "r16float", |
| "ryyflzzat", |
| "rfloat", |
| "I16Rco_t", |
| "rdd6int", |
| "lM6si2", |
| "r1Osint", |
| "r16sint", |
| "rKK6msiTT", |
| "RRsin", |
| "r1s04", |
| "r16nqor", |
| "r16snorBB", |
| "r16s2WBarm", |
| "r16snorm", |
| "r16sjjorm", |
| "rt6HHnom", |
| "1JJsnrm", |
| "rttoouiSt", |
| "6r_SSnt", |
| "rWW6uint", |
| "r16uint", |
| "r16uink", |
| "r1bbitt", |
| "r16u1n", |
| "N6unfrm", |
| "k16iinom", |
| "r16unoUw", |
| "r16unorm", |
| "I6unorm", |
| "r886uLL4orm", |
| "r16unZZrm", |
| "r32flMMat", |
| "r32foat", |
| "MM32f6ASSt", |
| "r32float", |
| "TTx2flggGG", |
| "r32Iloat", |
| "r32flolt", |
| "rOO2st", |
| "3aKi5t", |
| "Rf__zznt", |
| "r32sint", |
| "r3LLsinP", |
| "r32shht", |
| "r2sint", |
| "32ujt", |
| "r3BB0", |
| "xxL3unt", |
| "r32uint", |
| "rII2uinMM", |
| "r3XuFFt", |
| "r32usszz", |
| "rZZrrinF", |
| "r8jir00", |
| "rwwsirr", |
| "r8sint", |
| "r8iZQ", |
| "8s__ht", |
| "rsint", |
| "r3snorm", |
| "rsnoiXm", |
| "r83m", |
| "r8snorm", |
| "rOvv8orm", |
| "rv5jPrm", |
| "N8inop", |
| "r8un2", |
| "rqDuiJ", |
| "Q8int", |
| "r8uint", |
| "8uJnt", |
| "WW8uin", |
| "rgguwQwt", |
| "r8uzorm", |
| "rzzWnorm", |
| "runo", |
| "r8unorm", |
| "998UUoqqm", |
| "EE8uRRom", |
| "r8unm", |
| "rg11b10ttfloa", |
| "Jg1b10uflMMt", |
| "Baag11b10KKfloat", |
| "rg11b10ufloat", |
| "rl55Ib10ufloat", |
| "oog1b10ufBBwat", |
| "rg__PPb10ufloat", |
| "rg16RRloat", |
| "rghSot", |
| "Q1fat", |
| "rg16float", |
| "r6fl8HHat", |
| "rD16flYYat", |
| "rg16floOt", |
| "Jg8IIsinZ", |
| "ogY6sint", |
| "r0X6sint", |
| "rg16sint", |
| "rg6KKSncn", |
| "rg133GGRin", |
| "XXg1633qint", |
| "rz16no4m", |
| "rWttWKnhhrm", |
| "rg1rxorm", |
| "rg16snorm", |
| "rg16CQerm", |
| "g1rYnorm", |
| "rg16xmnorm", |
| "rg1ruit", |
| "rgyy6uit", |
| "r86i8t", |
| "rg16uint", |
| "rge6uint", |
| "hkkg1uint", |
| "rg6uOOBnt", |
| "rg6uno99", |
| "rggg6norD", |
| "r1n1uaorm", |
| "rg16unorm", |
| "rgS6Ioqm", |
| "g16unYYrm", |
| "Yg16uLoVV0", |
| "rg32ss2oam6", |
| "jjg32floa", |
| "g7fpoat", |
| "rg32float", |
| "rg36floaN", |
| "rgss2flggat", |
| "rg32floa", |
| "rg32JiOOt", |
| "MMg32sin00", |
| "rg32smmMMt", |
| "rg32sint", |
| "r32sqHnt", |
| "rg882sin", |
| "gRR2wwint", |
| "rgq2uint", |
| "gU2it", |
| "g32Bi5MQ", |
| "rg32uint", |
| "33g32uint", |
| "Og32ui33t", |
| "rg32it", |
| "rgAkkM_t", |
| "rg8int", |
| "dg8i", |
| "rg8sint", |
| "rXXI55wwnt", |
| "g8sint", |
| "g8dit", |
| "dJJsnom", |
| "rg8_orm", |
| "rgnorL", |
| "rg8snorm", |
| "99g8snrm", |
| "xU8snorm", |
| "rgs9orm", |
| "vg8uint", |
| "LLg22uint", |
| "fguin1", |
| "rg8uint", |
| "rgAAugn", |
| "8uUC", |
| "rnwuinzz", |
| "nww8uVVMorm", |
| "g8NNXorm", |
| "r8unoWWe77", |
| "rg8unorm", |
| "r338PPvvorm", |
| "rg8unjj22m", |
| "AAg8uorm", |
| "kkb10N2RRint", |
| "rQQb10a2uint", |
| "rgb0a2uuint", |
| "rgb10a2uint", |
| "uub10a2unt", |
| "rg102uinZ", |
| "rgb102Hint", |
| "rgbSSa2ufSSrdd", |
| "rTTb10a2unorm", |
| "rtb10m2corm", |
| "rgb10a2unorm", |
| "rgb10a2unorhh", |
| "rgG10aunorm", |
| "AAwwbbb0HH2unorm", |
| "rgba1BBfloat", |
| "rgbM2hflogt", |
| "rgba1floaWW", |
| "rgba16float", |
| "rgbqq16float", |
| "rgbar6flUUt", |
| "rgba16Eoat", |
| "rrVVba16sRnt", |
| "rgbH31GGOint", |
| "rgba1si55", |
| "rgba16sint", |
| "rgBa16siSSt", |
| "rga16sazz", |
| "rb666siAAt", |
| "rgbw6_norm", |
| "rgba6snorm", |
| "rgbr16norm", |
| "rgba16snorm", |
| "rgba16snRRrG", |
| "KK1ba1LLsnoxm", |
| "rgba16NWWnFrm", |
| "gbfGUuint", |
| "rgba1FFE6nt", |
| "rgba19yyJTTnt", |
| "rgba16uint", |
| "zgba16uit", |
| "rb16uinI", |
| "gb16pt", |
| "rgba1nnttorm", |
| "rgbaKiunorm", |
| "rgbee16unorm", |
| "rgba16unorm", |
| "rgba11_unogm", |
| "rgba16unrm", |
| "rgbo16unm", |
| "rgb3Xpot", |
| "rgb6632flYss", |
| "gbaY2f77IIat", |
| "rgba32float", |
| "rgeeSS3Gfloat", |
| "rgQl3float", |
| "gba32floa", |
| "rgba32s__nt", |
| "rgba32iDDt", |
| "rgb32snt", |
| "rgba32sint", |
| "rgb5l55sin1", |
| "r4bacsint", |
| "gba32sint", |
| "rgOa311ui6t", |
| "rga2uist", |
| "rgba32uXnt", |
| "rgba32uint", |
| "rg44w32uint", |
| "rgba3YYuint", |
| "gba32uint", |
| "gTTa8ynt", |
| "rga8vvbbt", |
| "rgbaksint", |
| "rgba8sint", |
| "g99a5sit", |
| "lRRbasinjj", |
| "rgba8s77Yt", |
| "rbaLLJrm", |
| "rgnnsnorm", |
| "rooba8sord", |
| "rgba8snorm", |
| "rba8Enobm", |
| "rba8snorm", |
| "rgbi81nAQm", |
| "vgba8uSSnt", |
| "rgbTui", |
| "rbbasqquit", |
| "rgba8uint", |
| "gba8ui3", |
| "rnba8uHt", |
| "rgba8mint", |
| "rgbanoBII", |
| "rgba8uform", |
| "ra__a8unrm", |
| "rgba8unorm", |
| "rgauorm", |
| "ii4a8unorD", |
| "rgUa83nor", |
| }; |
| for (auto _ : state) { |
| for (auto* str : kStrings) { |
| auto result = ParseTexelFormat(str); |
| benchmark::DoNotOptimize(result); |
| } |
| } |
| } // NOLINT(readability/fn_size) |
| |
| BENCHMARK(TexelFormatParser); |
| |
| } // namespace |
| } // namespace tint::core |
| |
| // clang-format on |