LLVM 24.0.0git
llvm::IntelGPU::IGCATarget Class Reference

Wrapper around an IGCA target's uint32_t representation, packed using the following format: More...

#include "llvm/TargetParser/IntelGPUTargetParser.h"

Public Member Functions

 IGCATarget (uint16_t Target, IGCAFeatureSet FeatureSet)
constexpr uint32_t pack () const
constexpr uint16_t getTarget () const
constexpr IGCAFeatureSet getFeatureSet () const
constexpr bool isExact () const
constexpr bool isValid () const
constexpr operator bool () const
constexpr bool isCore () const
constexpr bool isComputeExact () const
constexpr bool isRenderExact () const
constexpr bool isAnyCompute () const
constexpr bool isAnyRender () const

Static Public Member Functions

static constexpr IGCATarget invalid ()
static IGCATarget unpack (uint32_t V)
 Wrap a packed uint32_t IGCA target with an IGCATarget class.

Friends

constexpr bool operator== (IGCATarget A, IGCATarget B)
constexpr bool operator!= (IGCATarget A, IGCATarget B)

Detailed Description

Wrapper around an IGCA target's uint32_t representation, packed using the following format:

31 16 15 3 2 0 +---------------—+---------------------—+------------—+ | Target | Reserved | Feature set | +---------------—+---------------------—+------------—+ 16 bits 13 bits 3 bits

Note that bit 0 is a flag that represents if the feature set is "exact". Only IGCA targets that some device in IntelGPUTargetParser.def can run are valid; any other value is stored as invalid(), whose packed representation is 0.

Definition at line 64 of file IntelGPUTargetParser.h.

Constructor & Destructor Documentation

◆ IGCATarget()

llvm::IntelGPU::IGCATarget::IGCATarget ( uint16_t Target,
IGCAFeatureSet FeatureSet )
inline

Definition at line 92 of file IntelGPUTargetParser.h.

References llvm::to_underlying().

Member Function Documentation

◆ getFeatureSet()

IGCAFeatureSet llvm::IntelGPU::IGCATarget::getFeatureSet ( ) const
inlineconstexpr
Returns
the feature set, including whether it is exact.

To check if a target has a feature set regardless of exactness, use isAnyCompute() or isAnyRender() instead of raw comparison between IGCAFeatureSet enums.

Definition at line 110 of file IntelGPUTargetParser.h.

Referenced by isAnyCompute(), isAnyRender(), isComputeExact(), isCore(), and isRenderExact().

◆ getTarget()

uint16_t llvm::IntelGPU::IGCATarget::getTarget ( ) const
inlineconstexpr

Definition at line 104 of file IntelGPUTargetParser.h.

Referenced by isValid().

◆ invalid()

constexpr IGCATarget llvm::IntelGPU::IGCATarget::invalid ( )
inlinestaticconstexpr
Returns
an invalid IGCATarget (whose packed representation is 0).

Definition at line 97 of file IntelGPUTargetParser.h.

Referenced by llvm::IntelGPU::parseIGCATarget().

◆ isAnyCompute()

bool llvm::IntelGPU::IGCATarget::isAnyCompute ( ) const
inlineconstexpr
Returns
true if target has either Compute or ComputeExact feature set.

Definition at line 129 of file IntelGPUTargetParser.h.

References llvm::IntelGPU::Compute, llvm::IntelGPU::ComputeExact, and getFeatureSet().

◆ isAnyRender()

bool llvm::IntelGPU::IGCATarget::isAnyRender ( ) const
inlineconstexpr
Returns
true if target has either Render or RenderExact feature set.

Definition at line 134 of file IntelGPUTargetParser.h.

References getFeatureSet(), llvm::IntelGPU::Render, and llvm::IntelGPU::RenderExact.

◆ isComputeExact()

bool llvm::IntelGPU::IGCATarget::isComputeExact ( ) const
inlineconstexpr

Definition at line 122 of file IntelGPUTargetParser.h.

References llvm::IntelGPU::ComputeExact, and getFeatureSet().

◆ isCore()

bool llvm::IntelGPU::IGCATarget::isCore ( ) const
inlineconstexpr
Returns
true if the target has the Core feature set.

Definition at line 118 of file IntelGPUTargetParser.h.

References llvm::IntelGPU::Core, getFeatureSet(), and isValid().

◆ isExact()

bool llvm::IntelGPU::IGCATarget::isExact ( ) const
inlineconstexpr

Definition at line 113 of file IntelGPUTargetParser.h.

◆ isRenderExact()

bool llvm::IntelGPU::IGCATarget::isRenderExact ( ) const
inlineconstexpr

Definition at line 125 of file IntelGPUTargetParser.h.

References getFeatureSet(), and llvm::IntelGPU::RenderExact.

◆ isValid()

bool llvm::IntelGPU::IGCATarget::isValid ( ) const
inlineconstexpr

Definition at line 114 of file IntelGPUTargetParser.h.

References getTarget().

Referenced by isCore(), and operator bool().

◆ operator bool()

llvm::IntelGPU::IGCATarget::operator bool ( ) const
inlineexplicitconstexpr

Definition at line 115 of file IntelGPUTargetParser.h.

References isValid().

◆ pack()

uint32_t llvm::IntelGPU::IGCATarget::pack ( ) const
inlineconstexpr
Returns
the packed uint32_t representation of the IGCA target.

Definition at line 100 of file IntelGPUTargetParser.h.

◆ unpack()

IGCATarget llvm::IntelGPU::IGCATarget::unpack ( uint32_t V)
inlinestatic

Wrap a packed uint32_t IGCA target with an IGCATarget class.

Definition at line 102 of file IntelGPUTargetParser.h.

◆ operator!=

bool operator!= ( IGCATarget A,
IGCATarget B )
friend

Definition at line 142 of file IntelGPUTargetParser.h.

References A(), and B().

◆ operator==

bool operator== ( IGCATarget A,
IGCATarget B )
friend

Definition at line 139 of file IntelGPUTargetParser.h.

References A(), and B().


The documentation for this class was generated from the following files: