class OMPTargetParallelForDirective

Declaration

class OMPTargetParallelForDirective : public OMPLoopDirective { /* full declaration omitted */ };

Description

This represents '#pragma omp target parallel for' directive. In this example directive '#pragma omp target parallel for' has clauses 'private' with the variables 'a' and 'b' and 'reduction' with operator '+' and variables 'c' and 'd'.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3393

Inherits from: OMPLoopDirective

Member Variables

private bool HasCancel = false
true if current region has inner cancel directive.

Inherited from OMPLoopBasedDirective:

protected NumAssociatedLoops = 0

Inherited from OMPExecutableDirective:

protected Data = nullptr

Inherited from Stmt:

protected

Method Overview

  • public static clang::OMPTargetParallelForDirective * Create(const clang::ASTContext & C, clang::SourceLocation StartLoc, clang::SourceLocation EndLoc, unsigned int CollapsedNum, ArrayRef<clang::OMPClause *> Clauses, clang::Stmt * AssociatedStmt, const clang::OMPLoopBasedDirective::HelperExprs & Exprs, clang::Expr * TaskRedRef, bool HasCancel)
  • public static clang::OMPTargetParallelForDirective * CreateEmpty(const clang::ASTContext & C, unsigned int NumClauses, unsigned int CollapsedNum, clang::Stmt::EmptyShell)
  • private OMPTargetParallelForDirective(clang::SourceLocation StartLoc, clang::SourceLocation EndLoc, unsigned int CollapsedNum)
  • private OMPTargetParallelForDirective(unsigned int CollapsedNum)
  • public static bool classof(const clang::Stmt * T)
  • public clang::Expr * getTaskReductionRefExpr()
  • public const clang::Expr * getTaskReductionRefExpr() const
  • public bool hasCancel() const
  • private void setHasCancel(bool Has)
  • private void setTaskReductionRefExpr(clang::Expr * E)

Inherited from OMPLoopDirective:

Inherited from OMPLoopBasedDirective:

Inherited from OMPExecutableDirective:

Inherited from Stmt:

Methods

static clang::OMPTargetParallelForDirective*
Create(const clang::ASTContext& C,
       clang::SourceLocation StartLoc,
       clang::SourceLocation EndLoc,
       unsigned int CollapsedNum,
       ArrayRef<clang::OMPClause*> Clauses,
       clang::Stmt* AssociatedStmt,
       const clang::OMPLoopBasedDirective::
           HelperExprs& Exprs,
       clang::Expr* TaskRedRef,
       bool HasCancel)

Description

Creates directive with a list of \a Clauses.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3445

Parameters

const clang::ASTContext& C
AST context.
clang::SourceLocation StartLoc
Starting location of the directive kind.
clang::SourceLocation EndLoc
Ending Location of the directive.
unsigned int CollapsedNum
Number of collapsed loops.
ArrayRef<clang::OMPClause*> Clauses
List of clauses.
clang::Stmt* AssociatedStmt
Statement, associated with the directive.
const clang::OMPLoopBasedDirective::HelperExprs& Exprs
Helper expressions for CodeGen.
clang::Expr* TaskRedRef
Task reduction special reference expression to handle taskgroup descriptor.
bool HasCancel
true if current directive has inner cancel directive.

static clang::OMPTargetParallelForDirective*
CreateEmpty(const clang::ASTContext& C,
            unsigned int NumClauses,
            unsigned int CollapsedNum,
            clang::Stmt::EmptyShell)

Description

Creates an empty directive with the place for \a NumClauses clauses.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3457

Parameters

const clang::ASTContext& C
AST context.
unsigned int NumClauses
Number of clauses.
unsigned int CollapsedNum
Number of collapsed nested loops.
clang::Stmt::EmptyShell

OMPTargetParallelForDirective(
    clang::SourceLocation StartLoc,
    clang::SourceLocation EndLoc,
    unsigned int CollapsedNum)

Description

Build directive with the given start and end location.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3406

Parameters

clang::SourceLocation StartLoc
Starting location of the directive kind.
clang::SourceLocation EndLoc
Ending location of the directive.
unsigned int CollapsedNum
Number of collapsed nested loops.

OMPTargetParallelForDirective(
    unsigned int CollapsedNum)

Description

Build an empty directive.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3416

Parameters

unsigned int CollapsedNum
Number of collapsed nested loops.

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

Declared at: clang/include/clang/AST/StmtOpenMP.h:3475

Parameters

const clang::Stmt* T

clang::Expr* getTaskReductionRefExpr()

Description

Returns special task reduction reference expression.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3463

const clang::Expr* getTaskReductionRefExpr() const

Declared at: clang/include/clang/AST/StmtOpenMP.h:3467

bool hasCancel() const

Description

Return true if current directive has inner cancel directive.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3473

void setHasCancel(bool Has)

Description

Set cancel state.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3428

Parameters

bool Has

void setTaskReductionRefExpr(clang::Expr* E)

Description

Sets special task reduction descriptor.

Declared at: clang/include/clang/AST/StmtOpenMP.h:3422

Parameters

clang::Expr* E