MLIR 24.0.0git
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
21
22#include "mlir/Dialect/LLVMIR/NVVMOpsEnums.h.inc"
23
24namespace mlir {
25namespace NVVM {
26/// Utility functions to compare NVVMMemorySpace with unsigned values.
27inline bool operator==(unsigned as, NVVMMemorySpace memSpace) {
28 return as == static_cast<unsigned>(memSpace);
29}
30inline bool operator==(NVVMMemorySpace memSpace, unsigned as) {
31 return static_cast<unsigned>(memSpace) == as;
32}
33inline bool operator!=(unsigned as, NVVMMemorySpace memSpace) {
34 return as != static_cast<unsigned>(memSpace);
35}
36inline bool operator!=(NVVMMemorySpace memSpace, unsigned as) {
37 return static_cast<unsigned>(memSpace) != as;
38}
39} // namespace NVVM
40} // namespace mlir
41
42#define GET_ATTRDEF_CLASSES
43#include "mlir/Dialect/LLVMIR/NVVMOpsAttributes.h.inc"
44
45#endif // MLIR_DIALECT_LLVMIR_NVVMATTRIBUTES_H_
bool operator==(unsigned as, NVVMMemorySpace memSpace)
Utility functions to compare NVVMMemorySpace with unsigned values.
bool operator!=(unsigned as, NVVMMemorySpace memSpace)
Include the generated interface declarations.