blob: 5c6841f08b3fa871267615d0fde7caca2db9fb53 [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.h.tmpl
//
// Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////
#ifndef SRC_TINT_TYPE_SHORT_NAME_H_
#define SRC_TINT_TYPE_SHORT_NAME_H_
#include <ostream>
namespace tint::type {
/// An enumerator of builtin type aliases.
enum class ShortName {
kUndefined,
kMat2X2F,
kMat2X2H,
kMat2X3F,
kMat2X3H,
kMat2X4F,
kMat2X4H,
kMat3X2F,
kMat3X2H,
kMat3X3F,
kMat3X3H,
kMat3X4F,
kMat3X4H,
kMat4X2F,
kMat4X2H,
kMat4X3F,
kMat4X3H,
kMat4X4F,
kMat4X4H,
kVec2F,
kVec2H,
kVec2I,
kVec2U,
kVec3F,
kVec3H,
kVec3I,
kVec3U,
kVec4F,
kVec4H,
kVec4I,
kVec4U,
};
/// @param out the std::ostream to write to
/// @param value the ShortName
/// @returns `out` so calls can be chained
std::ostream& operator<<(std::ostream& out, ShortName value);
/// ParseShortName parses a ShortName from a string.
/// @param str the string to parse
/// @returns the parsed enum, or ShortName::kUndefined if the string could not be parsed.
ShortName ParseShortName(std::string_view str);
constexpr const char* kShortNameStrings[] = {
"mat2x2f", "mat2x2h", "mat2x3f", "mat2x3h", "mat2x4f", "mat2x4h", "mat3x2f", "mat3x2h",
"mat3x3f", "mat3x3h", "mat3x4f", "mat3x4h", "mat4x2f", "mat4x2h", "mat4x3f", "mat4x3h",
"mat4x4f", "mat4x4h", "vec2f", "vec2h", "vec2i", "vec2u", "vec3f", "vec3h",
"vec3i", "vec3u", "vec4f", "vec4h", "vec4i", "vec4u",
};
} // namespace tint::type
#endif // SRC_TINT_TYPE_SHORT_NAME_H_