MLIR
24.0.0git
include
mlir
Dialect
LLVMIR
NVVMAttributes.h
Go to the documentation of this file.
1
//===- NVVMAttributes.h - NVVM enums and attributes -------------*- 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 NVVM dialect enums and attributes.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef MLIR_DIALECT_LLVMIR_NVVMATTRIBUTES_H_
14
#define MLIR_DIALECT_LLVMIR_NVVMATTRIBUTES_H_
15
16
#include "
mlir/Dialect/GPU/IR/CompilationInterfaces.h
"
17
#include "
mlir/Dialect/LLVMIR/LLVMInterfaces.h
"
18
#include "
mlir/Dialect/LLVMIR/NVVMDialectDecl.h
"
19
#include "
mlir/Dialect/Ptr/IR/MemorySpaceInterfaces.h
"
20
#include "
mlir/IR/BuiltinAttributes.h
"
21
22
#include "mlir/Dialect/LLVMIR/NVVMOpsEnums.h.inc"
23
24
namespace
mlir
{
25
namespace
NVVM
{
26
// Shared memory has 128-bit alignment
27
constexpr
int
kSharedMemoryAlignmentBit
= 128;
28
29
/// Utility functions to compare NVVMMemorySpace with unsigned values.
30
inline
bool
operator==
(
unsigned
as, NVVMMemorySpace memSpace) {
31
return
as ==
static_cast<
unsigned
>
(memSpace);
32
}
33
inline
bool
operator==
(NVVMMemorySpace memSpace,
unsigned
as) {
34
return
static_cast<
unsigned
>
(memSpace) == as;
35
}
36
inline
bool
operator!=
(
unsigned
as, NVVMMemorySpace memSpace) {
37
return
as !=
static_cast<
unsigned
>
(memSpace);
38
}
39
inline
bool
operator!=
(NVVMMemorySpace memSpace,
unsigned
as) {
40
return
static_cast<
unsigned
>
(memSpace) != as;
41
}
42
}
// namespace NVVM
43
}
// namespace mlir
44
45
#define GET_ATTRDEF_CLASSES
46
#include "mlir/Dialect/LLVMIR/NVVMOpsAttributes.h.inc"
47
48
#endif
// MLIR_DIALECT_LLVMIR_NVVMATTRIBUTES_H_
CompilationInterfaces.h
LLVMInterfaces.h
MemorySpaceInterfaces.h
NVVMDialectDecl.h
BuiltinAttributes.h
mlir::NVVM
Definition
GPUToNVVM.h:18
mlir::NVVM::kSharedMemoryAlignmentBit
constexpr int kSharedMemoryAlignmentBit
Definition
NVVMAttributes.h:27
mlir::NVVM::operator==
bool operator==(unsigned as, NVVMMemorySpace memSpace)
Utility functions to compare NVVMMemorySpace with unsigned values.
Definition
NVVMAttributes.h:30
mlir::NVVM::operator!=
bool operator!=(unsigned as, NVVMMemorySpace memSpace)
Definition
NVVMAttributes.h:36
mlir
Include the generated interface declarations.
Definition
ABIRewriteContext.h:32
Generated on
for MLIR by
1.14.0