| // 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", |
| "x32", |
| "u32", |
| "U8", |
| "uU8CC", |
| "u__2", |
| "UU", |
| "u", |
| "ur7u", |
| "u8", |
| "kk", |
| "l8", |
| "u", |
| "vwY3", |
| "vec44", |
| "ec2", |
| "vec2", |
| "PPr88ce", |
| "Je2", |
| "tV", |
| "vecf", |
| "ec2", |
| "331f", |
| "vec2f", |
| "uucf", |
| "4e02f", |
| "v3rf", |
| "veYY2g", |
| "ve2h", |
| "rCCch", |
| "vec2h", |
| "lech", |
| "vec2ZZ", |
| "tqm9MMh", |
| "veUi", |
| "vgc77n", |
| "vdddi", |
| "vec2i", |
| "vEcaai", |
| "vecIIi", |
| "RReZ2ll", |
| "vecNNkrr", |
| "vec", |
| "vc2u", |
| "vec2u", |
| "veca", |
| "HHec2G", |
| "cc2u", |
| "vulB223", |
| "5ec3", |
| "RRc", |
| "vec3", |
| "vgc3", |
| "ve6", |
| "p3c3", |
| "vecK99f", |
| "22Rcf", |
| "vecnn", |
| "vec3f", |
| "veeENf", |
| "fHHec3f", |
| "ss226f", |
| "em0h", |
| "vecNp", |
| "ve63", |
| "vec3h", |
| "oZWWV3h", |
| "vHHh", |
| "vAch", |
| "vTi", |
| "2ec3i", |
| "ve443W", |
| "vec3i", |
| "8Z77", |
| "FeR3", |
| "vebb3", |
| "ggce", |
| "UeSh", |
| "vZqNN", |
| "vec3u", |
| "v9u", |
| "ccHMMu", |
| "v3x", |
| "vqZ", |
| "e", |
| "e4", |
| "vec4", |
| "vccggI", |
| "vfrc", |
| "vc4", |
| "vggc4D", |
| "v994Q", |
| "eeef", |
| "vec4f", |
| "vecf", |
| "vc4II", |
| "veqf", |
| "Ooc77h", |
| "vrrDD", |
| "vecjh", |
| "vec4h", |
| "11ciiFh", |
| "jBcRRh", |
| "vdAc_7h", |
| "4jj", |
| "xxkeo", |
| "veW4i", |
| "vec4i", |
| "IQQN1i", |
| "veIi", |
| "vjc4", |
| "e722", |
| "vEElc4g", |
| "ve74", |
| "vec4u", |
| "vec66m88", |
| "a4u", |
| "vE4u", |
| }; |
| 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[] = { |
| "Qaryentri_coord", |
| "barycentr_c_cord", |
| "arcenric_cooNd", |
| "barycentric_coord", |
| "brycentric_coord", |
| "baeeycentric_TTooBBd", |
| "bargncentri11_cod", |
| "clin_distqnces", |
| "cliX_ccmm8Bances", |
| "7Glip_distanctt", |
| "clip_distances", |
| "ctip_dstacs", |
| "cip_disKances", |
| "clip_dFFjntanes", |
| "g8depEEh", |
| "fragvLeDDh", |
| "fo55g_deptSS", |
| "frag_depth", |
| "fra_Zuepth", |
| "fr755_PPepth", |
| "fra_deStkk", |
| "fronEEFfa_ing", |
| "fronyybbacng", |
| "fRt_JJaing", |
| "front_facing", |
| "froTt_aci1g", |
| "fontTfacXn", |
| "fron_fa00ing", |
| "globalPinvocat77on_id", |
| "global_invoZatipn_i", |
| "globalinPwocationbid", |
| "global_invocation_id", |
| "globHHl_bbnvoc8tjjon_ssd", |
| "globhl_invocation_id", |
| "globalxxinocaion_d", |
| "inrQaBce_ineex", |
| "instanceJJindex", |
| "intauce_iwdv", |
| "instance_index", |
| "intttance_idexx", |
| "instancevi99dex", |
| "instcindex", |
| "local_invocatinffn_id", |
| "local_invocation5id", |
| "UJcal_invocatioIuid", |
| "local_invocation_id", |
| "local_invocation_i", |
| "local_itvocaFion_id", |
| "local_inv1cation_id", |
| "localAAinvocation_inDDex", |
| "OPcain2ocation_index", |
| "local_invoction_index", |
| "local_invocation_index", |
| "local_invocation_77ndex", |
| "locm1l_inUUocatio_inAAex", |
| "local_invocAftiXn_index", |
| "nuv_VVuvgrous", |
| "nppm_subgroups", |
| "num_subgrouTTs", |
| "num_subgroups", |
| "num_skbgroupjj0", |
| "num_subroups", |
| "nyym_ubgroups", |
| "nuzz_wokgrouYYs", |
| "niWm_workgroups", |
| "7u0workgUUoups", |
| "num_workgroups", |
| "UUumworkgoups", |
| "nm_worTThrops", |
| "num5orkgroups", |
| "itio1", |
| "pIsim44ion", |
| "pYitRDDYY", |
| "position", |
| "jjosition", |
| "osition", |
| "QQositod", |
| "primtive_in5Hex", |
| "prFFmitike_indxx", |
| "prmitivrindex", |
| "primitive_index", |
| "NrimitKKve_i_dex", |
| "primitiae_xndeT", |
| "privvitive_index", |
| "amplejjindex", |
| "smpOOe_indenn", |
| "OaOOle_indegg", |
| "sample_index", |
| "wwampQQeindex", |
| "sample_inJx", |
| "sample_iDdex", |
| "OOample_msk", |
| "sample_mak", |
| "samle0mask", |
| "sample_mask", |
| "lmple_mak", |
| "sample_masu", |
| "sa33ple_mask", |
| "subgrouNNid", |
| "ubMrop_id", |
| "subgRupbbi22", |
| "subgroup_id", |
| "subgroiip_i", |
| "ubgroup_id", |
| "uCgoup_ioo", |
| "subHHoup_inUoaJion_id", |
| "subhryup_invocatinggid", |
| "subgrop_invocatWWn_iBB", |
| "subgroup_invocation_id", |
| "sccbgroup_iEEocaCionEEid", |
| "subgrup_invocGtioyye_id", |
| "subgroupivUUcati44n_id", |
| "subgroup_sie", |
| "subgrouN_size", |
| "subgMMoup_sizss", |
| "subgroup_size", |
| "sCbgrDup_size", |
| "sTgggroup_Yize", |
| "sujjgroup_size", |
| "vrtDDx_inde", |
| "99MMtEEx_index", |
| "vNrtex_idex", |
| "vertex_index", |
| "55ertex_index", |
| "Qertex_index", |
| "vertex_nnnde", |
| "workFFroWWid", |
| "wo66kgroup_iw", |
| "wvFkgroup_id", |
| "workgroup_id", |
| "workgWWup_d", |
| "workrup_id", |
| "5rkgrop_K", |
| }; |
| 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[] = { |
| "cen4er", |
| "gnnnPr", |
| "cSSte", |
| "center", |
| "2enVer", |
| "cpnter", |
| "ceXV9992", |
| "ntrnd", |
| "senBi", |
| "cen8rBB", |
| "centroid", |
| "AeAytroCCd", |
| "ienrvvd", |
| "QQAntro4d", |
| "ZZtheT4", |
| "Xitler", |
| "dditer", |
| "either", |
| "eidd", |
| "ei1er", |
| "vthGG", |
| "jjst", |
| "wirst", |
| "nXXst", |
| "first", |
| "EE9rj", |
| "zir", |
| "fWW2st", |
| "samle", |
| "smpVe", |
| "lnz4ple", |
| "sample", |
| "sa__Y", |
| "samHklM", |
| "sImzzlD", |
| }; |
| 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[] = { |
| "dla", |
| "olh", |
| "lFMMN", |
| "flat", |
| "la", |
| "l9", |
| "fVVn", |
| "iKer", |
| "lineBC", |
| "ioear", |
| "linear", |
| "linwwc8Er", |
| "linabb", |
| "linea6", |
| "erspectgg", |
| "peI11pctEve", |
| "pespective", |
| "perspective", |
| "persectiHpe", |
| "perqqpecaaive", |
| "perspeive", |
| }; |
| 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[] = { |
| "bgra8unrxxxx", |
| "zzgra8unorSS", |
| "gra8unorm", |
| "bgra8unorm", |
| "ooga4unr", |
| "bgr8unrm", |
| "bKra8nom", |
| "rzz6flct", |
| "r88al5ggt", |
| "r16flsjat", |
| "r16float", |
| "116floaiA", |
| "rVV6fl66at", |
| "6loat", |
| "r16GGnht", |
| "iiyy6int", |
| "QQt1_vsin", |
| "r16sint", |
| "rLsint", |
| "r1sWcct", |
| "r16sFt", |
| "ryysnzzrm", |
| "rsnorm", |
| "I16Rco_m", |
| "r16snorm", |
| "r16sddrm", |
| "M1l22or", |
| "O16snorm", |
| "rKK6muiTT", |
| "RRuin", |
| "r1u04", |
| "r16uint", |
| "rnuiqq", |
| "r1BBuint", |
| "rWB22aint", |
| "r16ujjorm", |
| "rt6HHnom", |
| "1JJunrm", |
| "r16unorm", |
| "r1ooSlttrm", |
| "rSS6urr_", |
| "r16unWWrm", |
| "r32flokt", |
| "r3Alotbb", |
| "r31flat", |
| "r32float", |
| "N2flfat", |
| "k32iilot", |
| "r32floUw", |
| "r3Fsnt", |
| "r38LLsin44", |
| "r32siZZt", |
| "r32sint", |
| "MM32sint", |
| "r3sint", |
| "rSSMMs6At", |
| "GGgxuinTT", |
| "r32uinI", |
| "r32lint", |
| "r32uint", |
| "rOO2ut", |
| "3aKi5t", |
| "Rf__zznt", |
| "r8siPLL", |
| "rsihht", |
| "rsint", |
| "r8sint", |
| "rsit", |
| "08BB", |
| "xxL8sn", |
| "rIIsnorMM", |
| "r8XnFFm", |
| "r8snsszz", |
| "r8snorm", |
| "r8rrnZZFm", |
| "rrrjor00", |
| "p8wrrorm", |
| "r8iZQ", |
| "8u__ht", |
| "ruint", |
| "r8uint", |
| "r83int", |
| "rXXuii", |
| "rin", |
| "rOvv8orm", |
| "rv5jPrm", |
| "N8inop", |
| "r8unorm", |
| "r8un2m", |
| "r8uqJrD", |
| "8unoQm", |
| "rg11bJ0uflat", |
| "rg111WWufloat", |
| "rg11bgw0ufloQQt", |
| "rg11b10ufloat", |
| "rg11b10zfloat", |
| "rg11zz10ufloWW", |
| "rg1110uloa", |
| "rKUU6fla99q", |
| "EEg16fRRot", |
| "rg16loa", |
| "rg16float", |
| "rg1tfloat", |
| "rgqloMMt", |
| "rgT6aalBBaKK", |
| "l5516sIIn", |
| "rg16wBBoo", |
| "rg1__PPint", |
| "rg16sint", |
| "rRR16sint", |
| "rgSst", |
| "riQt", |
| "r6sn8HHrm", |
| "rD16snYYrm", |
| "rg16snoOm", |
| "rg16snorm", |
| "r8II6ZJorm", |
| "rgoYsnorm", |
| "rg6snor0X", |
| "rg6KKSncn", |
| "rg133GGRin", |
| "XXg1633qint", |
| "rg16uint", |
| "gzzu4nt", |
| "rgtW6uiWhh", |
| "xg6urnt", |
| "rg16CQerm", |
| "g1rYnorm", |
| "rg16xmnorm", |
| "rg16unorm", |
| "r1unorm", |
| "rg1644ynyyrm", |
| "r1wwunorm", |
| "r32fBBaii", |
| "rg32ddloass", |
| "rg32fMeet", |
| "rg32float", |
| "rT32float", |
| "rl038lat", |
| "rs6321Loamm", |
| "Gg32IYYnt", |
| "rYY2sLVVt", |
| "m62s32sinI", |
| "rg32sint", |
| "r32sinjj", |
| "ppg2s7", |
| "Ng32si6t", |
| "rg32uinsgg", |
| "rg2uint", |
| "rg32JiOOt", |
| "rg32uint", |
| "MMg32uin00", |
| "rg32ummMMt", |
| "r32uqHnt", |
| "gGsin88", |
| "wwgRRsit", |
| "rg8sinq", |
| "rg8sint", |
| "8siU", |
| "BQ85nMM", |
| "rg8s33nt", |
| "Og8sno33m", |
| "rg8som", |
| "kkgAsnb_M", |
| "rg8snorm", |
| "rg8snom", |
| "rdsom", |
| "rg55wXXnorm", |
| "g8uint", |
| "g8dit", |
| "dJJunt", |
| "rg8uint", |
| "_g8in1", |
| "g8Lit", |
| "99g8iGt", |
| "xU8unorm", |
| "rgu9orm", |
| "vg8unorm", |
| "rg8unorm", |
| "rg8un2LLrm", |
| "rgu1frm", |
| "rg8uAgor", |
| "CU10a2ui", |
| "rgbw0zz2uint", |
| "rgn10a2uiwVVMM", |
| "rgb10a2uint", |
| "rgNN1Xa2unt", |
| "rgbee772uWWnt", |
| "rgb330aPPuinvv", |
| "rg2210a2unorjj", |
| "rAAc10a2uorm", |
| "rgb1kkaRRunNr", |
| "rgb10a2unorm", |
| "rgb10a2QQnorm", |
| "rgb1a2uunorm", |
| "ruu10a2unom", |
| "rga1floaZ", |
| "rgba1fHoat", |
| "rgba1dfloSSSt", |
| "rgba16float", |
| "rgba16flTTat", |
| "rba16cmoat", |
| "rgba16flohht", |
| "rgba16siG", |
| "rHbbwAAa16sint", |
| "rgba16sBBnt", |
| "rgba16sint", |
| "hga226Mint", |
| "rgba16snWW", |
| "rqqba16sint", |
| "rgbar6snUUm", |
| "rgba16Eorm", |
| "rgRa16snoVVrr", |
| "rgba16snorm", |
| "rg33OGG1Hsnom", |
| "55g16Dnorm", |
| "rSSbB16snoQm", |
| "rga16uazz", |
| "rb666uiAAt", |
| "wgba__6nt", |
| "rgba16uint", |
| "rgba16uit", |
| "rga16uirt", |
| "rgbRR1Guint", |
| "KK1ba1LLunoxm", |
| "rgba16NWWnFrm", |
| "rgba1GfoUm", |
| "rgba16unorm", |
| "r6bEEFF6unrm", |
| "99TJJbyy1unorm", |
| "rzb16unorm", |
| "gba3Iloat", |
| "rap2flo", |
| "rgba3nnttoat", |
| "rgba32float", |
| "rgbaKifloat", |
| "rgbee32float", |
| "rgba11_flogt", |
| "rgb32sint", |
| "rgba3ont", |
| "rpbX3si", |
| "rgba32sint", |
| "rgYY6ss2sin", |
| "r77ba3YsInt", |
| "rgbaSSeesinG", |
| "rgbQluint", |
| "ba32uint", |
| "rgba32u__nt", |
| "rgba32uint", |
| "rgba32iDDt", |
| "rgb32unt", |
| "rgb5l55uin1", |
| "rgbc4int", |
| "gba8sint", |
| "gba6Os11nt", |
| "rgba8sint", |
| "rsa8snt", |
| "rgbaXsint", |
| "rgbw844int", |
| "rgba8YYnorm", |
| "gba8snorm", |
| "rTa8snyrm", |
| "rgba8snorm", |
| "bbba8snovv", |
| "rgba8snokm", |
| "Vb58snor9", |
| "lRRbauinjj", |
| "rgba8u77Yt", |
| "rb8uinJ", |
| "rgba8uint", |
| "gbnn8uit", |
| "rgbd8inoo", |
| "rgbaEHbj", |
| "rba8unorm", |
| "rgbi81nAQm", |
| "rgba8uSSvrm", |
| "rgba8unorm", |
| "gba8nor", |
| "qqba8unosbY", |
| "ab8un3rm", |
| }; |
| 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 |