chromium/third_party/dawn/src/tint/lang/core/type/manager.cc

// Copyright 2022 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.

#include "src/tint/lang/core/type/manager.h"

#include <algorithm>

#include "src/tint/lang/core/type/abstract_float.h"
#include "src/tint/lang/core/type/abstract_int.h"
#include "src/tint/lang/core/type/array.h"
#include "src/tint/lang/core/type/bool.h"
#include "src/tint/lang/core/type/f16.h"
#include "src/tint/lang/core/type/f32.h"
#include "src/tint/lang/core/type/i32.h"
#include "src/tint/lang/core/type/i8.h"
#include "src/tint/lang/core/type/invalid.h"
#include "src/tint/lang/core/type/matrix.h"
#include "src/tint/lang/core/type/pointer.h"
#include "src/tint/lang/core/type/reference.h"
#include "src/tint/lang/core/type/type.h"
#include "src/tint/lang/core/type/u32.h"
#include "src/tint/lang/core/type/u8.h"
#include "src/tint/lang/core/type/vector.h"
#include "src/tint/lang/core/type/void.h"
#include "src/tint/utils/macros/compiler.h"

namespace tint::core::type {

Manager::Manager() = default;

Manager::Manager(Manager&&) = default;

Manager& Manager::operator=(Manager&& rhs) = default;

Manager::~Manager() = default;

const core::type::Invalid* Manager::invalid() {}

const core::type::Void* Manager::void_() {}

const core::type::Bool* Manager::bool_() {}

const core::type::I8* Manager::i8() {}

const core::type::I32* Manager::i32() {}

const core::type::U8* Manager::u8() {}

const core::type::U32* Manager::u32() {}

const core::type::F32* Manager::f32() {}

const core::type::F16* Manager::f16() {}

const core::type::AbstractFloat* Manager::AFloat() {}

const core::type::AbstractInt* Manager::AInt() {}

const core::type::Atomic* Manager::atomic(const core::type::Type* inner) {}

const core::type::Vector* Manager::packed_vec(const core::type::Type* inner, uint32_t size) {}

const core::type::Type* Manager::match_width(const core::type::Type* el_ty,
                                             const core::type::Type* match) {}

const core::type::Vector* Manager::vec(const core::type::Type* inner, uint32_t size) {}

const core::type::Vector* Manager::vec2(const core::type::Type* inner) {}

const core::type::Vector* Manager::vec3(const core::type::Type* inner) {}

const core::type::Vector* Manager::vec4(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat(const core::type::Type* inner,
                                       uint32_t cols,
                                       uint32_t rows) {}

const core::type::Matrix* Manager::mat(const core::type::Vector* column_type, uint32_t cols) {}

const core::type::Matrix* Manager::mat2x2(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat2x3(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat2x4(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat3x2(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat3x3(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat3x4(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat4x2(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat4x3(const core::type::Type* inner) {}

const core::type::Matrix* Manager::mat4x4(const core::type::Type* inner) {}

const core::type::SubgroupMatrix* Manager::subgroup_matrix(SubgroupMatrixKind kind,
                                                           const core::type::Type* inner,
                                                           uint32_t rows,
                                                           uint32_t cols) {}

const core::type::Array* Manager::array(const core::type::Type* elem_ty,
                                        uint32_t count,
                                        uint32_t stride /* = 0*/) {}

const core::type::Array* Manager::runtime_array(const core::type::Type* elem_ty,
                                                uint32_t stride /* = 0 */) {}

const core::type::Pointer* Manager::ptr(core::AddressSpace address_space,
                                        const core::type::Type* subtype,
                                        core::Access access /* = core::Access::kUndefined */) {}

const core::type::Reference* Manager::ref(core::AddressSpace address_space,
                                          const core::type::Type* subtype,
                                          core::Access access /* = core::Access::kReadWrite */) {}

core::type::Struct* Manager::Struct(Symbol name, VectorRef<const StructMember*> members) {}

core::type::Struct* Manager::Struct(Symbol name, VectorRef<StructMemberDesc> md) {}

}  // namespace tint::core::type