13 #ifndef MLIR_DIALECT_SPIRV_SPIRVTYPES_H_ 14 #define MLIR_DIALECT_SPIRV_SPIRVTYPES_H_ 25 enum class Version : uint32_t;
27 enum class Capability : uint32_t;
32 #include "mlir/Dialect/SPIRV/SPIRVEnums.h.inc" 34 #include "mlir/Dialect/SPIRV/SPIRVEnumAvailability.h.inc" 43 struct ImageTypeStorage;
65 static bool classof(
Type type);
67 unsigned getNumElements()
const;
69 Type getElementType(
unsigned)
const;
74 detail::ArrayTypeStorage> {
82 static ArrayType get(
Type elementType,
unsigned elementCount);
87 unsigned getNumElements()
const;
89 Type getElementType()
const;
91 bool hasLayout()
const;
93 uint64_t getArrayStride()
const;
98 :
public Type::TypeBase<ImageType, Type, detail::ImageTypeStorage> {
106 ImageDepthInfo depth = ImageDepthInfo::DepthUnknown,
107 ImageArrayedInfo arrayed = ImageArrayedInfo::NonArrayed,
108 ImageSamplingInfo samplingInfo = ImageSamplingInfo::SingleSampled,
109 ImageSamplerUseInfo samplerUse = ImageSamplerUseInfo::SamplerUnknown,
110 ImageFormat format = ImageFormat::Unknown) {
112 std::tuple<
Type, Dim, ImageDepthInfo, ImageArrayedInfo,
113 ImageSamplingInfo, ImageSamplerUseInfo, ImageFormat>(
114 elementType, dim, depth, arrayed, samplingInfo, samplerUse,
119 get(std::tuple<
Type, Dim, ImageDepthInfo, ImageArrayedInfo,
120 ImageSamplingInfo, ImageSamplerUseInfo, ImageFormat>);
122 Type getElementType()
const;
124 ImageDepthInfo getDepthInfo()
const;
125 ImageArrayedInfo getArrayedInfo()
const;
126 ImageSamplingInfo getSamplingInfo()
const;
127 ImageSamplerUseInfo getSamplerUseInfo()
const;
128 ImageFormat getImageFormat()
const;
134 :
public Type::TypeBase<PointerType, Type, detail::PointerTypeStorage> {
142 Type getPointeeType()
const;
144 StorageClass getStorageClass()
const;
150 detail::RuntimeArrayTypeStorage> {
158 Type getElementType()
const;
163 detail::StructTypeStorage> {
188 unsigned getNumElements()
const;
190 Type getElementType(
unsigned)
const;
192 bool hasLayout()
const;
194 uint64_t getOffset(
unsigned)
const;
199 &allMemberDecorations)
const;
203 void getMemberDecorations(
210 #endif // MLIR_DIALECT_SPIRV_SPIRVTYPES_H_ Definition: InferTypeOpInterface.cpp:20
static bool kindof(unsigned kind)
Definition: SPIRVTypes.h:154
Definition: Attributes.h:139
Definition: SPIRVTypes.h:148
Definition: SPIRVTypes.h:61
static bool kindof(unsigned kind)
Definition: SPIRVTypes.h:138
uint64_t LayoutInfo
Definition: SPIRVTypes.h:78
Definition: SPIRVTypes.h:133
Definition: SPIRVTypes.h:52
static bool kindof(unsigned kind)
Definition: SPIRVTypes.h:80
Definition: SPIRVTypes.h:97
Definition: SPIRVTypes.h:55
Definition: SPIRVTypes.cpp:351
Type()
Definition: Types.h:111
Definition: SPIRVTypes.cpp:32
Definition: SPIRVTypes.cpp:310
Definition: SPIRVTypes.h:56
std::pair< uint32_t, spirv::Decoration > MemberDecorationInfo
Definition: SPIRVTypes.h:176
uint64_t LayoutInfo
Definition: SPIRVTypes.h:174
Kind
Definition: SPIRVTypes.h:50
Definition: SPIRVTypes.h:54
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:105
Definition: SPIRVTypes.cpp:378
Definition: StorageUniquerSupport.h:30
Definition: MLIRContext.h:34
Definition: SPIRVTypes.h:162
Definition: SPIRVTypes.h:53
static bool kindof(unsigned kind)
Definition: SPIRVTypes.h:102
ValueBuilder< DimOp > dim
Definition: Intrinsics.h:205
Definition: SPIRVTypes.h:73
Definition: SPIRVTypes.h:51
static bool kindof(unsigned kind)
Definition: SPIRVTypes.h:178