chromium/third_party/dawn/src/tint/lang/core/intrinsic/data.cc

// Copyright 2023 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/data.cc.tmpl
//
// To regenerate run: './tools/run gen'
//
//                       Do not modify this file directly
////////////////////////////////////////////////////////////////////////////////

#include <limits>
#include <string>

#include "src/tint/lang/core/intrinsic/dialect.h"
#include "src/tint/lang/core/intrinsic/type_matchers.h"
#include "src/tint/utils/text/string_stream.h"

namespace tint::core::intrinsic {

namespace {

ConstEvalFunctionIndex;
IntrinsicInfo;
MatcherIndicesIndex;
MatchState;
Number;
NumberMatcher;
NumberMatcherIndex;
OverloadFlag;
OverloadFlags;
OverloadIndex;
OverloadInfo;
ParameterIndex;
ParameterInfo;
StringStream;
TemplateIndex;
Type;
TypeMatcher;
TypeMatcherIndex;

TemplateNumberMatcher;

TemplateTypeMatcher;

// clang-format off

/// TypeMatcher for 'type bool'
constexpr TypeMatcher kBoolMatcher {};


/// TypeMatcher for 'type i8'
constexpr TypeMatcher kI8Matcher {};


/// TypeMatcher for 'type u8'
constexpr TypeMatcher kU8Matcher {};


/// TypeMatcher for 'type i32'
constexpr TypeMatcher kI32Matcher {};


/// TypeMatcher for 'type u32'
constexpr TypeMatcher kU32Matcher {};


/// TypeMatcher for 'type f32'
constexpr TypeMatcher kF32Matcher {};


/// TypeMatcher for 'type f16'
constexpr TypeMatcher kF16Matcher {};


/// TypeMatcher for 'type vec2'
constexpr TypeMatcher kVec2Matcher {};


/// TypeMatcher for 'type vec3'
constexpr TypeMatcher kVec3Matcher {};


/// TypeMatcher for 'type vec4'
constexpr TypeMatcher kVec4Matcher {};


/// TypeMatcher for 'type mat2x2'
constexpr TypeMatcher kMat2X2Matcher {};


/// TypeMatcher for 'type mat2x3'
constexpr TypeMatcher kMat2X3Matcher {};


/// TypeMatcher for 'type mat2x4'
constexpr TypeMatcher kMat2X4Matcher {};


/// TypeMatcher for 'type mat3x2'
constexpr TypeMatcher kMat3X2Matcher {};


/// TypeMatcher for 'type mat3x3'
constexpr TypeMatcher kMat3X3Matcher {};


/// TypeMatcher for 'type mat3x4'
constexpr TypeMatcher kMat3X4Matcher {};


/// TypeMatcher for 'type mat4x2'
constexpr TypeMatcher kMat4X2Matcher {};


/// TypeMatcher for 'type mat4x3'
constexpr TypeMatcher kMat4X3Matcher {};


/// TypeMatcher for 'type mat4x4'
constexpr TypeMatcher kMat4X4Matcher {};


/// TypeMatcher for 'type vec'
constexpr TypeMatcher kVecMatcher {};


/// TypeMatcher for 'type mat'
constexpr TypeMatcher kMatMatcher {};


/// TypeMatcher for 'type ptr'
constexpr TypeMatcher kPtrMatcher {};


/// TypeMatcher for 'type atomic'
constexpr TypeMatcher kAtomicMatcher {};


/// TypeMatcher for 'type array'
constexpr TypeMatcher kArrayMatcher {};


/// TypeMatcher for 'type sampler'
constexpr TypeMatcher kSamplerMatcher {};


/// TypeMatcher for 'type sampler_comparison'
constexpr TypeMatcher kSamplerComparisonMatcher {};


/// TypeMatcher for 'type texture_1d'
constexpr TypeMatcher kTexture1DMatcher {};


/// TypeMatcher for 'type texture_2d'
constexpr TypeMatcher kTexture2DMatcher {};


/// TypeMatcher for 'type texture_2d_array'
constexpr TypeMatcher kTexture2DArrayMatcher {};


/// TypeMatcher for 'type texture_3d'
constexpr TypeMatcher kTexture3DMatcher {};


/// TypeMatcher for 'type texture_cube'
constexpr TypeMatcher kTextureCubeMatcher {};


/// TypeMatcher for 'type texture_cube_array'
constexpr TypeMatcher kTextureCubeArrayMatcher {};


/// TypeMatcher for 'type texture_multisampled_2d'
constexpr TypeMatcher kTextureMultisampled2DMatcher {};


/// TypeMatcher for 'type texture_depth_2d'
constexpr TypeMatcher kTextureDepth2DMatcher {};


/// TypeMatcher for 'type texture_depth_2d_array'
constexpr TypeMatcher kTextureDepth2DArrayMatcher {};


/// TypeMatcher for 'type texture_depth_cube'
constexpr TypeMatcher kTextureDepthCubeMatcher {};


/// TypeMatcher for 'type texture_depth_cube_array'
constexpr TypeMatcher kTextureDepthCubeArrayMatcher {};


/// TypeMatcher for 'type texture_depth_multisampled_2d'
constexpr TypeMatcher kTextureDepthMultisampled2DMatcher {};


/// TypeMatcher for 'type texture_storage_1d'
constexpr TypeMatcher kTextureStorage1DMatcher {};


/// TypeMatcher for 'type texture_storage_2d'
constexpr TypeMatcher kTextureStorage2DMatcher {};


/// TypeMatcher for 'type texture_storage_2d_array'
constexpr TypeMatcher kTextureStorage2DArrayMatcher {};


/// TypeMatcher for 'type texture_storage_3d'
constexpr TypeMatcher kTextureStorage3DMatcher {};


/// TypeMatcher for 'type texture_external'
constexpr TypeMatcher kTextureExternalMatcher {};


/// TypeMatcher for 'type input_attachment'
constexpr TypeMatcher kInputAttachmentMatcher {};


/// TypeMatcher for 'type __modf_result'
constexpr TypeMatcher kModfResultMatcher {};


/// TypeMatcher for 'type __modf_result_vec'
constexpr TypeMatcher kModfResultVecMatcher {};


/// TypeMatcher for 'type __frexp_result'
constexpr TypeMatcher kFrexpResultMatcher {};


/// TypeMatcher for 'type __frexp_result_vec'
constexpr TypeMatcher kFrexpResultVecMatcher {};


/// TypeMatcher for 'type __atomic_compare_exchange_result'
constexpr TypeMatcher kAtomicCompareExchangeResultMatcher {};


/// TypeMatcher for 'type subgroup_matrix'
constexpr TypeMatcher kSubgroupMatrixMatcher {};


/// TypeMatcher for 'match scalar'
constexpr TypeMatcher kScalarMatcher {};

/// TypeMatcher for 'match scalar_no_f32'
constexpr TypeMatcher kScalarNoF32Matcher {};

/// TypeMatcher for 'match scalar_no_f16'
constexpr TypeMatcher kScalarNoF16Matcher {};

/// TypeMatcher for 'match scalar_no_i32'
constexpr TypeMatcher kScalarNoI32Matcher {};

/// TypeMatcher for 'match scalar_no_u32'
constexpr TypeMatcher kScalarNoU32Matcher {};

/// TypeMatcher for 'match scalar_no_bool'
constexpr TypeMatcher kScalarNoBoolMatcher {};

/// TypeMatcher for 'match fiu32_f16'
constexpr TypeMatcher kFiu32F16Matcher {};

/// TypeMatcher for 'match fiu32'
constexpr TypeMatcher kFiu32Matcher {};

/// TypeMatcher for 'match fi32_f16'
constexpr TypeMatcher kFi32F16Matcher {};

/// TypeMatcher for 'match fi32'
constexpr TypeMatcher kFi32Matcher {};

/// TypeMatcher for 'match f32_f16'
constexpr TypeMatcher kF32F16Matcher {};

/// TypeMatcher for 'match iu32'
constexpr TypeMatcher kIu32Matcher {};

/// TypeMatcher for 'match subgroup_matrix_elements'
constexpr TypeMatcher kSubgroupMatrixElementsMatcher {};

/// EnumMatcher for 'match subgroup_matrix_kind_left'
constexpr NumberMatcher kSubgroupMatrixKindLeftMatcher {};

/// EnumMatcher for 'match subgroup_matrix_kind_right'
constexpr NumberMatcher kSubgroupMatrixKindRightMatcher {};

/// EnumMatcher for 'match subgroup_matrix_kind_result'
constexpr NumberMatcher kSubgroupMatrixKindResultMatcher {};

/// EnumMatcher for 'match f32_texel_format'
constexpr NumberMatcher kF32TexelFormatMatcher {};

/// EnumMatcher for 'match i32_texel_format'
constexpr NumberMatcher kI32TexelFormatMatcher {};

/// EnumMatcher for 'match u32_texel_format'
constexpr NumberMatcher kU32TexelFormatMatcher {};

/// EnumMatcher for 'match write'
constexpr NumberMatcher kWriteMatcher {};

/// EnumMatcher for 'match read_write'
constexpr NumberMatcher kReadWriteMatcher {};

/// EnumMatcher for 'match readable'
constexpr NumberMatcher kReadableMatcher {};

/// EnumMatcher for 'match writable'
constexpr NumberMatcher kWritableMatcher {};

/// EnumMatcher for 'match function_private_workgroup'
constexpr NumberMatcher kFunctionPrivateWorkgroupMatcher {};

/// EnumMatcher for 'match workgroup_or_storage'
constexpr NumberMatcher kWorkgroupOrStorageMatcher {};

/// EnumMatcher for 'match storage'
constexpr NumberMatcher kStorageMatcher {};

/// EnumMatcher for 'match workgroup'
constexpr NumberMatcher kWorkgroupMatcher {};

/// Type and number matchers

/// The template types, types, and type matchers
constexpr TypeMatcher kTypeMatchers[] =;

/// The template numbers, and number matchers
constexpr NumberMatcher kNumberMatchers[] =;

constexpr MatcherIndex kMatcherIndices[] =;

static_assert;

constexpr ParameterInfo kParameters[] =;

static_assert;

constexpr TemplateInfo kTemplates[] =;

static_assert;

constexpr core::constant::Eval::Function kConstEvalFunctions[] =;

static_assert;

constexpr OverloadInfo kOverloads[] =;

static_assert;

constexpr IntrinsicInfo kBuiltins[] =;

constexpr IntrinsicInfo kUnaryOperators[] =;
constexpr uint8_t kUnaryOperatorNot =;
constexpr uint8_t kUnaryOperatorComplement =;
constexpr uint8_t kUnaryOperatorMinus =;

constexpr IntrinsicInfo kBinaryOperators[] =;
constexpr uint8_t kBinaryOperatorPlus =;
constexpr uint8_t kBinaryOperatorMinus =;
constexpr uint8_t kBinaryOperatorStar =;
constexpr uint8_t kBinaryOperatorDivide =;
constexpr uint8_t kBinaryOperatorModulo =;
constexpr uint8_t kBinaryOperatorXor =;
constexpr uint8_t kBinaryOperatorAnd =;
constexpr uint8_t kBinaryOperatorOr =;
constexpr uint8_t kBinaryOperatorLogicalAnd =;
constexpr uint8_t kBinaryOperatorLogicalOr =;
constexpr uint8_t kBinaryOperatorEqual =;
constexpr uint8_t kBinaryOperatorNotEqual =;
constexpr uint8_t kBinaryOperatorLessThan =;
constexpr uint8_t kBinaryOperatorGreaterThan =;
constexpr uint8_t kBinaryOperatorLessThanEqual =;
constexpr uint8_t kBinaryOperatorGreaterThanEqual =;
constexpr uint8_t kBinaryOperatorShiftLeft =;
constexpr uint8_t kBinaryOperatorShiftRight =;

constexpr IntrinsicInfo kConstructorsAndConverters[] =;

// clang-format on

}  // anonymous namespace

const core::intrinsic::TableData Dialect::kData{};

}  // namespace tint::core::intrinsic