chromium/third_party/spirv-tools/src/source/opt/types.cpp

// Copyright (c) 2016 Google Inc.
//
// 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.

#include "source/opt/types.h"

#include <algorithm>
#include <cassert>
#include <cstdint>
#include <sstream>
#include <string>
#include <unordered_set>

#include "source/util/hash_combine.h"
#include "source/util/make_unique.h"

namespace spvtools {
namespace opt {
namespace analysis {

hash_combine;
U32VecVec;

namespace {

// Returns true if the two vector of vectors are identical.
bool CompareTwoVectors(const U32VecVec a, const U32VecVec b) {}

}  // namespace

std::string Type::GetDecorationStr() const {}

bool Type::HasSameDecorations(const Type* that) const {}

bool Type::IsUniqueType() const {}

std::unique_ptr<Type> Type::Clone() const {}

std::unique_ptr<Type> Type::RemoveDecorations() const {}

bool Type::operator==(const Type& other) const {}

size_t Type::ComputeHashValue(size_t hash, SeenTypes* seen) const {}

size_t Type::HashValue() const {}

uint64_t Type::NumberOfComponents() const {}

bool Integer::IsSameImpl(const Type* that, IsSameCache*) const {}

std::string Integer::str() const {}

size_t Integer::ComputeExtraStateHash(size_t hash, SeenTypes*) const {}

bool Float::IsSameImpl(const Type* that, IsSameCache*) const {}

std::string Float::str() const {}

size_t Float::ComputeExtraStateHash(size_t hash, SeenTypes*) const {}

Vector::Vector(const Type* type, uint32_t count)
    :{}

bool Vector::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string Vector::str() const {}

size_t Vector::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

Matrix::Matrix(const Type* type, uint32_t count)
    :{}

bool Matrix::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string Matrix::str() const {}

size_t Matrix::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

Image::Image(Type* type, spv::Dim dimen, uint32_t d, bool array,
             bool multisample, uint32_t sampling, spv::ImageFormat f,
             spv::AccessQualifier qualifier)
    :{}

bool Image::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string Image::str() const {}

size_t Image::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

bool SampledImage::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string SampledImage::str() const {}

size_t SampledImage::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

Array::Array(const Type* type, const Array::LengthInfo& length_info_arg)
    :{}

bool Array::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string Array::str() const {}

size_t Array::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

void Array::ReplaceElementType(const Type* type) {}

Array::LengthInfo Array::GetConstantLengthInfo(uint32_t const_id,
                                               uint32_t length) const {}

RuntimeArray::RuntimeArray(const Type* type)
    :{}

bool RuntimeArray::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string RuntimeArray::str() const {}

size_t RuntimeArray::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

void RuntimeArray::ReplaceElementType(const Type* type) {}

Struct::Struct(const std::vector<const Type*>& types)
    :{}

void Struct::AddMemberDecoration(uint32_t index,
                                 std::vector<uint32_t>&& decoration) {}

bool Struct::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string Struct::str() const {}

size_t Struct::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

bool Opaque::IsSameImpl(const Type* that, IsSameCache*) const {}

std::string Opaque::str() const {}

size_t Opaque::ComputeExtraStateHash(size_t hash, SeenTypes*) const {}

Pointer::Pointer(const Type* type, spv::StorageClass sc)
    :{}

bool Pointer::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string Pointer::str() const {}

size_t Pointer::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

void Pointer::SetPointeeType(const Type* type) {}

Function::Function(const Type* ret_type, const std::vector<const Type*>& params)
    :{}

Function::Function(const Type* ret_type, std::vector<const Type*>& params)
    :{}

bool Function::IsSameImpl(const Type* that, IsSameCache* seen) const {}

std::string Function::str() const {}

size_t Function::ComputeExtraStateHash(size_t hash, SeenTypes* seen) const {}

void Function::SetReturnType(const Type* type) {}

bool Pipe::IsSameImpl(const Type* that, IsSameCache*) const {}

std::string Pipe::str() const {}

size_t Pipe::ComputeExtraStateHash(size_t hash, SeenTypes*) const {}

bool ForwardPointer::IsSameImpl(const Type* that, IsSameCache*) const {}

std::string ForwardPointer::str() const {}

size_t ForwardPointer::ComputeExtraStateHash(size_t hash,
                                             SeenTypes* seen) const {}

CooperativeMatrixNV::CooperativeMatrixNV(const Type* type, const uint32_t scope,
                                         const uint32_t rows,
                                         const uint32_t columns)
    :{}

std::string CooperativeMatrixNV::str() const {}

size_t CooperativeMatrixNV::ComputeExtraStateHash(size_t hash,
                                                  SeenTypes* seen) const {}

bool CooperativeMatrixNV::IsSameImpl(const Type* that,
                                     IsSameCache* seen) const {}

CooperativeMatrixKHR::CooperativeMatrixKHR(const Type* type,
                                           const uint32_t scope,
                                           const uint32_t rows,
                                           const uint32_t columns,
                                           const uint32_t use)
    :{}

std::string CooperativeMatrixKHR::str() const {}

size_t CooperativeMatrixKHR::ComputeExtraStateHash(size_t hash,
                                                   SeenTypes* seen) const {}

bool CooperativeMatrixKHR::IsSameImpl(const Type* that,
                                      IsSameCache* seen) const {}

}  // namespace analysis
}  // namespace opt
}  // namespace spvtools