| // Copyright 2025 The Dawn & Tint Authors |
| // |
| // Redistribution and use in source and binary forms, with or without |
| // modification, are permitted provided that the following conditions are met: |
| // |
| // 1. Redistributions of source code must retain the above copyright notice, this |
| // list of conditions and the following disclaimer. |
| // |
| // 2. Redistributions in binary form must reproduce the above copyright notice, |
| // this list of conditions and the following disclaimer in the documentation |
| // and/or other materials provided with the distribution. |
| // |
| // 3. Neither the name of the copyright holder nor the names of its |
| // contributors may be used to endorse or promote products derived from |
| // this software without specific prior written permission. |
| // |
| // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| |
| //////////////////////////////////////////////////////////////////////////////// |
| // File generated by 'tools/src/cmd/gen' using the template: |
| // src/tint/cmd/bench/enums_core_bench.cc.tmpl |
| // |
| // To regenerate run: './tools/run gen' |
| // |
| // Do not modify this file directly |
| //////////////////////////////////////////////////////////////////////////////// |
| |
| #include <array> |
| |
| #include "benchmark/benchmark.h" |
| #include "src/tint/lang/core/enums.h" |
| |
| namespace tint::core { |
| namespace { |
| |
| void AccessParser(::benchmark::State& state) { |
| const char* kStrings[] = { |
| "ccad", "3", "rVad", "read", "1ead", |
| "rqaJ", "rlla77", "reqqdppriHHe", "rv_wcit", "reabGwrte", |
| "read_write", "read_vriite", "re8d_wriWWe", "Meadxxrite", "wggte", |
| "VtX", "writ3", "write", "writE", "TTrPte", |
| "wxxidd", |
| }; |
| for (auto _ : state) { |
| for (auto* str : kStrings) { |
| auto result = ParseAccess(str); |
| benchmark::DoNotOptimize(result); |
| } |
| } |
| } // NOLINT(readability/fn_size) |
| |
| BENCHMARK(AccessParser); |
| void AddressSpaceParser(::benchmark::State& state) { |
| const char* kStrings[] = { |
| "44unction", |
| "fSSnctioVV", |
| "Rnc2Rion", |
| "function", |
| "uFc9ion", |
| "funtion", |
| "ROOuHciVn", |
| "imyedate", |
| "l77nnrrediaGe", |
| "im4edi00te", |
| "immediate", |
| "imoodte", |
| "imzzdiae", |
| "m11pediiit", |
| "pixel_lXXcal", |
| "pixII99l55local", |
| "pixaal_lSSrHHYl", |
| "pixel_local", |
| "iHkklocal", |
| "jRRxellgal", |
| "pxel_lobl", |
| "privaje", |
| "rivate", |
| "qvate", |
| "private", |
| "priNNte", |
| "rivtvv", |
| "QQivate", |
| "stffar", |
| "storaje", |
| "sNNwrag8", |
| "storage", |
| "stoage", |
| "srrorage", |
| "Gtorage", |
| "uniforFF", |
| "nifm", |
| "unrrorm", |
| "uniform", |
| "iform", |
| "DnfoJJm", |
| "un8r", |
| "orkgk1u", |
| "worgroup", |
| "Jorkgoup", |
| "workgroup", |
| "workgrcup", |
| "workgroOp", |
| "worttKK_rouvv", |
| }; |
| for (auto _ : state) { |
| for (auto* str : kStrings) { |
| auto result = ParseAddressSpace(str); |
| benchmark::DoNotOptimize(result); |
| } |
| } |
| } // NOLINT(readability/fn_size) |
| |
| BENCHMARK(AddressSpaceParser); |
| void AttributeParser(::benchmark::State& state) { |
| const char* kStrings[] = { |
| "alxxn", |
| "__qiF", |
| "aigqq", |
| "align", |
| "33l6gn", |
| "6QQottgn", |
| "a6ign", |
| "bnOizz66", |
| "bindyyng", |
| "ZiHHnZ", |
| "binding", |
| "4WWndqng", |
| "bOOding", |
| "oinYng", |
| "lend_s", |
| "blendsrF", |
| "blendwrc", |
| "blend_src", |
| "GedKsrff", |
| "KKlqnd_src", |
| "blenmm_s3c", |
| "uiltin", |
| "biltiq", |
| "builtbb", |
| "builtin", |
| "biltin", |
| "buOOltq", |
| "buiTvvtin", |
| "coFFor", |
| "00PfQ", |
| "coloP", |
| "color", |
| "col77s", |
| "colbbCr", |
| "colXXr", |
| "qoCCpuOOe", |
| "copstL", |
| "cXmpute", |
| "compute", |
| "compte", |
| "qopOt", |
| "compu22e", |
| "dyaXX0szzic", |
| "diVVgnitiP", |
| "dagCosnnic", |
| "diagnostic", |
| "agnostqqHHA", |
| "dignostic", |
| "difgnoKKt", |
| "frPggge", |
| "frament", |
| "TTragN4nc", |
| "fragment", |
| "prlgmen77", |
| "fzaNgent", |
| "bragmXXut", |
| "grou", |
| "88uK", |
| "gq9p", |
| "group", |
| "grou11", |
| "22oiip", |
| "ro77p", |
| "Nd", |
| "VVd", |
| "wW11", |
| "id", |
| "ww", |
| "Dd", |
| "K", |
| "ifput_11tPPachmhntrindex", |
| "input_atachment_index", |
| "inputYYattachment_index", |
| "input_attachment_index", |
| "intutVatkkachmenHHindex", |
| "irrput_attachment_index", |
| "isput_attachment_inWWex", |
| "inYerpolat", |
| "iqterLlfte", |
| "invver22uflte", |
| "interpolate", |
| "intrpolae", |
| "interpYlae", |
| "interyoYY77tE", |
| "Mnoodriat", |
| "invMMriat", |
| "invaria55t", |
| "invariant", |
| "Nariant", |
| "invari33n", |
| "invarian3", |
| "lmaIion", |
| "lrcatnKon", |
| "Xatio", |
| "location", |
| "loLLIion", |
| "lcafin", |
| "loUYRtDn", |
| "must_uhe", |
| "msqusuII", |
| "must_usH", |
| "must_use", |
| "vvQQstue", |
| "mus_66s", |
| "m7sO_se", |
| "055DDe", |
| "IIiHe", |
| "sze", |
| "size", |
| "sir", |
| "slze", |
| "JJGz", |
| "yerex", |
| "vrtex", |
| "veBBItex", |
| "vertex", |
| "ver8TTex", |
| "vYnnUUSddex", |
| "xCZ5tex", |
| "workkgroup_sizq", |
| "wiirkgr005psizp", |
| "wornngroIIp_size", |
| "workgroup_size", |
| "ccrkgroupsize", |
| "workgrupKKsz", |
| "workgroup_66ize", |
| }; |
| for (auto _ : state) { |
| for (auto* str : kStrings) { |
| auto result = ParseAttribute(str); |
| benchmark::DoNotOptimize(result); |
| } |
| } |
| } // NOLINT(readability/fn_size) |
| |
| BENCHMARK(AttributeParser); |
| void BuiltinTypeParser(::benchmark::State& state) { |
| const char* kStrings[] = { |
| "__atPmic_copEre_exchaKKge_result_i32", |
| "_atomic_compare_excxxange_result_i32", |
| "__aqomic_compare_exchange_result_i32", |
| "__atomic_compare_exchange_result_i32", |
| "MM_atomic_yyomparerexchange_resulS_i32", |
| "__atomuc_compare_exchange_reslt_i3", |
| "__atomi_compare_exchnS_result_i32", |
| "__atomic_cFFmpare_exchange_result_u52", |
| "__at4zmic_compare_exchange_resurrt_u32", |
| "__atWWic_ompare_exhange_result_u32", |
| "__atomic_compare_exchange_result_u32", |
| "__atomic_comZZare_JXxchange_result_C32", |
| "PP_atomic_compare_exchange_reslt_u32", |
| "__atomic_compare_exchange_resuct_u32", |
| "__frexPP_resul6_abstrllct", |
| "_frexp_result_yybstr99ct", |
| "__frexpJresult_absKKract", |
| "__frexp_result_abstract", |
| "__frexp_reult_abstraxt", |
| "__fexp_esulK_abstyyat", |
| "__frexp_resulV_abkzract", |
| "__fKexp_Sesuqt_f16", |
| "__frexp_result_f6", |
| "__rexp_result_fVV6", |
| "__frexp_result_f16", |
| "__frexpIresulAU_f16", |
| "j_frxp_resulRf16", |
| "_frep44resuYYt_f1", |
| "__frxp_result_f32", |
| "__frex11_rxxsul_f2", |
| "__frccxpmmresulJ_f", |
| "__frexp_result_f32", |
| "__freJJ_result_f32", |
| "_ffDDUxp_resulCClf32", |
| "__frexp_resultgf32", |
| "__frep_result_vecCC_absact", |
| "__frexp_resul_vec2_abstract", |
| "__fIexp_result_vec2_abstr__ct", |
| "__frexp_result_vec2_abstract", |
| "__fexp_result_vN2_aPPstrttct", |
| "__frexp_rddsult_vec2_abstr3ct", |
| "__rexp_result_vecK_ayystract", |
| "__frep_rest_vuuc2_f1", |
| "nn_fre0i_result_vec2_f13", |
| "K_frexp_renvlt_vec2uufCC6", |
| "__frexp_result_vec2_f16", |
| "__rexp_resultllvec2_X16", |
| "__frexpppresult_veo2_f16", |
| "__frepwwresult_vec2_f16", |
| "uu_fgxp_reslt_vec2mmf32", |
| "aa_frexpesmmltvec2_f32", |
| "__TrexRR_result_vecZ_cc32", |
| "__frexp_result_vec2_f32", |
| "__frexp_result_vec8T_fO2", |
| "__frexp_mesult00vec2_f32", |
| "m_frexp_result_vBBc2_f32", |
| "__frep_ppesuM_vec3_abstract", |
| "__fexp_result_vecOO_abstract", |
| "__frexp_rsult_vec3_aGGGtract", |
| "__frexp_result_vec3_abstract", |
| "__frexp_11esult_HHec3_abstract", |
| "__fre6peeresuFF_vec3_abstract", |
| "__fexp_result_vec3_abtract", |
| "__friixp_result_vKc3_f1l", |
| "__rexp_result_vec3_f16", |
| "__fexp99reIIult_vec3_fvv6", |
| "__frexp_result_vec3_f16", |
| "__frexp_result_vc3_f16", |
| "__frexp_rhsult_vec3_f16", |
| "__frexprPllsult_vezz3_f16", |
| "_frexp_rsult_v3_f32", |
| "__frexp_reffulqq_vc3_f32", |
| "_ddreJJp_result_vec3_f32", |
| "__frexp_result_vec3_f32", |
| "__feXXp_result_vec_zz32", |
| "__frexp_result_ve23_32", |
| "__frexp_result_yyeN3_f32", |
| "__frexp_result_vec_abtrOct", |
| "__fEexp_ZesultuveP4_abstract", |
| "22_frxplresult_veee4ddabstract", |
| "__frexp_result_vec4_abstract", |
| "__fexp_resultVVve4_abstrmct", |
| "__frexp_resut1vec4_abIItract", |
| "__frexp_result_vec4_abstrabt", |
| "__frexp_ri7lt_ec4_fz6", |
| "__frexp_resiilt_veo4_f16", |
| "_nfexp_resul_vec4_f16", |
| "__frexp_result_vec4_f16", |
| "__frexprisult_vec4_f1S", |
| "__frep_resul22_vec4_f1", |
| "__Cexp_res7lt_Gec4_f111", |
| "__fre8ff_result_vec4_f32", |
| "__frexp_resultve4_f32", |
| "__frexp_resuJJSS_vec4_f32", |
| "__frexp_result_vec4_f32", |
| "__frep9esult_vec4_f32", |
| "__frexp_JJesulTT_vecbb_f32", |
| "_frexp_res66lt_vec4_32", |
| "__m0df_resutuabstrac66", |
| "__yodf_resWt_abstract", |
| "_modf_reslt_abstract", |
| "__modf_result_abstract", |
| "__modf_result_bstract", |
| "__modf_result_abstrart", |
| "__modB_result2abstract", |
| "__modf_result_BB6", |
| "__modf_rsuRRt_f16", |
| "__VVodf_reLLl0_16", |
| "__modf_result_f16", |
| "__modKK_OOesut_16", |
| "__modf_weggult_f6", |
| "L_modf_respht_f16", |
| "_mKKdf_reEiultf32", |
| "_modf_result_f32", |
| "UU_mdf88result_f2", |
| "__modf_result_f32", |
| "__movvrr_result_f32", |
| "__mowf_mmesult_3", |
| "__m44df_rsultjf32", |
| "__modf_result_vXc2_abstract", |
| "__modf_result_vec2_8bstract", |
| "__modf_resvvlt_veEE2_abstrct", |
| "__modf_result_vec2_abstract", |
| "_modf_res99lt_vec2_zzbstrac", |
| "__GGQodf_rJJsult_vec2Aabstract", |
| "__modf_result_vec2_abstrasst", |
| "__modfPresult_vKc2_f16", |
| "__mottfresult_vppc_f16", |
| "__modf_rsult_ec2_f16", |
| "__modf_result_vec2_f16", |
| "__moMMf_result_vec2_f16", |
| "__modf_JJesult_0ec2_f16", |
| "__odf_resu8Vvec2f16", |
| "__modfKrggsult_vec2_fhh2", |
| "__modf_result_vec2_ff2", |
| "__Qodf_re77ult_vec2_f32", |
| "__modf_result_vec2_f32", |
| "__modf_resultYYvc2_f32", |
| "__mofkresult_vecS_f32", |
| "__modf_resut_en2_f322", |
| "__modf_result_vec_abtraFFt", |
| "_GGmodf_Iesult_vecPP_abstUUact", |
| "__mofarFsvlt_vec3_EEbstract", |
| "__modf_result_vec3_abstract", |
| "__eodf_resuldd_vec3_DDbstrBBt", |
| "EE_modf_result_v55c3Mccbstrac", |
| "__mofKKresultvvec3_bsract", |
| "__modf_resuRt_vec3_f16", |
| "__moDf_resu9t_vec3f16", |
| "__modf_result_vc3_f16", |
| "__modf_result_vec3_f16", |
| "aa_modf_rsult_Iec3_f1", |
| "__m77df_result_vec3_f16", |
| "__modI_result_vec3_f16", |
| "__modf_result_vec_f32", |
| "__modf_reult_vec3_f32", |
| "__modf_rsult_vec3_f2", |
| "__modf_result_vec3_f32", |
| "__m33df_reXXulc_vec3_f32", |
| "__modf_resultveE3_f32", |
| "__modf_result_vecXXf32", |
| "__modf_resultxxvBc4_abstract", |
| "__mWdf_resultvec_abstracG", |
| "__modf_re66ult_vec4_abstract", |
| "__modf_result_vec4_abstract", |
| "TT_modfresult_vec4a0stvact", |
| "_mof_result_kec4bstract", |
| "__modf_resultec4_abstrppct", |
| "__modf_reult11ec4_f16", |
| "__moEf_resuyt_veJ4_fBB6", |
| "__xodf_resuqt_vIIc4mf16", |
| "__modf_result_vec4_f16", |
| "__modf_rsult_Fec4_f16", |
| "__modfresult_vec4_f16", |
| "__DodHH_hesult_vec4_f16", |
| "__mHfreslt_ve224_f32", |
| "__mdf_reslt_vec4_f32", |
| "__modf_rsult_vec4_f32", |
| "__modf_result_vec4_f32", |
| "__mdf_result_vec4_f32", |
| "__modf_result_vec4_fdd2", |
| "__modf_result_OPc4_f32", |
| "brrB", |
| "a00ay", |
| "hrray", |
| "array", |
| "rragY", |
| "arOay", |
| "hry", |
| "EEfpmic", |
| "aomvc", |
| "tomzzc", |
| "atomic", |
| "atomi", |
| "OiiJom", |
| "aGomif", |
| "biTTding_a22ray", |
| "bindingldrray", |
| "bbnding_array", |
| "binding_array", |
| "bBBndig_array", |
| "PPIIndXnS_array", |
| "binding_arjjay", |
| "_occl", |
| "zz6xSl", |
| "G", |
| "bool", |
| "v4ox", |
| "boAA0", |
| "yye", |
| "WWb6", |
| "MMtt6", |
| "J", |
| "f16", |
| "FHSl", |
| "f104", |
| "fVVX", |
| "oV2", |
| "f3", |
| "fK2", |
| "f32", |
| "", |
| "3a", |
| "O2", |
| "G", |
| "i2", |
| "99R32", |
| "i32", |
| "32", |
| "YYvXR", |
| "2", |
| "XX", |
| "", |
| "cpp", |
| "i8", |
| "iv", |
| "SEE", |
| "", |
| "nput__ttaamet", |
| "input_wwttacment", |
| "inpddt_at99achment", |
| "input_attachment", |
| "99nPPt_attachent", |
| "input_attacKKmet", |
| "npuDDo_attachMent", |
| "a2Bi", |
| "mqx2", |
| "mLL200", |
| "mat2x2", |
| "mntvvx66", |
| "nrrtx2", |
| "etxxx2", |
| "mOtNNx2CC", |
| "ma2x2", |
| "atebb", |
| "mat2x2f", |
| "mat2x2J", |
| "mtxuf", |
| "Aat2xESf", |
| "mat2x0h", |
| "maaa2x2h", |
| "maqmmx2", |
| "mat2x2h", |
| "mt2x2h", |
| "mUUx2E", |
| "mDDtK2h", |
| "__at2t3", |
| "Apx3", |
| "matMx", |
| "mat2x3", |
| "maBB2x3", |
| "99nbbx3", |
| "AAEEt2x", |
| "m5662xTf", |
| "Hat2x3f", |
| "xxHtx3f", |
| "mat2x3f", |
| "mnyt2z3f", |
| "mt2x3f", |
| "makH3f", |
| "mat2ch", |
| "mrrx3oo", |
| "mJJx3h", |
| "mat2x3h", |
| "CCa203h", |
| "mAxFx99h", |
| "matcx3h", |
| "Sat2x4", |
| "mBBtox", |
| "ma2x4", |
| "mat2x4", |
| "mmaex4", |
| "mQPP2ggo", |
| "aB", |
| "mlKKN4f", |
| "marrx4", |
| "atrpx4f", |
| "mat2x4f", |
| "yPat2x4f", |
| "maZ2cc4", |
| "t2x4f", |
| "ma002x4h", |
| "msst24BJP", |
| "ffawwxJJh", |
| "mat2x4h", |
| "maXXI4h", |
| "2h", |
| "ma2x4h", |
| "mKKt3x", |
| "m4a3x2", |
| "pat3o2", |
| "mat3x2", |
| "jNtHHxhh", |
| "mww333EUU", |
| "muu32", |
| "Kaddxrrf", |
| "2tt3PP2r", |
| "m1twwx2f", |
| "mat3x2f", |
| "mat3xc1nn", |
| "at3x2f", |
| "ma3x2f", |
| "6SSaaIx2h", |
| "matx2EE", |
| "IcatVR2h", |
| "mat3x2h", |
| "m3x9h", |
| "aaht32h", |
| "mLtSx2h", |
| "mmtfx", |
| "mV3qm", |
| "__tx3", |
| "mat3x3", |
| "mQtx", |
| "EaddxRR", |
| "at3x9", |
| "at3C0", |
| "t3x3z", |
| "ccat3x3f", |
| "mat3x3f", |
| "at3x3Q_", |
| "matt3f", |
| "CCzzt333pEf", |
| "mat3hhddh", |
| "66t3x77h", |
| "mat3xPh", |
| "mat3x3h", |
| "matwx3h", |
| "uux3h", |
| "6at3XX3h", |
| "RRx4", |
| "VVt3", |
| "GGaHH3x4", |
| "mat3x4", |
| "MFFt374", |
| "mat34", |
| "ggatx", |
| "Pa1K3Q4_", |
| "matx4E", |
| "maM4f", |
| "mat3x4f", |
| "maG77S3xX", |
| "FFtt3xKf", |
| "mZZt3Uss4f", |
| "mat34h", |
| "mat3x4l", |
| "mht3x4h", |
| "mat3x4h", |
| "mKtTTxk", |
| "ma3xwwh", |
| "mt3x4Kjj", |
| "mtxYY", |
| "EEIt4c", |
| "mat4xQQ", |
| "mat4x2", |
| "Paxl", |
| "mtffHx2", |
| "mat4xn", |
| "matg26F", |
| "mhss8x2f", |
| "llFa4x2f", |
| "mat4x2f", |
| "2atjx0f", |
| "matgx2f", |
| "mat4xe", |
| "maff4xh", |
| "atxh", |
| "matx2h", |
| "mat4x2h", |
| "qqt4x2h", |
| "AA42h", |
| "matx2v", |
| "matjx3", |
| "mat4ZZ3", |
| "UPPt4II2", |
| "mat4x3", |
| "maZZ4x3", |
| "mat4xnn", |
| "ZZakkH223", |
| "mat43f", |
| "ma4xR", |
| "mat4xqq9f", |
| "mat4x3f", |
| "mat4773f", |
| "matx3", |
| "uut4xccf", |
| "m1tRR3h", |
| "mat4llJh", |
| "MMatI", |
| "mat4x3h", |
| "7T6t4x3", |
| "mat4xQQJ", |
| "uu4x3h", |
| "mat4", |
| "maq33", |
| "mxxt4x4", |
| "mat4x4", |
| "mNrr", |
| "ma94x4", |
| "ma4x4", |
| "alHx4f", |
| "_ax4f", |
| "mat44f", |
| "mat4x4f", |
| "mt4j4f", |
| "mmmt4EEttf", |
| "matxf", |
| "mrr4x4h", |
| "maxx4h", |
| "zzt4x4", |
| "mat4x4h", |
| "mat4x4e", |
| "au4pZ4h", |
| "muuTT4x00", |
| "vv", |
| "ptQ", |
| "tR", |
| "ptr", |
| "p", |
| "ptMM", |
| "ptC", |
| "samQQPPer", |
| "suDDmplxxr", |
| "YYlqamdpler", |
| "sampler", |
| "amFFle__", |
| "rrGGNNler", |
| "samMler", |
| "samlr_cmparison", |
| "sampler_comparqxon", |
| "sampler_comprison", |
| "sampler_comparison", |
| "sapler_comparis44n", |
| "sampler_WWomparGson", |
| "sampler_compajjson", |
| "sjjbgroup_matrix_left", |
| "subgrojp_matrix_l1t", |
| "subgrop_matrix_left", |
| "subgroup_matrix_left", |
| "subg99oup_matrix_left", |
| "subgroup_mayrix_lVVft", |
| "subgroup_matiZZ_lext", |
| "sugr33uvv_matrix_result", |
| "ssbgroup_9atrix_result", |
| "suFgroup_matrixresult", |
| "subgroup_matrix_result", |
| "ubgroup_matrix_eesuuut", |
| "sKKbgrou_mItrx_result", |
| "subgroup_aJrix_result", |
| "subgroupCCmatrixXXrighSS", |
| "subZZr66uWW_maJrix_right", |
| "summgropmadrix_5ight", |
| "subgroup_matrix_right", |
| "subUoup_matrBBx_riBBht", |
| "subgJJoup_mat110x_right", |
| "subgroup_matrix_rfgttt", |
| "texelbufftt", |
| "texel_buLwer", |
| "texel_bu1fer", |
| "texel_buffer", |
| "tewwel_buffer", |
| "teelbuffer", |
| "texel_bffer", |
| "textNNre_1d", |
| "tex__uleRUU1d", |
| "texHure_1d", |
| "texture_1d", |
| "teCCturr_1d", |
| "textre_1d", |
| "textupd_1d", |
| "textre_2d", |
| "textLN_d", |
| "tet_d", |
| "texture_2d", |
| "teqqtuxRR_GGd", |
| "texturS_GGd", |
| "88tucce_2d", |
| "texture_2d_arra", |
| "texture_2dpparty", |
| "te55tureFF02d_aqqray", |
| "texture_2d_array", |
| "texure_2d_array", |
| "texture_2d_ary", |
| "texure_2dOarray", |
| "textuHHe_3", |
| "66extureSS3O", |
| "tTTturddY_3d", |
| "texture_3d", |
| "textursg3d", |
| "texture_3GG", |
| "tIxtllOQQ_3d", |
| "txture_cube", |
| "texture_crrbe", |
| "teyytue_cub7", |
| "texture_cube", |
| "tBBxWur22_cube", |
| "yyexture_cubV", |
| "texturec4", |
| "texture_cudde_array", |
| "textu2e_cVVbz_rray", |
| "texture_cubeyyarray", |
| "texture_cube_array", |
| "texture_cAb___array", |
| "texture_cube_arhhay", |
| "teture_cube_arvvy", |
| "txture_dept_2d", |
| "texNNure_gesth_ood", |
| "emmtre_ZZepth_2d", |
| "texture_depth_2d", |
| "texture_dkt_2d", |
| "teRtue_ffepth_2d", |
| "terrztuWdepth_2d", |
| "texture_dept_2d_Rrray", |
| "texture_dS88ptM_2d_array", |
| "bbexurR_depth_2d_PPrray", |
| "texture_depth_2d_array", |
| "texturexxWWeth_2d_array", |
| "texture_dAAvth_2d_array", |
| "textujje_de44th_2d_Xrray", |
| "textufe_depth_cube", |
| "textureAAUepth_cOOe", |
| "tuxtre_ssepth_cue", |
| "texture_depth_cube", |
| "bbexture_sFFpth_cube", |
| "texture_nnepth_cubYY", |
| "teture_depth_cubss", |
| "textre_dzzpthqcube_array", |
| "texuQedepth_cube_aNNray", |
| "textukke_eptpp_cubearray", |
| "texture_depth_cube_array", |
| "texturL_depth_cusse_arraJ", |
| "texture5ffepth_cubeJa77TTay", |
| "textur00_dpxh_cube_array", |
| "exture_depth_Aulti1ampled_2d", |
| "texturedepth_multisampled_2d", |
| "textQQre_depth_multisamled_2d", |
| "texture_depth_multisampled_2d", |
| "iiexture_depthwultiampled_2d", |
| "texture_depth_mwwltisampled_2d", |
| "teYYturh_deptJJ_multisampled_2d", |
| "texture_RRxkEnal", |
| "texture_exteknauu", |
| "textrRtexternal", |
| "texture_external", |
| "IIeNtre_external", |
| "texture_exIernal", |
| "Eiixture_externl", |
| "texture_multsssample_2d", |
| "txture_mCCltXsa55pled_2d", |
| "9exture_multisampled_2d", |
| "texture_multisampled_2d", |
| "exture_mltisampled_Xd", |
| "tetIIre_mltisampled_2d", |
| "texzure_multisampled_2d", |
| "tAAxtur22_zztorae_1d", |
| "texture_storag_1d", |
| "texturbb_strageFd", |
| "texture_storage_1d", |
| "teVture_stMMrage_1d", |
| "textuwe_storacmzz_1d", |
| "textuQQOO_storag1d", |
| "texbure_storage_2d", |
| "nne5kture_torage_2C", |
| "textue_KKtorarreyy2d", |
| "texture_storage_2d", |
| "tTxtue_ttorageAA2d", |
| "QQexture_sorage_2d", |
| "texture_t8rage_d", |
| "texture_storag_2d_aaray", |
| "exteccre_storage_bd_array", |
| "txture_storage_dLLaPPray", |
| "texture_storage_2d_array", |
| "texWWUr_storag_2d_array", |
| "texzzure_stoage_2d_array", |
| "textNre_stoage_2__rray", |
| "texture_storagea3d", |
| "texre_stoBage_3d", |
| "zzexture_torge_3d", |
| "texture_storage_3d", |
| "textureUaatorbge_HHd", |
| "te4ture_sOorg_3d", |
| "texGGme_storage_3d", |
| "u3", |
| "8Gzz2", |
| "u3", |
| "u32", |
| "uAAx", |
| "ubb32", |
| "u3jj", |
| "cqJx", |
| "", |
| "A", |
| "u8", |
| "cc8", |
| "BU", |
| "BAA", |
| "vxc2", |
| "Ue8", |
| "vUICB8", |
| "vec2", |
| "vec__", |
| "ecUU", |
| "vec", |
| "vrruc27", |
| "ve2kk", |
| "vel2f", |
| "vec2f", |
| "vecf", |
| "YYc3f", |
| "44ec2f", |
| "Rc2h", |
| "88ePPr2h", |
| "ec2J", |
| "vec2h", |
| "cVt", |
| "vech", |
| "ec2", |
| "331i", |
| "uuci", |
| "4e02i", |
| "vec2i", |
| "v3ri", |
| "veYY2g", |
| "ve2i", |
| "rCCcu", |
| "lecu", |
| "vec2ZZ", |
| "vec2u", |
| "tqm9MMu", |
| "veUu", |
| "vgc77n", |
| "dddd", |
| "aaecE", |
| "vIIc3", |
| "vec3", |
| "ZllRR3", |
| "kNNecrr", |
| "e3", |
| "vc3f", |
| "veca", |
| "HHec3G", |
| "vec3f", |
| "cc3f", |
| "vB22nllf", |
| "vec35", |
| "eR3h", |
| "gec3h", |
| "ve3h", |
| "vec3h", |
| "vecph", |
| "vecK99h", |
| "22Rch", |
| "vecnn", |
| "veeENi", |
| "fHHec3i", |
| "vec3i", |
| "ss226i", |
| "em0i", |
| "vecNp", |
| "ve63", |
| "oZWWV3u", |
| "vHHu", |
| "vec3u", |
| "vAcu", |
| "vTu", |
| "2ec3u", |
| "vec4W", |
| "8eZ", |
| "FRc", |
| "vec4", |
| "bbc4", |
| "gce", |
| "ech", |
| "vZqNN", |
| "v9f", |
| "ccHMMf", |
| "vec4f", |
| "v4x", |
| "veXX", |
| "4f", |
| "veh", |
| "vecgg4h", |
| "rfe4h", |
| "vec4h", |
| "ve4h", |
| "vggc4D", |
| "v994Q", |
| "eeei", |
| "veci", |
| "vc4II", |
| "vec4i", |
| "veqi", |
| "Ooc77i", |
| "vrrDD", |
| "vecju", |
| "11ciiFu", |
| "jBcRRu", |
| "vec4u", |
| "vdAc_7u", |
| "4jj", |
| "xxkeo", |
| }; |
| 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[] = { |
| "barycentriW_coord", |
| "bary1IQQtric_coord", |
| "baryceItric_cood", |
| "barycentric_coord", |
| "barcentric_coojd", |
| "ar7cntric_coor22", |
| "bEErccentrKg_collrd", |
| "clip_distance", |
| "5p_distances", |
| "c66_di88tances", |
| "clip_distances", |
| "alip_itanceE", |
| "clip_dEstnces", |
| "cliQ_dqsthes", |
| "frag_dpth", |
| "frag_th", |
| "frag_dept", |
| "frag_depth", |
| "frag_depeeBTh", |
| "fag_1nnpth", |
| "frag_nepth", |
| "frBmcct_fXcing", |
| "fron7tt_fcGng", |
| "frontcing", |
| "front_facing", |
| "fronK_fcing", |
| "jjrontfaniFFg", |
| "8rEEn_fcig", |
| "global_invocatvon_DD", |
| "goobal_inhhcation_i55S", |
| "global_invocatiun_Zd", |
| "global_invocation_id", |
| "glPPbal_invoc755ion_id", |
| "global_invocSion_kkd", |
| "gFobEEl_iSvocatio__id", |
| "nstayye_indebb", |
| "nRtanc_index", |
| "iTstan1e_indx", |
| "instance_index", |
| "XsTancX_inex", |
| "instance_in00x", |
| "insPance77index", |
| "locap_invcZtion_id", |
| "lbcl_iPwvocation_id", |
| "lHHcabb_i8vocsjjtion_id", |
| "local_invocation_id", |
| "local_invocatihn_id", |
| "lcal_invocxxtion_", |
| "rroclQinvocatieB_id", |
| "locaJJ_invocation_index", |
| "loal_ivvocaiow_undex", |
| "locatt_Znvocatio_indexx", |
| "local_invocation_index", |
| "local_iv99ocation_index", |
| "lcal_ivocatin_indx", |
| "locnffl_invocation_index", |
| "num_workgrou5s", |
| "nuIJworkUrouus", |
| "num_worgroups", |
| "num_workgroups", |
| "ntm_workgroFps", |
| "num_workgr1ups", |
| "nAAm_woDDkgroups", |
| "OostoP", |
| "positon", |
| "posit77on", |
| "position", |
| "AAUUs1timm", |
| "XosAftion", |
| "posVVvvn", |
| "pprimitive_id", |
| "primitiTTe_id", |
| "krimijjive_i00", |
| "primitive_id", |
| "primtive_id", |
| "rimitiveyyid", |
| "prYYzztive_id", |
| "siWmple_Wndex", |
| "6a70UU_index", |
| "sale_indUUx", |
| "sample_index", |
| "samlTTinhex", |
| "smple_i5dex", |
| "saple_i1e", |
| "sammmleI44ask", |
| "saRpleYYDDsk", |
| "sample_jjask", |
| "sample_mask", |
| "sample_ask", |
| "sampe_QQask", |
| "samplH_ms55", |
| "suxFgroup_ik", |
| "sugDuprid", |
| "sNbgrou_KKid", |
| "subgroup_id", |
| "suxarTup_id", |
| "subgrouvv_id", |
| "sjjbgroup_d", |
| "subgrnnOOp_invocatin_id", |
| "subgroup_invggOOtOon_id", |
| "suQQgrup_invocatioww_id", |
| "subgroup_invocation_id", |
| "subgrup_iJvocation_id", |
| "subgroup_iDvocation_id", |
| "subgroOOp_invocationid", |
| "subgrou_size", |
| "00ubgroup_ze", |
| "sulgroup_ze", |
| "subgroup_size", |
| "subgrEup_size", |
| "subgroupiisie", |
| "subgsoup_siz", |
| "vertettins2ex", |
| "versii_index", |
| "vetex_index", |
| "vertex_index", |
| "veteuindeoo", |
| "verHHx_JUdx", |
| "vrtyg_ihdggx", |
| "wrgroWWp_iBB", |
| "workgroupECEcc", |
| "woGkgrouee_yy", |
| "workgroup_id", |
| "wo44kgUup_id", |
| "workgroup_i", |
| "workgNoup_id", |
| }; |
| for (auto _ : state) { |
| for (auto* str : kStrings) { |
| auto result = ParseBuiltinValue(str); |
| benchmark::DoNotOptimize(result); |
| } |
| } |
| } // NOLINT(readability/fn_size) |
| |
| BENCHMARK(BuiltinValueParser); |
| void InterpolationSamplingParser(::benchmark::State& state) { |
| const char* kStrings[] = { |
| "MMentess", "DentCr", "gTeYter", "center", "centjjr", "cDDte", "cEEMM9er", |
| "entrNid", "55entroid", "centQoid", "centroid", "cntroinn", "FFenrWWd", "centro66w", |
| "evFher", "itWWr", "ethr", "either", "5hK", "eit4er", "gtnnPr", |
| "Sist", "ir22V", "fprst", "first", "f9VV9s2", "nt", "Bs", |
| "8BBml", "AyACCple", "sipBv", "sample", "A4QQmle", "ZZmplT4", "Xamlle", |
| }; |
| 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[] = { |
| "fadd", "dd", "fi1", "flat", "vGG", "jja", |
| "fwat", "Xinnar", "ji9ear", "lier", "linear", "lin2WWr", |
| "linar", "lneVr", "lers4ectzzve", "ersecti__Y", "perspMctkHve", "perspective", |
| "peIzzpecDive", "ersdeqtive", "persehtive", |
| }; |
| 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[] = { |
| "bNra8uMMFlm", "gra8norm", "g9x8unrA", |
| "bgra8unorm", "bgraVVnnrm", "bKra8urm", |
| "bgra8nCBBm", "16floot", "EE1f88occww", |
| "r6fbboat", "r16float", "r166loat", |
| "K1ggoa", "r16fE1at", "r16sit", |
| "rpH6int", "raa6sinqq", "r16sint", |
| "r16sn", "rxxxxXsi_", "r16SSzznt", |
| "r16sorm", "1o4orm", "r16snr", |
| "r16snorm", "rKsnrm", "rzz6sncm", |
| "r88an5ggm", "r1jjsint", "riA6uin1", |
| "rlVVu66nt", "r16uint", "6uic", |
| "r16GGnht", "iiyy6int", "rv_QQunttm", |
| "r6uoLLm", "r16Wno7m", "r16unorm", |
| "6uvvoFr", "ryyunzzrm", "runorm", |
| "I32Rco_t", "r32fddat", "M3l22oa", |
| "r32float", "O32float", "KK6TTflmat", |
| "rRR2lo", "r3s04", "rnsiqq", |
| "r3BBsint", "r32sint", "rWB22aint", |
| "rjj2sint", "66tinHH", "r3JJut", |
| "rttoouiSt", "2r_SSnt", "r32uint", |
| "rWW2uint", "r32uink", "r3bbitt", |
| "_1sin", "r8sft", "ii8ink", |
| "r8sint", "rwsiUt", "I8nnt", |
| "448s8LLnt", "r8snoZZm", "MM8snorm", |
| "r8norm", "r8snorm", "rSSMMn6Am", |
| "GGgxnorTT", "r8snorI", "l8uint", |
| "r8OOn", "r8u5n", "r8uint", |
| "r8zRint", "r8uiPLL", "ruihht", |
| "runorm", "8unjm", "r8BB0", |
| "r8unorm", "xxL8nrm", "rIIunorMM", |
| "r8XnFFm", "r1ssb10uflpazz", "rZZ11b1Frufloat", |
| "rrr001b1jfloat", "rg11b10ufloat", "rgp1b1rrfloaww", |
| "QQZ1b10ufloa", "rg__hb1nfloat", "rw16loat", |
| "rg16floa3", "rg1ifoXXt", "rg16float", |
| "rg16l3", "c8O6fvvoat", "rg16vlPaj", |
| "Nguspni", "r21sint", "qJg1siDt", |
| "rg16sint", "rg6miQt", "rJ16int", |
| "rg1sWWnt", "wQg16ggnwrm", "rg1zsnorm", |
| "rWW6snzzrm", "rg16snorm", "rg6sno", |
| "rKUU6snr99q", "EEg16sRRom", "r1uint", |
| "rg16uttt", "rg1MMin", "rg16uint", |
| "raaKKTBBint", "l5516uIIn", "rg16wBBoo", |
| "PPg1__unorm", "rg16RRnorm", "rghSom", |
| "rg16unorm", "Q1urm", "r6un8HHrm", |
| "rD16unYYrm", "rg32floOt", "r8II2ZJoat", |
| "rgoYfloat", "rg32float", "rg2floa0X", |
| "rcKn2floSt", "GGg3233la88", "XXg3233qint", |
| "gzzs4nt", "rgtW2siWhh", "rg32sint", |
| "xg2srnt", "rz3eeQnt", "rg32sYr", |
| "xxgm2uinS", "rg3ruit", "rgyy2uit", |
| "rg32uint", "r82i8t", "rge2uint", |
| "hkkg3uint", "rgBBsOOt", "rg89it", |
| "gg8Dint", "rg8sint", "ag8inn1", |
| "qgSiIt", "rgsinYY", "rYYsnLVVm", |
| "m62s8snorI", "r8snorjj", "rg8snorm", |
| "ppgsn7", "Ng8sno6m", "rg8snorsgg", |
| "g8uint", "JgOOuqnt", "rg00uinMM", |
| "rg8uint", "rMM8ummnt", "rH8uqqt", |
| "gGuin88", "gRRuwworm", "rgqunorm", |
| "gUuom", "rg8unorm", "g8uBo5MQ", |
| "33g8unorm", "Og8uno33m", "gb0awuint", |
| "rb_1Aa2uMnkk", "rgb102uint", "rgb10a2uint", |
| "db1auint", "rXXb10a25iww55", "rb10a2uint", |
| "rgb12unorm", "dgb1JJ2norm", "rgb1a2un1r_", |
| "rgb10a2unorm", "rgb0a2Lnor", "99b10a2unrGG", |
| "xxgb102UUnom", "9gba16flot", "rvba16float", |
| "LLgba1622loat", "rgba16float", "rgabf1loat", |
| "rgbaAA6floa", "CUa16flo", "zzgba16swnt", |
| "nwwba16siMMVV", "Xgba16NNit", "rgba16sint", |
| "rgba1W77eent", "vvgba16RP33nt", "22gba16sjjnt", |
| "rgbaAA6snom", "kkba1NsRRorm", "rQQba16snorm", |
| "rgba16snorm", "rgb16suuorm", "uuba16snrm", |
| "rga1snorZ", "rgHa16unt", "rgdSSS16uint", |
| "rgba16uTTnt", "rgba16uint", "rmb16ctnt", |
| "rgba16uhhnt", "rgba16uiG", "HHgbaww6unAArbb", |
| "rgba1BBunorm", "rgbM2hunogm", "rgba16unorm", |
| "rgba1unorWW", "rgbqq16unorm", "rgbar6unUUm", |
| "rgba32Eoat", "rgRa32floVVrr", "rg33OGG3Hflot", |
| "rgba32float", "55g32Dloat", "rSSbB32floQt", |
| "zzgba32lat", "rb662siAAt", "wgba__2nt", |
| "rgba32sit", "rgba32sint", "rga32sirt", |
| "rgbRR3Gsint", "KxUbLL31sint", "rgba32NNWWFt", |
| "gbfGUuint", "rgba3FFE6nt", "rgba32uint", |
| "rgba39yyJTTnt", "zgba32uit", "rb32uinI", |
| "rapin", "ttga8nnint", "igbK8sint", |
| "rgba8sint", "rgba8seent", "rg_8si11gg", |
| "rgba8snt", "rgba8orm", "rpbX8no", |
| "rgYY6sssnor", "rgba8snorm", "r77ba8YnIrm", |
| "rgbaSSeenonG", "rgbQlnorm", "gba8int", |
| "rgba__uint", "rDDba8uin", "rgba8uint", |
| "rga8int", "551baluint", "rgbc4int", |
| "gba8unorm", "rgOa811no6m", "rgaunosm", |
| "rgba8unorm", "rgba8unXrm", "rg44w8unorm", |
| "rgba8YYnorm", |
| }; |
| for (auto _ : state) { |
| for (auto* str : kStrings) { |
| auto result = ParseTexelFormat(str); |
| benchmark::DoNotOptimize(result); |
| } |
| } |
| } // NOLINT(readability/fn_size) |
| |
| BENCHMARK(TexelFormatParser); |
| |
| } // namespace |
| } // namespace tint::core |