MLIR 23.0.0git
SPIRVTypes.h
Go to the documentation of this file.
1//===- SPIRVTypes.h - MLIR SPIR-V Types -------------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares the types in the SPIR-V dialect.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_DIALECT_SPIRV_IR_SPIRVTYPES_H_
14#define MLIR_DIALECT_SPIRV_IR_SPIRVTYPES_H_
15
19#include "mlir/IR/Diagnostics.h"
20#include "mlir/IR/Location.h"
21#include "mlir/IR/TypeSupport.h"
22#include "mlir/IR/Types.h"
23
24#include <cstdint>
25#include <tuple>
26
27namespace mlir {
28namespace spirv {
29
30namespace detail {
31struct ArrayTypeStorage;
34struct ImageTypeStorage;
40
41} // namespace detail
42
43// Base SPIR-V type for providing availability queries.
44class SPIRVType : public Type {
45public:
46 using Type::Type;
47
48 static bool classof(Type type);
49
50 bool isScalarOrVector();
51
52 /// The extension requirements for each type are following the
53 /// ((Extension::A OR Extension::B) AND (Extension::C OR Extension::D))
54 /// convention.
56
57 /// Appends to `extensions` the extensions needed for this type to appear in
58 /// the given `storage` class. This method does not guarantee the uniqueness
59 /// of extensions; the same extension may be appended multiple times.
61 std::optional<StorageClass> storage = std::nullopt);
62
63 /// The capability requirements for each type are following the
64 /// ((Capability::A OR Extension::B) AND (Capability::C OR Capability::D))
65 /// convention.
67
68 /// Appends to `capabilities` the capabilities needed for this type to appear
69 /// in the given `storage` class. This method does not guarantee the
70 /// uniqueness of capabilities; the same capability may be appended multiple
71 /// times.
73 std::optional<StorageClass> storage = std::nullopt);
74
75 /// Returns the size in bytes for each type. If no size can be calculated,
76 /// returns `std::nullopt`. Note that if the type has explicit layout, it is
77 /// also taken into account in calculation.
78 std::optional<int64_t> getSizeInBytes();
79};
80
81// SPIR-V scalar type: bool type, integer type, floating point type.
82class ScalarType : public SPIRVType {
83public:
84 using SPIRVType::SPIRVType;
85
86 static bool classof(Type type);
87
88 /// Returns true if the given float type is valid for the SPIR-V dialect.
89 static bool isValid(FloatType);
90 /// Returns true if the given integer type is valid for the SPIR-V dialect.
91 static bool isValid(IntegerType);
92};
93
94// SPIR-V composite type: VectorType, SPIR-V ArrayType, SPIR-V
95// StructType, or SPIR-V TensorArmType.
96class CompositeType : public SPIRVType {
97public:
98 using SPIRVType::SPIRVType;
99
100 static bool classof(Type type);
101
102 /// Returns true if the given vector type is valid for the SPIR-V dialect.
103 static bool isValid(VectorType);
104
105 /// Return the number of elements of the type. This should only be called if
106 /// hasCompileTimeKnownNumElements is true.
107 unsigned getNumElements() const;
108
109 Type getElementType(unsigned) const;
110
111 /// Return true if the number of elements is known at compile time and is not
112 /// implementation dependent.
114};
115
116// SPIR-V array type
117class ArrayType : public Type::TypeBase<ArrayType, CompositeType,
118 detail::ArrayTypeStorage> {
119public:
120 using Base::Base;
121
122 static constexpr StringLiteral name = "spirv.array";
123
124 static ArrayType get(Type elementType, unsigned elementCount);
125
126 /// Returns an array type with the given stride in bytes.
127 static ArrayType get(Type elementType, unsigned elementCount,
128 unsigned stride);
129
130 unsigned getNumElements() const;
131
132 Type getElementType() const;
133
134 /// Returns the array stride in bytes. 0 means no stride decorated on this
135 /// type.
136 unsigned getArrayStride() const;
137};
138
139// SPIR-V image type
141 : public Type::TypeBase<ImageType, SPIRVType, detail::ImageTypeStorage> {
142public:
143 using Base::Base;
144
145 static constexpr StringLiteral name = "spirv.image";
146
147 static ImageType
148 get(Type elementType, Dim dim,
149 ImageDepthInfo depth = ImageDepthInfo::DepthUnknown,
150 ImageArrayedInfo arrayed = ImageArrayedInfo::NonArrayed,
151 ImageSamplingInfo samplingInfo = ImageSamplingInfo::SingleSampled,
152 ImageSamplerUseInfo samplerUse = ImageSamplerUseInfo::SamplerUnknown,
153 ImageFormat format = ImageFormat::Unknown) {
154 return ImageType::get(
155 std::tuple<Type, Dim, ImageDepthInfo, ImageArrayedInfo,
156 ImageSamplingInfo, ImageSamplerUseInfo, ImageFormat>(
157 elementType, dim, depth, arrayed, samplingInfo, samplerUse,
158 format));
159 }
160
161 static ImageType
162 get(std::tuple<Type, Dim, ImageDepthInfo, ImageArrayedInfo,
163 ImageSamplingInfo, ImageSamplerUseInfo, ImageFormat>);
164
165 Type getElementType() const;
166 Dim getDim() const;
167 ImageDepthInfo getDepthInfo() const;
168 ImageArrayedInfo getArrayedInfo() const;
169 ImageSamplingInfo getSamplingInfo() const;
170 ImageSamplerUseInfo getSamplerUseInfo() const;
171 ImageFormat getImageFormat() const;
172 // TODO: Add support for Access qualifier
173};
174
175// SPIR-V pointer type
177 : public Type::TypeBase<PointerType, SPIRVType, detail::PointerTypeStorage,
178 VectorElementTypeInterface::Trait> {
179public:
180 using Base::Base;
181
182 static constexpr StringLiteral name = "spirv.pointer";
183
184 static PointerType get(Type pointeeType, StorageClass storageClass);
185
186 Type getPointeeType() const;
187
188 StorageClass getStorageClass() const;
189};
190
191// SPIR-V run-time array type
193 : public Type::TypeBase<RuntimeArrayType, SPIRVType,
194 detail::RuntimeArrayTypeStorage> {
195public:
196 using Base::Base;
197
198 static constexpr StringLiteral name = "spirv.rtarray";
199
200 static RuntimeArrayType get(Type elementType);
201
202 /// Returns a runtime array type with the given stride in bytes.
203 static RuntimeArrayType get(Type elementType, unsigned stride);
204
205 Type getElementType() const;
206
207 /// Returns the array stride in bytes. 0 means no stride decorated on this
208 /// type.
209 unsigned getArrayStride() const;
210};
211
212// SPIR-V sampled image type
214 : public Type::TypeBase<SampledImageType, SPIRVType,
215 detail::SampledImageTypeStorage> {
216public:
217 using Base::Base;
218
219 static constexpr StringLiteral name = "spirv.sampled_image";
220
221 static SampledImageType get(Type imageType);
222
223 static SampledImageType
225
226 static LogicalResult
228 Type imageType);
229
230 Type getImageType() const;
231};
232
233// SPIR-V sampler type
234class SamplerType : public Type::TypeBase<SamplerType, SPIRVType, TypeStorage> {
235public:
236 using Base::Base;
237
238 static constexpr StringLiteral name = "spirv.sampler";
239
240 static SamplerType get(MLIRContext *context);
241};
242
243/// SPIR-V struct type. Two kinds of struct types are supported:
244/// - Literal: a literal struct type is uniqued by its fields (types + offset
245/// info + decoration info).
246/// - Identified: an indentified struct type is uniqued by its string identifier
247/// (name). This is useful in representing recursive structs. For example, the
248/// following C struct:
249///
250/// struct A {
251/// A* next;
252/// };
253///
254/// would be represented in MLIR as:
255///
256/// !spirv.struct<A, (!spirv.ptr<!spirv.struct<A>, Generic>)>
257///
258/// In the above, expressing recursive struct types is accomplished by giving a
259/// recursive struct a unique identified and using that identifier in the struct
260/// definition for recursive references.
262 : public Type::TypeBase<StructType, CompositeType,
263 detail::StructTypeStorage, TypeTrait::IsMutable> {
264public:
265 using Base::Base;
266
267 // Type for specifying the offset of the struct members
268 using OffsetInfo = uint32_t;
269
270 static constexpr StringLiteral name = "spirv.struct";
271
272 // Type for specifying the decoration(s) on struct members.
273 // If `decorationValue` is UnitAttr then decoration has no
274 // value.
276 uint32_t memberIndex;
277 Decoration decoration;
279
284
286 const MemberDecorationInfo &rhs) {
287 return lhs.memberIndex == rhs.memberIndex &&
288 lhs.decoration == rhs.decoration &&
289 lhs.decorationValue == rhs.decorationValue;
290 }
291
293 const MemberDecorationInfo &rhs) {
294 return std::tuple(lhs.memberIndex, llvm::to_underlying(lhs.decoration)) <
295 std::tuple(rhs.memberIndex, llvm::to_underlying(rhs.decoration));
296 }
297
298 bool hasValue() const { return !isa<UnitAttr>(decorationValue); }
299 };
300
301 // Type for specifying the decoration(s) on the struct itself.
303 Decoration decoration;
305
308
310 const StructDecorationInfo &rhs) {
311 return lhs.decoration == rhs.decoration &&
312 lhs.decorationValue == rhs.decorationValue;
313 }
314
316 const StructDecorationInfo &rhs) {
317 return llvm::to_underlying(lhs.decoration) <
318 llvm::to_underlying(rhs.decoration);
319 }
320
321 bool hasValue() const { return !isa<UnitAttr>(decorationValue); }
322 };
323
324 /// Construct a literal StructType with at least one member.
325 static StructType get(ArrayRef<Type> memberTypes,
326 ArrayRef<OffsetInfo> offsetInfo = {},
327 ArrayRef<MemberDecorationInfo> memberDecorations = {},
328 ArrayRef<StructDecorationInfo> structDecorations = {});
329
330 /// Construct an identified StructType. This creates a StructType whose body
331 /// (member types, offset info, and decorations) is not set yet. A call to
332 /// StructType::trySetBody(...) must follow when the StructType contents are
333 /// available (e.g. parsed or deserialized).
334 ///
335 /// Note: If another thread creates (or had already created) a struct with the
336 /// same identifier, that struct will be returned as a result.
337 static StructType getIdentified(MLIRContext *context, StringRef identifier);
338
339 /// Construct a (possibly identified) StructType with no members.
340 ///
341 /// Note: this method might fail in a multi-threaded setup if another thread
342 /// created an identified struct with the same identifier but with different
343 /// contents before returning. In which case, an empty (default-constructed)
344 /// StructType is returned.
345 static StructType getEmpty(MLIRContext *context, StringRef identifier = "");
346
347 /// For literal structs, return an empty string.
348 /// For identified structs, return the struct's identifier.
349 StringRef getIdentifier() const;
350
351 /// Returns true if the StructType is identified.
352 bool isIdentified() const;
353
354 unsigned getNumElements() const;
355
356 Type getElementType(unsigned) const;
357
359
360 bool hasOffset() const;
361
362 /// Returns true if the struct has a specified decoration.
363 bool hasDecoration(spirv::Decoration decoration) const;
364
365 uint64_t getMemberOffset(unsigned) const;
366
367 // Returns in `memberDecorations` the Decorations (apart from Offset)
368 // associated with all members of the StructType.
369 void getMemberDecorations(SmallVectorImpl<StructType::MemberDecorationInfo>
370 &memberDecorations) const;
371
372 // Returns in `decorationsInfo` all the Decorations (apart from Offset)
373 // associated with the `i`-th member of the StructType.
375 unsigned i,
376 SmallVectorImpl<StructType::MemberDecorationInfo> &decorationsInfo) const;
377
378 // Returns in `structDecorations` the Decorations associated with the
379 // StructType.
380 void getStructDecorations(SmallVectorImpl<StructType::StructDecorationInfo>
381 &structDecorations) const;
382
383 /// Sets the contents of an incomplete identified StructType. This method must
384 /// be called only for identified StructTypes and it must be called only once
385 /// per instance. Otherwise, failure() is returned.
386 LogicalResult
387 trySetBody(ArrayRef<Type> memberTypes, ArrayRef<OffsetInfo> offsetInfo = {},
388 ArrayRef<MemberDecorationInfo> memberDecorations = {},
389 ArrayRef<StructDecorationInfo> structDecorations = {});
390};
391
392llvm::hash_code
393hash_value(const StructType::MemberDecorationInfo &memberDecorationInfo);
394
395llvm::hash_code
396hash_value(const StructType::StructDecorationInfo &structDecorationInfo);
397
398// SPIR-V KHR cooperative matrix type
400 : public Type::TypeBase<CooperativeMatrixType, CompositeType,
401 detail::CooperativeMatrixTypeStorage,
402 ShapedType::Trait> {
403public:
404 using Base::Base;
405
406 static constexpr StringLiteral name = "spirv.coopmatrix";
407
408 static CooperativeMatrixType get(Type elementType, uint32_t rows,
409 uint32_t columns, Scope scope,
410 CooperativeMatrixUseKHR use);
411 Type getElementType() const;
412
413 /// Returns the scope of the matrix.
414 Scope getScope() const;
415 /// Returns the number of rows of the matrix.
416 uint32_t getRows() const;
417 /// Returns the number of columns of the matrix.
418 uint32_t getColumns() const;
419 /// Returns the use parameter of the cooperative matrix.
420 CooperativeMatrixUseKHR getUse() const;
421
422 operator ShapedType() const { return cast<ShapedType>(*this); }
423
425
426 bool hasRank() const { return true; }
427
429 Type elementType) const {
430 if (!shape)
431 return get(elementType, getRows(), getColumns(), getScope(), getUse());
432
433 assert(shape.value().size() == 2);
434 return get(elementType, shape.value()[0], shape.value()[1], getScope(),
435 getUse());
436 }
437};
438
439// SPIR-V matrix type
441 : public Type::TypeBase<MatrixType, CompositeType,
442 detail::MatrixTypeStorage, ShapedType::Trait> {
443public:
444 using Base::Base;
445
446 static constexpr StringLiteral name = "spirv.matrix";
447
448 static MatrixType get(Type columnType, uint32_t columnCount);
449
451 Type columnType, uint32_t columnCount);
452
453 static LogicalResult
455 Type columnType, uint32_t columnCount);
456
457 /// Returns true if the matrix elements are vectors of float elements.
458 static bool isValidColumnType(Type columnType);
459
460 Type getColumnType() const;
461
462 /// Returns the number of rows.
463 unsigned getNumRows() const;
464
465 /// Returns the number of columns.
466 unsigned getNumColumns() const;
467
468 /// Returns total number of elements (rows*columns).
469 unsigned getNumElements() const;
470
471 /// Returns the elements' type (i.e, single element type).
472 Type getElementType() const;
473
474 operator ShapedType() const { return cast<ShapedType>(*this); }
475
477
478 bool hasRank() const { return true; }
479
481 Type elementType) const {
482 if (!shape)
483 return get(elementType, getNumColumns());
484
485 assert(shape.value().size() == 2);
486
487 auto vectorType = cast<VectorType>(elementType);
488 Type newElementType =
489 vectorType.cloneWith({shape.value()[0]}, vectorType.getElementType());
490
491 return get(newElementType, shape.value()[1]);
492 }
493};
494
495/// SPIR-V TensorARM Type
497 : public Type::TypeBase<TensorArmType, CompositeType,
498 detail::TensorArmTypeStorage, ShapedType::Trait> {
499public:
500 using Base::Base;
501
502 using ShapedTypeTraits = ShapedType::Trait<TensorArmType>;
503 using ShapedTypeTraits::getDimSize;
504 using ShapedTypeTraits::getDynamicDimIndex;
505 using ShapedTypeTraits::getElementTypeBitWidth;
506 using ShapedTypeTraits::getNumDynamicDims;
507 using ShapedTypeTraits::getNumElements;
508 using ShapedTypeTraits::getRank;
509 using ShapedTypeTraits::hasStaticShape;
510 using ShapedTypeTraits::isDynamicDim;
511
512 static constexpr StringLiteral name = "spirv.arm.tensor";
513
514 // TensorArm supports minimum rank of 1, hence an empty shape here means
515 // unranked.
516 static TensorArmType get(ArrayRef<int64_t> shape, Type elementType);
518 Type elementType) const;
519
520 static LogicalResult
522 ArrayRef<int64_t> shape, Type elementType);
523
524 Type getElementType() const;
526 bool hasRank() const { return !getShape().empty(); }
527 operator ShapedType() const { return cast<ShapedType>(*this); }
528};
529
530} // namespace spirv
531} // namespace mlir
532
533#endif // MLIR_DIALECT_SPIRV_IR_SPIRVTYPES_H_
lhs
Attributes are known-constant values of operations.
Definition Attributes.h:25
This class represents a diagnostic that is inflight and set to be reported.
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:63
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Definition Types.h:74
constexpr Type()=default
detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... > TypeBase
Utility class for implementing types.
Definition Types.h:79
StorageUserBase< ConcreteType, BaseType, StorageType, detail::TypeUniquer, Traits... > Base
Type getElementType() const
unsigned getArrayStride() const
Returns the array stride in bytes.
unsigned getNumElements() const
static ArrayType get(Type elementType, unsigned elementCount)
static constexpr StringLiteral name
Definition SPIRVTypes.h:122
bool hasCompileTimeKnownNumElements() const
Return true if the number of elements is known at compile time and is not implementation dependent.
unsigned getNumElements() const
Return the number of elements of the type.
static bool isValid(VectorType)
Returns true if the given vector type is valid for the SPIR-V dialect.
Type getElementType(unsigned) const
static bool classof(Type type)
CooperativeMatrixType cloneWith(std::optional< ArrayRef< int64_t > > shape, Type elementType) const
Definition SPIRVTypes.h:428
static constexpr StringLiteral name
Definition SPIRVTypes.h:406
Scope getScope() const
Returns the scope of the matrix.
uint32_t getRows() const
Returns the number of rows of the matrix.
uint32_t getColumns() const
Returns the number of columns of the matrix.
static CooperativeMatrixType get(Type elementType, uint32_t rows, uint32_t columns, Scope scope, CooperativeMatrixUseKHR use)
ArrayRef< int64_t > getShape() const
CooperativeMatrixUseKHR getUse() const
Returns the use parameter of the cooperative matrix.
static constexpr StringLiteral name
Definition SPIRVTypes.h:145
static ImageType get(Type elementType, Dim dim, ImageDepthInfo depth=ImageDepthInfo::DepthUnknown, ImageArrayedInfo arrayed=ImageArrayedInfo::NonArrayed, ImageSamplingInfo samplingInfo=ImageSamplingInfo::SingleSampled, ImageSamplerUseInfo samplerUse=ImageSamplerUseInfo::SamplerUnknown, ImageFormat format=ImageFormat::Unknown)
Definition SPIRVTypes.h:148
ImageDepthInfo getDepthInfo() const
ImageArrayedInfo getArrayedInfo() const
ImageFormat getImageFormat() const
ImageSamplerUseInfo getSamplerUseInfo() const
Type getElementType() const
ImageSamplingInfo getSamplingInfo() const
static MatrixType getChecked(function_ref< InFlightDiagnostic()> emitError, Type columnType, uint32_t columnCount)
unsigned getNumElements() const
Returns total number of elements (rows*columns).
static MatrixType get(Type columnType, uint32_t columnCount)
static LogicalResult verifyInvariants(function_ref< InFlightDiagnostic()> emitError, Type columnType, uint32_t columnCount)
unsigned getNumColumns() const
Returns the number of columns.
MatrixType cloneWith(std::optional< ArrayRef< int64_t > > shape, Type elementType) const
Definition SPIRVTypes.h:480
static bool isValidColumnType(Type columnType)
Returns true if the matrix elements are vectors of float elements.
Type getElementType() const
Returns the elements' type (i.e, single element type).
ArrayRef< int64_t > getShape() const
static constexpr StringLiteral name
Definition SPIRVTypes.h:446
unsigned getNumRows() const
Returns the number of rows.
static constexpr StringLiteral name
Definition SPIRVTypes.h:182
StorageClass getStorageClass() const
static PointerType get(Type pointeeType, StorageClass storageClass)
static constexpr StringLiteral name
Definition SPIRVTypes.h:198
unsigned getArrayStride() const
Returns the array stride in bytes.
static RuntimeArrayType get(Type elementType)
constexpr Type()=default
std::optional< int64_t > getSizeInBytes()
Returns the size in bytes for each type.
static bool classof(Type type)
void getCapabilities(CapabilityArrayRefVector &capabilities, std::optional< StorageClass > storage=std::nullopt)
Appends to capabilities the capabilities needed for this type to appear in the given storage class.
SmallVectorImpl< ArrayRef< Capability > > CapabilityArrayRefVector
The capability requirements for each type are following the ((Capability::A OR Extension::B) AND (Cap...
Definition SPIRVTypes.h:66
void getExtensions(ExtensionArrayRefVector &extensions, std::optional< StorageClass > storage=std::nullopt)
Appends to extensions the extensions needed for this type to appear in the given storage class.
SmallVectorImpl< ArrayRef< Extension > > ExtensionArrayRefVector
The extension requirements for each type are following the ((Extension::A OR Extension::B) AND (Exten...
Definition SPIRVTypes.h:55
static LogicalResult verifyInvariants(function_ref< InFlightDiagnostic()> emitError, Type imageType)
static constexpr StringLiteral name
Definition SPIRVTypes.h:219
static SampledImageType getChecked(function_ref< InFlightDiagnostic()> emitError, Type imageType)
static SampledImageType get(Type imageType)
static SamplerType get(MLIRContext *context)
static constexpr StringLiteral name
Definition SPIRVTypes.h:238
static bool classof(Type type)
static bool isValid(FloatType)
Returns true if the given float type is valid for the SPIR-V dialect.
SPIR-V struct type.
Definition SPIRVTypes.h:263
void getStructDecorations(SmallVectorImpl< StructType::StructDecorationInfo > &structDecorations) const
void getMemberDecorations(SmallVectorImpl< StructType::MemberDecorationInfo > &memberDecorations) const
static StructType getIdentified(MLIRContext *context, StringRef identifier)
Construct an identified StructType.
bool isIdentified() const
Returns true if the StructType is identified.
StringRef getIdentifier() const
For literal structs, return an empty string.
static StructType getEmpty(MLIRContext *context, StringRef identifier="")
Construct a (possibly identified) StructType with no members.
bool hasDecoration(spirv::Decoration decoration) const
Returns true if the struct has a specified decoration.
unsigned getNumElements() const
Type getElementType(unsigned) const
static constexpr StringLiteral name
Definition SPIRVTypes.h:270
LogicalResult trySetBody(ArrayRef< Type > memberTypes, ArrayRef< OffsetInfo > offsetInfo={}, ArrayRef< MemberDecorationInfo > memberDecorations={}, ArrayRef< StructDecorationInfo > structDecorations={})
Sets the contents of an incomplete identified StructType.
TypeRange getElementTypes() const
static StructType get(ArrayRef< Type > memberTypes, ArrayRef< OffsetInfo > offsetInfo={}, ArrayRef< MemberDecorationInfo > memberDecorations={}, ArrayRef< StructDecorationInfo > structDecorations={})
Construct a literal StructType with at least one member.
uint64_t getMemberOffset(unsigned) const
SPIR-V TensorARM Type.
Definition SPIRVTypes.h:498
static constexpr StringLiteral name
Definition SPIRVTypes.h:512
static LogicalResult verifyInvariants(function_ref< InFlightDiagnostic()> emitError, ArrayRef< int64_t > shape, Type elementType)
ShapedType::Trait< TensorArmType > ShapedTypeTraits
Definition SPIRVTypes.h:502
static TensorArmType get(ArrayRef< int64_t > shape, Type elementType)
TensorArmType cloneWith(std::optional< ArrayRef< int64_t > > shape, Type elementType) const
ArrayRef< int64_t > getShape() const
llvm::hash_code hash_value(const StructType::MemberDecorationInfo &memberDecorationInfo)
Include the generated interface declarations.
InFlightDiagnostic emitError(Location loc)
Utility method to emit an error message using this location.
llvm::function_ref< Fn > function_ref
Definition LLVM.h:147
friend bool operator==(const MemberDecorationInfo &lhs, const MemberDecorationInfo &rhs)
Definition SPIRVTypes.h:285
MemberDecorationInfo(uint32_t index, Decoration decoration, Attribute decorationValue)
Definition SPIRVTypes.h:280
friend bool operator<(const MemberDecorationInfo &lhs, const MemberDecorationInfo &rhs)
Definition SPIRVTypes.h:292
StructDecorationInfo(Decoration decoration, Attribute decorationValue)
Definition SPIRVTypes.h:306
friend bool operator<(const StructDecorationInfo &lhs, const StructDecorationInfo &rhs)
Definition SPIRVTypes.h:315
friend bool operator==(const StructDecorationInfo &lhs, const StructDecorationInfo &rhs)
Definition SPIRVTypes.h:309
Type storage for SPIR-V structure types: