class OMPNumThreadsClause

Declaration

class OMPNumThreadsClause : public OMPClause,
                            public OMPClauseWithPreInit { /* full declaration omitted */ };

Description

This represents 'num_threads' clause in the '#pragma omp ...' directive. In this example directive '#pragma omp parallel' has simple 'num_threads' clause with number of threads '6'.

Declared at: clang/include/clang/AST/OpenMPClause.h:675

Inherits from: OMPClause, OMPClauseWithPreInit

Member Variables

private clang::SourceLocation LParenLoc
Location of '('.
private clang::Stmt* NumThreads = nullptr
Condition of the 'num_threads' clause.

Method Overview

  • public OMPNumThreadsClause(clang::Expr * NumThreads, clang::Stmt * HelperNumThreads, clang::OpenMPDirectiveKind CaptureRegion, clang::SourceLocation StartLoc, clang::SourceLocation LParenLoc, clang::SourceLocation EndLoc)
  • public OMPNumThreadsClause()
  • public clang::OMPClause::child_range children()
  • public clang::OMPClause::const_child_range children() const
  • public static bool classof(const clang::OMPClause * T)
  • public clang::SourceLocation getLParenLoc() const
  • public clang::Expr * getNumThreads() const
  • public void setLParenLoc(clang::SourceLocation Loc)
  • private void setNumThreads(clang::Expr * NThreads)
  • public clang::OMPClause::child_range used_children()
  • public clang::OMPClause::const_child_range used_children() const

Inherited from OMPClauseWithPreInit:

Inherited from OMPClause:

Methods

OMPNumThreadsClause(
    clang::Expr* NumThreads,
    clang::Stmt* HelperNumThreads,
    clang::OpenMPDirectiveKind CaptureRegion,
    clang::SourceLocation StartLoc,
    clang::SourceLocation LParenLoc,
    clang::SourceLocation EndLoc)

Description

Build 'num_threads' clause with condition \a NumThreads.

Declared at: clang/include/clang/AST/OpenMPClause.h:697

Parameters

clang::Expr* NumThreads
Number of threads for the construct.
clang::Stmt* HelperNumThreads
Helper Number of threads for the construct.
clang::OpenMPDirectiveKind CaptureRegion
Innermost OpenMP region where expressions in this clause must be captured.
clang::SourceLocation StartLoc
Starting location of the clause.
clang::SourceLocation LParenLoc
Location of '('.
clang::SourceLocation EndLoc
Ending location of the clause.

OMPNumThreadsClause()

Description

Build an empty clause.

Declared at: clang/include/clang/AST/OpenMPClause.h:708

clang::OMPClause::child_range children()

Declared at: clang/include/clang/AST/OpenMPClause.h:722

clang::OMPClause::const_child_range children()
    const

Declared at: clang/include/clang/AST/OpenMPClause.h:724

static bool classof(const clang::OMPClause* T)

Declared at: clang/include/clang/AST/OpenMPClause.h:735

Parameters

const clang::OMPClause* T

clang::SourceLocation getLParenLoc() const

Description

Returns the location of '('.

Declared at: clang/include/clang/AST/OpenMPClause.h:717

clang::Expr* getNumThreads() const

Description

Returns number of threads.

Declared at: clang/include/clang/AST/OpenMPClause.h:720

void setLParenLoc(clang::SourceLocation Loc)

Description

Sets the location of '('.

Declared at: clang/include/clang/AST/OpenMPClause.h:714

Parameters

clang::SourceLocation Loc

void setNumThreads(clang::Expr* NThreads)

Description

Set condition.

Declared at: clang/include/clang/AST/OpenMPClause.h:685

Parameters

clang::Expr* NThreads

clang::OMPClause::child_range used_children()

Declared at: clang/include/clang/AST/OpenMPClause.h:728

clang::OMPClause::const_child_range
used_children() const

Declared at: clang/include/clang/AST/OpenMPClause.h:731