blob: 0d5017b0fc3b4a87ec33d25648b7320169190ee6 [file] [log] [blame] [edit]
// Copyright 2022 The Tint Authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
////////////////////////////////////////////////////////////////////////////////
// File generated by tools/src/cmd/gen
// using the template:
// src/tint/type/short_name_bench.cc.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
#include "src/tint/type/short_name.h"
#include <array>
#include "benchmark/benchmark.h"
namespace tint::type {
namespace {
void ShortNameParser(::benchmark::State& state) {
std::array kStrings{
"at2x2cc", "l23f", "matVx2f", "mat2x2f", "mat212f", "mqtJx2f",
"mat2x27ll", "ppqqt22HH", "macv", "bt2xGh", "mat2x2h", "mat2iivh",
"8WWt2x2h", "mxx2x2h", "mX2x3gg", "a2xXf", "mat233f", "mat2x3f",
"Eat2x3f", "mPTT2x3f", "mat2xdxx", "m44t2x3h", "maSS2xVVh", "RatR22h",
"mat2x3h", "mF2x9h", "matx3h", "VOORRH3h", "ma2xyf", "llnarr2774f",
"mat24400", "mat2x4f", "a2oof", "zz2x4f", "miitppx1", "mat2xXXh",
"9II5ann2x4h", "mataSSrHHYh", "mat2x4h", "makkh", "jatgRx", "mb2x4",
"mat3xjf", "at3x2f", "q3x2f", "mat3x2f", "matNN2f", "at32vv",
"QQt3x2f", "maffxr", "mat3xjh", "mNNw3x28", "mat3x2h", "matx2h",
"mrrt3x2h", "Gat3x2h", "mat3x3FF", "at3f", "marrx3f", "mat3x3f",
"t3x3f", "Da3xJJf", "ma83", "m11k3", "matx3h", "maJx3h",
"mat3x3h", "mat3c3h", "mat3x3O", "KK_atvvtt3h", "xx83x4f", "__qatF4",
"matqx4f", "mat3x4f", "33atOx4f", "mtt63x9oQQ", "ma3x66f", "mtOxzz66",
"mat3yy4h", "ZaHH4Z", "mat3x4h", "4WWt3q4h", "mOO3x4h", "oatY4h",
"matx", "ma4xFf", "at4x2w", "mat4x2f", "fGtxKf", "matqKx2f",
"matmmxFf", "at4x2h", "mt4x2q", "mat4xbb", "mat4x2h", "mi4x2h",
"maOO4xq", "matTvvx2h", "maFF4x3f", "Pa00xQf", "mPt4x3f", "mat4x3f",
"ma774xss", "RRCbb4x3f", "mXXt4x3f", "qaCC4xOOh", "ma4s3L", "mXt4x3h",
"mat4x3h", "mat43h", "qa4O3", "mat4x22h", "myzz40XX", "matVViP",
"mannC4f", "mat4x4f", "atx4AHHq", "mat4x4", "fatK4f", "ltgg4h",
"mat4xh", "NTTtcx4h", "mat4x4h", "ma7ppl4h", "mNNt4xg", "uub4XX4h",
"vec2", "882K", "vq9f", "vec2f", "vec211", "22ciif",
"ec77f", "NN22h", "vVVc2h", "WW11w2h", "vec2h", "vcwwh",
"vDc2h", "vecK", "f11r2PP", "ve2i", "vec2YY", "vec2i",
"vkktHH", "rrec2i", "vWWssi", "veYu", "eq2f", "u22ec2u",
"vec2u", "c2u", "vec2", "vYyc27E", "veMof", "ve3MM",
"55ec3f", "vec3f", "N3f", "ve33f", "3ec3f", "mecI",
"vrnK3h", "v3", "vec3h", "ILLch", "ecf", "UecRY",
"vechi", "qeIIu", "Hec3i", "vec3i", "eQQvv", "e66i",
"7Wc3", "ve055DD", "IIec3u", "vec3", "vec3u", "rec3",
"lec3u", "GeJ3u", "ey4f", "vc4f", "IIeBB4f", "vec4f",
"TTec338", "veUUSS4nnd", "vZx5CC", "kkec4q", "v005ih", "vnIIc4h",
"vec4h", "cceW", "cKK", "vec66h", "vePPK", "vexxi",
"qec4i", "vec4i", "veSyMMr", "v4u", "ec", "5eFF4u",
"rrecz44", "vWW", "vec4u", "XJecCZZ", "vePP4", "vec4c",
};
for (auto _ : state) {
for (auto& str : kStrings) {
auto result = ParseShortName(str);
benchmark::DoNotOptimize(result);
}
}
}
BENCHMARK(ShortNameParser);
} // namespace
} // namespace tint::type