| // 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", |
| "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", |
| "resourceQQPPinding", |
| "resoDDrxxe_bin8uing", |
| "reddYYurcmllbiqqding", |
| "resource_binding", |
| "_esource_bindiFFg", |
| "rerroGGrce_bidinNN", |
| "Mesource_bilding", |
| "aler", |
| "slmpqex", |
| "samper", |
| "sampler", |
| "samp44r", |
| "WWGmpler", |
| "sjjmplr", |
| "sampler_compajjison", |
| "sampjercomparis1n", |
| "sapler_comparison", |
| "sampler_comparison", |
| "sampler_comparis99n", |
| "samVVler_comparison", |
| "ZZampler_cmparxson", |
| "subvvroup_ma33ri_left", |
| "subgroup_matrsx_lef9", |
| "subgroup_matFix_lef", |
| "subgroup_matrix_left", |
| "suegroup_muutrix_lft", |
| "subgroup_mtIixlefKK", |
| "subgroJ_matrix_left", |
| "subgrXXupSSmatriCC_result", |
| "subgrWWupZZmatrix_66esult", |
| "subroup_mari5_resumdt", |
| "subgroup_matrix_result", |
| "BBubgroupmaBBriU_result", |
| "subgr0up_mJJtri11_result", |
| "subfroup_matrix_rettult", |
| "subroup_maXrix_ightt", |
| "subgroup_matrix_riwhL", |
| "subgr1up_matrix_right", |
| "subgroup_matrix_right", |
| "subgroup_matrix_righww", |
| "subgou_atrix_righee", |
| "subgroup_matrx_right", |
| "texel_NNuffer", |
| "tRUUx__l_blffer", |
| "tHxel_buffer", |
| "texel_buffer", |
| "teCCelrbuffer", |
| "exel_buffer", |
| "texppl_bdfIr", |
| "textre_1d", |
| "textLN_d", |
| "tet_d", |
| "texture_1d", |
| "teqqtuxRR_GGd", |
| "texturS_GGd", |
| "88tucce_1d", |
| "texture_2", |
| "textte_ppd", |
| "qqFF0xture552d", |
| "texture_2d", |
| "txture_2d", |
| "textur2d", |
| "texOre_2d", |
| "textuHHe_2d_rray", |
| "text66re_2d_OrraSS", |
| "texture_2d_ddYraTT", |
| "texture_2d_array", |
| "textsrgg_2d_rray", |
| "texGGure_2d_array", |
| "teQQtOreI2ll_array", |
| "textue_3d", |
| "texrrure_3d", |
| "txtur7_yyd", |
| "texture_3d", |
| "textu22Be_Yd", |
| "textyyVe_3d", |
| "x4ure_3", |
| "texture_cudde", |
| "texVVuze_cu2", |
| "texturyy_cube", |
| "texture_cube", |
| "textu__A_cube", |
| "texture_chhbe", |
| "ttvvre_cube", |
| "texture_ub_array", |
| "tNNgtsre_cubeooarray", |
| "mmZZxtre_cube_aray", |
| "texture_cube_array", |
| "textuk_cue_array", |
| "texAur_ffube_aRray", |
| "Wxturrr_cube_zzrry", |
| "texture_depR_2d", |
| "textuSSe_88epth_Md", |
| "texture_debbPR_2d", |
| "texture_depth_2d", |
| "WWeture_depthxx2d", |
| "texture_dptAAv_2d", |
| "tj44xXure_depth_2d", |
| "texturefdepth_2d_array", |
| "texture_dAAUthOOd_array", |
| "tuxtue_ssept_2d_array", |
| "texture_depth_2d_array", |
| "tsxtuFFe_deptbb_2d_array", |
| "texture_depth_2d_annraYY", |
| "teture_depth_2d_arrass", |
| "textre_qezzth_cube", |
| "textre_NepQh_cube", |
| "tppxtukke_deph_cbe", |
| "texture_depth_cube", |
| "textssre_JepthLcube", |
| "77exJure_depthff5TTbe", |
| "texure_d00pth_cubx", |
| "texture1depth_cube_arrA", |
| "texture_depth_cube_rray", |
| "texture_depth_QQbe_array", |
| "texture_depth_cube_array", |
| "exture_depth_cubeiiaway", |
| "texture_depth_cube_arwway", |
| "texJJure_dephYh_cube_array", |
| "teEkure_depth_multi7ampld_2RR", |
| "texture_deptuu_multisampked_2d", |
| "texture_dethtRultisampled_2d", |
| "texture_depth_multisampled_2d", |
| "txture_dIIpth_multisNmpled_2d", |
| "texture_deptII_multisampled_d", |
| "texture_depthmultisamiiledE2d", |
| "txture_ssxternal", |
| "XeCC5tue_external", |
| "text9re_external", |
| "texture_external", |
| "tXxture_extrnl", |
| "txture_eteIInal", |
| "texturz_external", |
| "texturezzmultisaAApled222", |
| "texture_multiampled_2d", |
| "textbbre_mulisampld_2F", |
| "texture_multisampled_2d", |
| "textuVe_multisMMmpled_2d", |
| "texturA_mwcmmisamplzzd_2d", |
| "texture_muOOtisampeQQ2d", |
| "texbure_storage_1d", |
| "nne5kture_torage_1C", |
| "textue_KKtorarreyy1d", |
| "texture_storage_1d", |
| "tTxtue_ttorageAA1d", |
| "QQexture_sorage_1d", |
| "texture_t8rage_d", |
| "teture_stoaage_2d", |
| "eeextbr_stccrage_2d", |
| "texLLure_Porage_2d", |
| "texture_storage_2d", |
| "tetuWW_sUorage_2d", |
| "texture_stzzrage_2", |
| "text__re_soNa_2d", |
| "texaure_storage_2d_array", |
| "texture_storage2dBaray", |
| "texure_storagezz2darray", |
| "texture_storage_2d_array", |
| "teaatUre_stHHrage_2dbarray", |
| "texturesOo4ag_2d_array", |
| "textume_sGGrage_2d_array", |
| "teture_storage_3d", |
| "texturezzstG8rageN3d", |
| "texture_storag_3d", |
| "texture_storage_3d", |
| "textuxe_storaAAe_3d", |
| "tbbxture_suuorage_3d", |
| "tejjture_storage_3d", |
| "xccJ3", |
| "g", |
| "Av", |
| "u32", |
| "u3cc", |
| "BUU", |
| "uAAB", |
| "ux", |
| "8", |
| "BUC8", |
| "u8", |
| "u__", |
| "UU", |
| "u", |
| "vuuc7r", |
| "vkk2", |
| "lec2", |
| "vec2", |
| "vc2", |
| "vwY3", |
| "vec44", |
| "Rc2f", |
| "88ePPr2f", |
| "ec2J", |
| "vec2f", |
| "cVt", |
| "vecf", |
| "ec2", |
| "331h", |
| "uuch", |
| "4e02h", |
| "vec2h", |
| "v3rh", |
| "veYY2g", |
| "ve2h", |
| "rCCci", |
| "leci", |
| "vec2ZZ", |
| "vec2i", |
| "tqm9MMi", |
| "veUi", |
| "vgc77n", |
| "vdddu", |
| "vEcaau", |
| "vecIIu", |
| "vec2u", |
| "RReZ2ll", |
| "vecNNkrr", |
| "vec", |
| "vcw", |
| "vec", |
| "HH", |
| "vec3", |
| "cc3", |
| "vulB223", |
| "5ec3", |
| "eR3f", |
| "gec3f", |
| "ve3f", |
| "vec3f", |
| "vecpf", |
| "vecK99f", |
| "22Rcf", |
| "vecnn", |
| "veeENh", |
| "fHHec3h", |
| "vec3h", |
| "ss226h", |
| "em0h", |
| "vecNp", |
| "ve63", |
| "oZWWV3i", |
| "vHHi", |
| "vec3i", |
| "vAci", |
| "vTi", |
| "2ec3i", |
| "ve443W", |
| "8Z77", |
| "FeR3", |
| "vec3u", |
| "vebb3", |
| "ggce", |
| "UeSh", |
| "vqcN", |
| "vc", |
| "vccMM", |
| "vec4", |
| "xT", |
| "vqZ", |
| "e", |
| "vef", |
| "vecgg4f", |
| "rfe4f", |
| "vec4f", |
| "ve4f", |
| "vggc4D", |
| "v994Q", |
| "eeeh", |
| "vech", |
| "vc4II", |
| "vec4h", |
| "veqh", |
| "Ooc77h", |
| "vrrDD", |
| "vecji", |
| "11ciiFi", |
| "jBcRRi", |
| "vec4i", |
| "vdAc_7i", |
| "4jj", |
| "xxkeo", |
| "veW4u", |
| "IQQN1u", |
| "veIu", |
| "vec4u", |
| "vjc4", |
| "e722", |
| "vEElc4g", |
| }; |
| 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[] = { |
| "barcentric_coord", |
| "baryce5tri_oord", |
| "ba66yc88ntrc_oord", |
| "barycentric_coord", |
| "barcetric_coard", |
| "bErycentrc_coord", |
| "Qaryentri_coord", |
| "clp_distanc_s", |
| "clip_rNtanc", |
| "clip_ditances", |
| "clip_distances", |
| "clTTeeB_distances", |
| "nnipgdis11ancs", |
| "clin_distqnces", |
| "mmBcag_deptX", |
| "fttag_dep7h", |
| "fag_dph", |
| "frag_depth", |
| "frag_epKh", |
| "jjran_deFFt", |
| "g8depEEh", |
| "frLnt_fciDDg", |
| "frhhnt55fScing", |
| "ronZ_facinuu", |
| "front_facing", |
| "7ront5PPfacing", |
| "font_facSnkk", |
| "fronEEFfa_ing", |
| "globyyl_nvocatbbo_id", |
| "globalJJinvocRinid", |
| "global_Tnvcation_1d", |
| "global_invocation_id", |
| "Xlobal_vocatioT_id", |
| "global_invocat00o_id", |
| "globalPinvocat77on_id", |
| "inspaceZindex", |
| "PPstanbe_indew", |
| "instssbbH8e_injjex", |
| "instance_index", |
| "instance_indhx", |
| "insancexxine", |
| "inrQaBce_ineex", |
| "local_invocation_iJJ", |
| "ocaluinvocwtio_id", |
| "lttcalZinvocatio_xxd", |
| "local_invocation_id", |
| "local_invocation_99d", |
| "localiocaion_id", |
| "local_invocatinffn_id", |
| "5ocal_invocation_index", |
| "IoUal_invocation_Jndex", |
| "locl_invocation_index", |
| "local_invocation_index", |
| "ltcal_invocation_index", |
| "local_in1ocation_index", |
| "localAAinvocation_inDDex", |
| "Om_woP2grups", |
| "num_workgoups", |
| "num_workgro77ps", |
| "num_workgroups", |
| "n1m_UUorkAAroups", |
| "Xum_workgrfupAA", |
| "VVum_wrkgrouvs", |
| "posippion", |
| "posTTtion", |
| "kosjj0tion", |
| "position", |
| "posiion", |
| "posiyyon", |
| "poYizzion", |
| "priWitiiie_index", |
| "6rimitv7_indUUx", |
| "prUUitive_inpe", |
| "primitive_index", |
| "hrimitiveiTTex", |
| "primitie_inde5", |
| "primtveind1x", |
| "sam44mme_iIdex", |
| "saYDpRe_indYY", |
| "sampjje_index", |
| "sample_index", |
| "sample_idex", |
| "smple_iQQdex", |
| "55amHle_idex", |
| "saxFple_mask", |
| "sapD_mrsk", |
| "sNmple__KKsk", |
| "sample_mask", |
| "saxalT_mask", |
| "sample_vvask", |
| "sjjmple_mak", |
| "subgrnnOOp_i", |
| "sggOOgroOpid", |
| "suwwQgoup_id", |
| "subgroup_id", |
| "subgrup_iJ", |
| "subgroup_iD", |
| "OOubgroupid", |
| "subgroup_nvocation_id", |
| "subro00p_invocation_i", |
| "subgroup_vqcation_ld", |
| "subgroup_invocation_id", |
| "subgroup_invocation_iu", |
| "subgroup_invo33ation_id", |
| "subgrouNNinvocation_id", |
| "subrMup_sze", |
| "ubgr22up_sRzbb", |
| "subgiiup_size", |
| "subgroup_size", |
| "subgrup_size", |
| "soobgop_sCue", |
| "subgrHHu_izJ", |
| "vrtyg_ihdggx", |
| "vrex_WWndeBB", |
| "vertex_inECEcc", |
| "vertex_index", |
| "veGtex_ieedyy", |
| "ve44teUindex", |
| "vertex_inde", |
| "workgNoup_id", |
| "MMorkgrssup_id", |
| "workgrDup_Cd", |
| "workgroup_id", |
| "ggTYkgroup_id", |
| "workjjroup_id", |
| "wrkDDroup_i", |
| }; |
| 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[] = { |
| "cEEMM9er", |
| "cNter", |
| "55enter", |
| "center", |
| "Qenter", |
| "nnnter", |
| "cenWFr", |
| "centro66w", |
| "cvntroFd", |
| "cWWntrd", |
| "centroid", |
| "entrod", |
| "5Ktri", |
| "c4ntroid", |
| "gtnnPr", |
| "eSShe", |
| "2itVer", |
| "either", |
| "epther", |
| "eiXV9992", |
| "nte", |
| "Bs", |
| "fiBB", |
| "yCCAAAt", |
| "first", |
| "ivit", |
| "A4rsQQ", |
| "T4Zist", |
| "Xamlle", |
| "ddamle", |
| "sadd", |
| "sample", |
| "si1le", |
| "vmpGG", |
| "jjmpl", |
| }; |
| 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[] = { |
| "fwat", |
| "flXn", |
| "fljt", |
| "flat", |
| "fz", |
| "flWW2", |
| "fat", |
| "lneVr", |
| "lnz4ear", |
| "li__Y", |
| "linear", |
| "linHkaM", |
| "lInzzaD", |
| "qnedr", |
| "persehtive", |
| "perlMMNctiFe", |
| "perspetiv", |
| "perspective", |
| "xersA9tiv", |
| "VVnrspetive", |
| "perspecKv", |
| }; |
| 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[] = { |
| "bgra8nCBBm", |
| "bgrauoorm", |
| "bgra8ccnE88rw", |
| "bgra8unorm", |
| "bgr8bbnorm", |
| "b6ra8unorm", |
| "gKaggnrm", |
| "r16fE1at", |
| "r16floa", |
| "rHpfloat", |
| "r16float", |
| "qqaa6flGat", |
| "r6loat", |
| "xxxx6_loat", |
| "r16SSzznt", |
| "r16int", |
| "16ont", |
| "r16sint", |
| "r16nt", |
| "rK6st", |
| "rczsint", |
| "r88an5ggm", |
| "r16snsjrm", |
| "116snoriA", |
| "r16snorm", |
| "rVV6sl66rm", |
| "6norm", |
| "tt1Ghmnom", |
| "iiyy6int", |
| "QQt1_vuin", |
| "rLuint", |
| "r16uint", |
| "r1uWcct", |
| "r16uFt", |
| "rzz6yyin", |
| "runorm", |
| "I16Rco_m", |
| "r16uddrm", |
| "r16unorm", |
| "M1l22or", |
| "O16unorm", |
| "KK6TTunmrm", |
| "rRR2lo", |
| "4flo00", |
| "r32nqoa", |
| "r32float", |
| "r32floaBB", |
| "r32f2WBaat", |
| "r32fjjoat", |
| "66tinHH", |
| "r3JJst", |
| "rttoosiSt", |
| "r32sint", |
| "2r_SSnt", |
| "rWW2sint", |
| "r32sink", |
| "r3bbitt", |
| "r32u1n", |
| "rf2uiN", |
| "r32uint", |
| "rii2iVt", |
| "r32winU", |
| "r3Funt", |
| "448s8LLnt", |
| "r8sinZZ", |
| "rMMsint", |
| "r8sint", |
| "8sint", |
| "SSAM6int", |
| "GGxTTint", |
| "r8snorI", |
| "r8slorm", |
| "rOOsnm", |
| "r8snorm", |
| "8aKo5m", |
| "Rf__zzrm", |
| "r8LLnorP", |
| "ruihht", |
| "ruint", |
| "ruit", |
| "r8uint", |
| "08BB", |
| "xxL8un", |
| "r8uiMMIt", |
| "r8XnFFm", |
| "r8unsszz", |
| "r8rrnZZFm", |
| "r8unorm", |
| "rrrjor00", |
| "p8wrrorm", |
| "QZuorm", |
| "rg__hb1nfloat", |
| "rg11w10ufloa", |
| "rg11b103float", |
| "rg11b10ufloat", |
| "rg11b0XXfloai", |
| "rg31b10loa", |
| "rg11c10u8vvoOO", |
| "rg16vlPaj", |
| "ugi6plot", |
| "g16f2oat", |
| "rg16float", |
| "rgD6fJqat", |
| "rg1Qfmoa", |
| "rg16fJat", |
| "rg1sWWnt", |
| "rQQ1wswgnt", |
| "rg16sinz", |
| "rg16sint", |
| "rgWWsinzz", |
| "rg1it", |
| "rK996qqUUn", |
| "EEg16sRRom", |
| "rg16nor", |
| "rg1tsnorm", |
| "rg16snorm", |
| "rgqnoMMm", |
| "rgT6aanBBrKK", |
| "rl16sII5rm", |
| "rg16wBBoo", |
| "rg1__PPint", |
| "rRR16uint", |
| "rg16uint", |
| "rgSut", |
| "riQt", |
| "g6uHH8nt", |
| "rD16unYYrm", |
| "rg16unoOm", |
| "r8II6ZJorm", |
| "rg16unorm", |
| "rgoYunorm", |
| "rg6unor0X", |
| "rcKn6unoSm", |
| "GGg3233la88", |
| "rXX333floqqt", |
| "rz32lo4t", |
| "rg32float", |
| "rWttWKlhhat", |
| "rg3rxoat", |
| "rg32CQeat", |
| "rg32sYr", |
| "xxgm2sinS", |
| "rg3rsit", |
| "rg32sint", |
| "rgyy2sit", |
| "r82i8t", |
| "rge2sint", |
| "hkkg3uint", |
| "rg2uOOBnt", |
| "g32ui9t", |
| "rg32uint", |
| "rgg2uDnt", |
| "rgna2in1", |
| "6gIuinS", |
| "rgsinYY", |
| "Lg8YVVin", |
| "rg8ms2I66", |
| "rg8sint", |
| "jjg8snt", |
| "pp7nt", |
| "rgN6int", |
| "rg8snorsgg", |
| "rgsnorm", |
| "rg8sJoOOm", |
| "rg8snorm", |
| "MMg8snor00", |
| "rg8snmmMMm", |
| "r8snqHrm", |
| "gGuin88", |
| "wwgRRuit", |
| "rg8uinq", |
| "rg8uint", |
| "8uiU", |
| "BQ85nMM", |
| "rg8u33nt", |
| "Og8uno33m", |
| "rg8uom", |
| "kkgAunb_M", |
| "rg8unorm", |
| "rg8unom", |
| "rduom", |
| "rg55wXXnorm", |
| "rb10a2uint", |
| "rgb10a2ut", |
| "rgb1Jadint", |
| "rgb10a2uint", |
| "rb_1a2uint", |
| "rgLL0aint", |
| "rg10G2uin99", |
| "xxgb102UUnom", |
| "rgb90a2unom", |
| "rgb10a2uvorm", |
| "rgb10a2unorm", |
| "rgb10LL22unorm", |
| "rgb11a2ufom", |
| "rgb0aAAungrm", |
| "CUa16flo", |
| "rgbw1zzflont", |
| "rgna16flowVVMM", |
| "rgba16float", |
| "rgNNaX6flat", |
| "rgbee77flWWat", |
| "rgb3316PPloavv", |
| "22gba16sjjnt", |
| "cgAA16sint", |
| "Ngbakk6RRin", |
| "rgba16sint", |
| "rgba16sinQQ", |
| "rgbuu6sint", |
| "rba6suunt", |
| "rga1snorZ", |
| "rgba1sHorm", |
| "rgba1dsnoSSSm", |
| "rgba16snorm", |
| "rgba16snTTrm", |
| "rba16cmort", |
| "rgba16snohhm", |
| "rgba16uiG", |
| "rHbbwAAa16uint", |
| "rgba16uBBnt", |
| "rgba16uint", |
| "hga226Mint", |
| "rgba16unWW", |
| "rqqba16uint", |
| "rgbar6unUUm", |
| "rgba16Eorm", |
| "rgRa16unoVVrr", |
| "rgba16unorm", |
| "rg33OGG1Hunom", |
| "55g16Dnorm", |
| "rSSbB16unoQm", |
| "zzgba32lat", |
| "rga32loAA66", |
| "rgbw2_loat", |
| "rgba32float", |
| "rgba2float", |
| "rgbr32loat", |
| "rgba32flRRaG", |
| "KxUbLL31sint", |
| "rgba32NNWWFt", |
| "gbfGUsint", |
| "rgba32sint", |
| "rgba3FFE6nt", |
| "rgba39yyJTTnt", |
| "zgba32sit", |
| "rb32uinI", |
| "gb32pt", |
| "ttgnn32uint", |
| "rgba32uint", |
| "rgba3iuiKt", |
| "reeba32uint", |
| "rgbg_2ui11t", |
| "rgba8snt", |
| "rgbaino", |
| "rpX8si", |
| "rgba8sint", |
| "g6ss8sYYnt", |
| "rIIba8s7Yt", |
| "ngbGSSeeint", |
| "rgbQlnorm", |
| "ba8snorm", |
| "rgba8sn__rm", |
| "rgba8snorm", |
| "rgba8soDDm", |
| "rgb8snrm", |
| "rgb5l55nor1", |
| "rgbc4int", |
| "gba8uint", |
| "gba6Ou11nt", |
| "rgba8uint", |
| "rsa8unt", |
| "rgbaXuint", |
| "rgbw844int", |
| "rgba8YYnorm", |
| "gba8unorm", |
| "rTa8unyrm", |
| "rgba8unorm", |
| "bbba8unovv", |
| "rgba8unokm", |
| "Vb58unor9", |
| }; |
| 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 |