MLIR 22.0.0git
AMDGPU.cpp
Go to the documentation of this file.
1//===- AMDGPU.cpp - C Interface for AMDGPU dialect ------------------===//
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
12
14 mlir::amdgpu::AMDGPUDialect)
15
16using namespace mlir;
17using namespace mlir::amdgpu;
18
19//===---------------------------------------------------------------------===//
20// TDMBaseType
21//===---------------------------------------------------------------------===//
22
23bool mlirTypeIsAAMDGPUTDMBaseType(MlirType type) {
24 return isa<amdgpu::TDMBaseType>(unwrap(type));
25}
26
28 return wrap(amdgpu::TDMBaseType::getTypeID());
29}
30
31MlirType mlirAMDGPUTDMBaseTypeGet(MlirContext ctx, MlirType elementType) {
32 return wrap(amdgpu::TDMBaseType::get(unwrap(ctx), unwrap(elementType)));
33}
34
36 return wrap(amdgpu::TDMBaseType::name);
37}
38
39//===---------------------------------------------------------------------===//
40// TDMDescriptorType
41//===---------------------------------------------------------------------===//
42
44 return isa<amdgpu::TDMDescriptorType>(unwrap(type));
45}
46
48 return wrap(amdgpu::TDMDescriptorType::getTypeID());
49}
50
51MlirType mlirAMDGPUTDMDescriptorTypeGet(MlirContext ctx) {
52 return wrap(amdgpu::TDMDescriptorType::get(unwrap(ctx)));
53}
54
56 return wrap(amdgpu::TDMDescriptorType::name);
57}
58
59//===---------------------------------------------------------------------===//
60// TDMGatherBaseType
61//===---------------------------------------------------------------------===//
62
64 return isa<amdgpu::TDMGatherBaseType>(unwrap(type));
65}
66
68 return wrap(amdgpu::TDMGatherBaseType::getTypeID());
69}
70
71MlirType mlirAMDGPUTDMGatherBaseTypeGet(MlirContext ctx, MlirType elementType,
72 MlirType indexType) {
73 return wrap(amdgpu::TDMGatherBaseType::get(unwrap(ctx), unwrap(elementType),
74 unwrap(indexType)));
75}
76
78 return wrap(amdgpu::TDMGatherBaseType::name);
79}
MlirTypeID mlirAMDGPUTDMDescriptorTypeGetTypeID()
Definition AMDGPU.cpp:47
MlirStringRef mlirAMDGPUTDMBaseTypeGetName(void)
Definition AMDGPU.cpp:35
MlirTypeID mlirAMDGPUTDMBaseTypeGetTypeID()
Definition AMDGPU.cpp:27
MlirType mlirAMDGPUTDMDescriptorTypeGet(MlirContext ctx)
Definition AMDGPU.cpp:51
MlirTypeID mlirAMDGPUTDMGatherBaseTypeGetTypeID()
Definition AMDGPU.cpp:67
bool mlirTypeIsAAMDGPUTDMGatherBaseType(MlirType type)
Definition AMDGPU.cpp:63
MlirType mlirAMDGPUTDMGatherBaseTypeGet(MlirContext ctx, MlirType elementType, MlirType indexType)
Definition AMDGPU.cpp:71
MlirStringRef mlirAMDGPUTDMGatherBaseTypeGetName(void)
Definition AMDGPU.cpp:77
MlirStringRef mlirAMDGPUTDMDescriptorTypeGetName(void)
Definition AMDGPU.cpp:55
bool mlirTypeIsAAMDGPUTDMBaseType(MlirType type)
Definition AMDGPU.cpp:23
MlirType mlirAMDGPUTDMBaseTypeGet(MlirContext ctx, MlirType elementType)
Definition AMDGPU.cpp:31
bool mlirTypeIsAAMDGPUTDMDescriptorType(MlirType type)
Definition AMDGPU.cpp:43
#define MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Name, Namespace, ClassName)
MlirDiagnostic wrap(mlir::Diagnostic &diagnostic)
Definition Diagnostics.h:24
mlir::Diagnostic & unwrap(MlirDiagnostic diagnostic)
Definition Diagnostics.h:19
Include the generated interface declarations.
A pointer to a sized fragment of a string, not necessarily null-terminated.
Definition Support.h:75