// Copyright 2021 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/lang/core/intrinsic/ctor_conv.cc.tmpl
//
// To regenerate run: './tools/run gen'
//
//                       Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////

// clang-format off

#include "src/tint/lang/core/intrinsic/ctor_conv.h"

namespace tint::core::intrinsic {

const char* str(CtorConv i) {
    switch (i) {
        case CtorConv::kNone:
            return "<none>";
        case CtorConv::kI32:
            return "i32";
        case CtorConv::kU32:
            return "u32";
        case CtorConv::kF32:
            return "f32";
        case CtorConv::kF16:
            return "f16";
        case CtorConv::kBool:
            return "bool";
        case CtorConv::kVec2:
            return "vec2";
        case CtorConv::kVec3:
            return "vec3";
        case CtorConv::kVec4:
            return "vec4";
        case CtorConv::kMat2x2:
            return "mat2x2";
        case CtorConv::kMat2x3:
            return "mat2x3";
        case CtorConv::kMat2x4:
            return "mat2x4";
        case CtorConv::kMat3x2:
            return "mat3x2";
        case CtorConv::kMat3x3:
            return "mat3x3";
        case CtorConv::kMat3x4:
            return "mat3x4";
        case CtorConv::kMat4x2:
            return "mat4x2";
        case CtorConv::kMat4x3:
            return "mat4x3";
        case CtorConv::kMat4x4:
            return "mat4x4";
        case CtorConv::kSubgroup_matrix_left:
            return "subgroup_matrix_left";
        case CtorConv::kSubgroup_matrix_right:
            return "subgroup_matrix_right";
        case CtorConv::kSubgroup_matrix_result:
            return "subgroup_matrix_result";
    }
    return "<unknown>";
}

}  // namespace tint::core::intrinsic

// clang-format on
