|
MLIR 22.0.0git
|
A wrapper class around a spirv::TargetEnvAttr to provide query methods for allowed version/capabilities/extensions. More...
#include "mlir/Dialect/SPIRV/IR/TargetAndABI.h"
Public Member Functions | |
| TargetEnv (TargetEnvAttr targetAttr) | |
| Version | getVersion () const |
| bool | allows (Capability) const |
| Returns true if the given capability is allowed. | |
| std::optional< Capability > | allows (ArrayRef< Capability >) const |
| Returns the first allowed one if any of the given capabilities is allowed. | |
| bool | allows (Extension) const |
| Returns true if the given extension is allowed. | |
| std::optional< Extension > | allows (ArrayRef< Extension >) const |
| Returns the first allowed one if any of the given extensions is allowed. | |
| Vendor | getVendorID () const |
| Returns the vendor ID. | |
| DeviceType | getDeviceType () const |
| Returns the device type. | |
| uint32_t | getDeviceID () const |
| Returns the device ID. | |
| MLIRContext * | getContext () const |
| Returns the MLIRContext. | |
| ResourceLimitsAttr | getResourceLimits () const |
| Returns the target resource limits. | |
| TargetEnvAttr | getAttr () const |
| operator TargetEnvAttr () const | |
| Allows implicity converting to the underlying spirv::TargetEnvAttr. | |
A wrapper class around a spirv::TargetEnvAttr to provide query methods for allowed version/capabilities/extensions.
Definition at line 29 of file TargetAndABI.h.
|
explicit |
Definition at line 23 of file TargetAndABI.cpp.
References for(), and mlir::spirv::getImpliedExtensions().
| std::optional< Capability > mlir::spirv::TargetEnv::allows | ( | ArrayRef< Capability > | ) | const |
Returns the first allowed one if any of the given capabilities is allowed.
Returns std::nullopt otherwise.
| std::optional< Extension > mlir::spirv::TargetEnv::allows | ( | ArrayRef< Extension > | ) | const |
Returns the first allowed one if any of the given extensions is allowed.
Returns std::nullopt otherwise.
| bool mlir::spirv::TargetEnv::allows | ( | Capability | ) | const |
Returns true if the given capability is allowed.
Referenced by checkAndUpdateCapabilityRequirements(), and checkAndUpdateExtensionRequirements().
| bool mlir::spirv::TargetEnv::allows | ( | Extension | ) | const |
Returns true if the given extension is allowed.
|
inline |
Definition at line 62 of file TargetAndABI.h.
| MLIRContext * spirv::TargetEnv::getContext | ( | ) | const |
Returns the MLIRContext.
Definition at line 87 of file TargetAndABI.cpp.
| uint32_t spirv::TargetEnv::getDeviceID | ( | ) | const |
Returns the device ID.
Definition at line 79 of file TargetAndABI.cpp.
| spirv::DeviceType spirv::TargetEnv::getDeviceType | ( | ) | const |
Returns the device type.
Definition at line 75 of file TargetAndABI.cpp.
| spirv::ResourceLimitsAttr spirv::TargetEnv::getResourceLimits | ( | ) | const |
Returns the target resource limits.
Definition at line 83 of file TargetAndABI.cpp.
| spirv::Vendor spirv::TargetEnv::getVendorID | ( | ) | const |
Returns the vendor ID.
Definition at line 71 of file TargetAndABI.cpp.
| spirv::Version spirv::TargetEnv::getVersion | ( | ) | const |
Definition at line 39 of file TargetAndABI.cpp.
Referenced by getInterfaceVariables().
|
inline |
Allows implicity converting to the underlying spirv::TargetEnvAttr.
Definition at line 65 of file TargetAndABI.h.