clang 24.0.0git
OMPThreadLimitClause Class Referencefinal

This represents 'thread_limit' clause in the '#pragma omp ...' directive. More...

#include "clang/AST/OpenMPClause.h"

Inheritance diagram for OMPThreadLimitClause:
[legend]

Public Member Functions

ArrayRef< Expr * > getThreadLimit ()
 Return ThreadLimit expressions.
ArrayRef< Expr * > getThreadLimit () const
 Return ThreadLimit expressions.
OpenMPThreadLimitClauseModifier getModifier () const
 Get the modifier.
const Expr * getModifierExpr () const
 Get the expression of the modifier.
Expr * getModifierExpr ()
 Get the expression of the modifier.
const Expr * getDimsModifierExpr () const
 Get the expression of the modifier if it is the dims modifier.
SourceLocation getModifierLoc () const
 Get the location of the modifier.
child_range children ()
const_child_range children () const
child_range used_children ()
const_child_range used_children () const

Static Public Member Functions

static OMPThreadLimitClauseCreate (const ASTContext &C, OpenMPDirectiveKind CaptureRegion, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, ArrayRef< Expr * > VL, OpenMPThreadLimitClauseModifier Modifier, Expr *ModifierExpr, SourceLocation ModifierLoc, Stmt *PreInit)
 Creates clause with a list of variables VL.
static OMPThreadLimitClauseCreateEmpty (const ASTContext &C, unsigned N)
 Creates an empty clause with N variables.
static bool classof (const OMPClause *T)

Friends

class OMPClauseReader

Detailed Description

This represents 'thread_limit' clause in the '#pragma omp ...' directive.

#pragma omp teams thread_limit(n)

In this example directive '#pragma omp teams' has clause 'thread_limit' with single expression 'n'.

#pragma omp teams thread_limit(dims(2): x, y)

In this example directive '#pragma omp teams' has clause 'thread_limit' with the 'dims' modifier specifying two dimensions. The list specifies the limit on the number of threads in each dimension.

When 'ompx_bare' clause exists on a 'target' directive, 'thread_limit' clause can accept up to three expressions.

#pragma omp target teams ompx_bare thread_limit(x, y, z)

Definition at line 7246 of file OpenMPClause.h.

Member Function Documentation

◆ children() [1/2]

child_range OMPThreadLimitClause::children ( )
inline

Definition at line 7334 of file OpenMPClause.h.

Referenced by children().

◆ children() [2/2]

const_child_range OMPThreadLimitClause::children ( ) const
inline

Definition at line 7339 of file OpenMPClause.h.

References children().

◆ classof()

bool OMPThreadLimitClause::classof ( const OMPClause * T)
inlinestatic

Definition at line 7350 of file OpenMPClause.h.

◆ Create()

OMPThreadLimitClause * OMPThreadLimitClause::Create ( const ASTContext & C,
OpenMPDirectiveKind CaptureRegion,
SourceLocation StartLoc,
SourceLocation LParenLoc,
SourceLocation EndLoc,
ArrayRef< Expr * > VL,
OpenMPThreadLimitClauseModifier Modifier,
Expr * ModifierExpr,
SourceLocation ModifierLoc,
Stmt * PreInit )
static

Creates clause with a list of variables VL.

Parameters
CAST context.
StartLocStarting location of the clause.
LParenLocLocation of '('.
EndLocEnding location of the clause.
VLList of references to the variables.
ModifierThe modifier specified in the clause.
ModifierExprThe expression of the modifier.
ModifierLocLocation of the modifier.
PreInit

Definition at line 1968 of file OpenMPClause.cpp.

References clang::C.

Referenced by clang::SemaOpenMP::ActOnOpenMPThreadLimitClause().

◆ CreateEmpty()

OMPThreadLimitClause * OMPThreadLimitClause::CreateEmpty ( const ASTContext & C,
unsigned N )
static

Creates an empty clause with N variables.

Parameters
CAST context.
NThe number of variables.

Definition at line 1985 of file OpenMPClause.cpp.

References clang::C.

Referenced by clang::OMPClauseReader::readClause().

◆ getDimsModifierExpr()

const Expr * OMPThreadLimitClause::getDimsModifierExpr ( ) const
inline

Get the expression of the modifier if it is the dims modifier.

Definition at line 7325 of file OpenMPClause.h.

References getModifierExpr().

◆ getModifier()

OpenMPThreadLimitClauseModifier OMPThreadLimitClause::getModifier ( ) const
inline

Get the modifier.

Definition at line 7316 of file OpenMPClause.h.

◆ getModifierExpr() [1/2]

Expr * OMPThreadLimitClause::getModifierExpr ( )
inline

Get the expression of the modifier.

Definition at line 7322 of file OpenMPClause.h.

◆ getModifierExpr() [2/2]

const Expr * OMPThreadLimitClause::getModifierExpr ( ) const
inline

Get the expression of the modifier.

Definition at line 7319 of file OpenMPClause.h.

Referenced by getDimsModifierExpr().

◆ getModifierLoc()

SourceLocation OMPThreadLimitClause::getModifierLoc ( ) const
inline

Get the location of the modifier.

Definition at line 7332 of file OpenMPClause.h.

◆ getThreadLimit() [1/2]

ArrayRef< Expr * > OMPThreadLimitClause::getThreadLimit ( )
inline

Return ThreadLimit expressions.

Definition at line 7308 of file OpenMPClause.h.

Referenced by getThreadLimit().

◆ getThreadLimit() [2/2]

ArrayRef< Expr * > OMPThreadLimitClause::getThreadLimit ( ) const
inline

Return ThreadLimit expressions.

Definition at line 7311 of file OpenMPClause.h.

References getThreadLimit().

◆ used_children() [1/2]

child_range OMPThreadLimitClause::used_children ( )
inline

Definition at line 7343 of file OpenMPClause.h.

◆ used_children() [2/2]

const_child_range OMPThreadLimitClause::used_children ( ) const
inline

Definition at line 7346 of file OpenMPClause.h.

◆ OMPClauseReader

friend class OMPClauseReader
friend

Definition at line 7250 of file OpenMPClause.h.

References OMPClauseReader.

Referenced by OMPClauseReader.


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