clang 10.0.0

Public Member Functions | Static Public Member Functions | Friends | List of all members
OMPDependClause Class Referencefinal

This represents implicit clause 'depend' for the '#pragma omp task' directive. More...

`#include "clang/AST/OpenMPClause.h"`

Inheritance diagram for OMPDependClause:
[legend]
Collaboration diagram for OMPDependClause:
[legend]

## Public Member Functions
OpenMPDependClauseKind | getDependencyKind () const
| Get dependency type. More...
SourceLocation | getDependencyLoc () const
| Get dependency type location. More...
SourceLocation | getColonLoc () const
| Get colon location. More...
unsigned | getNumLoops () const
| Get number of loops associated with the clause. More...
void | setLoopData (unsigned NumLoop, Expr *Cnt)
| Set the loop data for the depend clauses with 'sink|source' kind of dependency. More...
Expr * | getLoopData (unsigned NumLoop)
| Get the loop data. More...
const Expr * | getLoopData (unsigned NumLoop) const
child_range | children ()
const_child_range | children () const
child_range | used_children ()
const_child_range | used_children () const

## Static Public Member Functions
static OMPDependClause * | Create (const ASTContext &C, SourceLocation StartLoc, SourceLocation LParenLoc, SourceLocation EndLoc, OpenMPDependClauseKind DepKind, SourceLocation DepLoc, SourceLocation ColonLoc, ArrayRef< Expr *> VL, unsigned NumLoops)
| Creates clause with a list of variables VL. More...
static OMPDependClause * | CreateEmpty (const ASTContext &C, unsigned N, unsigned NumLoops)
| Creates an empty clause with N variables. More...
static bool | classof (const OMPClause *T)

## Friends
class | OMPClauseReader

## Detailed Description

This represents implicit clause 'depend' for the '#pragma omp task' directive.

#pragma omp task depend(in:a,b)

In this example directive '#pragma omp task' with clause 'depend' with the variables 'a' and 'b' with dependency 'in'.

Definition at line 3958 of file OpenMPClause.h.

## Member Function Documentation

## ◆ children() [1/2]

child_range OMPDependClause::children | ( |  | ) |
| inline

Definition at line 4059 of file OpenMPClause.h.

## ◆ children() [2/2]

const_child_range OMPDependClause::children | ( |  | ) | const
| inline

Definition at line 4064 of file OpenMPClause.h.

References clang::OMPClause::children().

## ◆ classof()

static bool OMPDependClause::classof | ( | const OMPClause * | T | ) |
| inline static

Definition at line 4076 of file OpenMPClause.h.

## ◆ Create()

OMPDependClause * OMPDependClause::Create | ( | const ASTContext & | C,
|  | SourceLocation | StartLoc,
|  | SourceLocation | LParenLoc,
|  | SourceLocation | EndLoc,
|  | OpenMPDependClauseKind | DepKind,
|  | SourceLocation | DepLoc,
|  | SourceLocation | ColonLoc,
|  | ArrayRef< Expr *> | VL,
|  | unsigned | NumLoops
| ) |  |
| static

Creates clause with a list of variables VL.

Parameters

  C | AST context.
  StartLoc | Starting location of the clause.
  LParenLoc | Location of '('.
  EndLoc | Ending location of the clause.
  DepKind | Dependency type.
  DepLoc | Location of the dependency type.
  ColonLoc | Colon location.
  VL | List of references to the variables.
  NumLoops | Number of loops that is associated with this depend clause.

Definition at line 829 of file OpenMPClause.cpp.

References clang::ASTContext::Allocate(), and setLoopData().

## ◆ CreateEmpty()

OMPDependClause * OMPDependClause::CreateEmpty | ( | const ASTContext & | C,
|  | unsigned | N,
|  | unsigned | NumLoops
| ) |  |
| static

Creates an empty clause with N variables.

Parameters

  C | AST context.
  N | The number of variables.
  NumLoops | Number of loops that is associated with this depend clause.

Definition at line 846 of file OpenMPClause.cpp.

References clang::ASTContext::Allocate().

## ◆ getColonLoc()

SourceLocation OMPDependClause::getColonLoc | ( |  | ) | const
| inline

Get colon location.

Definition at line 4046 of file OpenMPClause.h.

References ColonLoc.

Referenced by clang::TreeTransform< Derived >::TransformOMPExecutableDirective(), and clang::ASTRecordWriter::writeOMPClause().

## ◆ getDependencyKind()

OpenMPDependClauseKind OMPDependClause::getDependencyKind | ( |  | ) | const
| inline

Get dependency type.

Definition at line 4040 of file OpenMPClause.h.

Referenced by clang::CodeGen::emitDeclareSimdFunction(), clang::TreeTransform< Derived >::TransformOMPExecutableDirective(), and clang::ASTRecordWriter::writeOMPClause().

## ◆ getDependencyLoc()

SourceLocation OMPDependClause::getDependencyLoc | ( |  | ) | const
| inline

Get dependency type location.

Definition at line 4043 of file OpenMPClause.h.

Referenced by clang::TreeTransform< Derived >::TransformOMPExecutableDirective(), and clang::ASTRecordWriter::writeOMPClause().

## ◆ getLoopData() [1/2]

Expr * OMPDependClause::getLoopData | ( | unsigned | NumLoop | ) |

Get the loop data.

Definition at line 862 of file OpenMPClause.cpp.

Referenced by clang::CodeGen::emitDeclareSimdFunction(), and clang::ASTRecordWriter::writeOMPClause().

## ◆ getLoopData() [2/2]

const Expr * OMPDependClause::getLoopData | ( | unsigned | NumLoop | ) | const

Definition at line 872 of file OpenMPClause.cpp.

## ◆ getNumLoops()

unsigned OMPDependClause::getNumLoops | ( |  | ) | const
| inline

Get number of loops associated with the clause.

Definition at line 4049 of file OpenMPClause.h.

Referenced by clang::CodeGen::emitDeclareSimdFunction(), clang::OMPClauseReader::VisitOMPClauseWithPostUpdate(), and clang::ASTRecordWriter::writeOMPClause().

## ◆ setLoopData()

void OMPDependClause::setLoopData | ( | unsigned | NumLoop,
|  | Expr * | Cnt
| ) |  |

Set the loop data for the depend clauses with 'sink|source' kind of dependency.

Definition at line 852 of file OpenMPClause.cpp.

Referenced by Create(), and clang::OMPClauseReader::VisitOMPClauseWithPostUpdate().

## ◆ used_children() [1/2]

child_range OMPDependClause::used_children | ( |  | ) |
| inline

Definition at line 4069 of file OpenMPClause.h.

## ◆ used_children() [2/2]

const_child_range OMPDependClause::used_children | ( |  | ) | const
| inline

Definition at line 4072 of file OpenMPClause.h.

## Friends And Related Function Documentation

## ◆ OMPClauseReader

friend class OMPClauseReader
| friend

Definition at line 3961 of file OpenMPClause.h.

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

- include/clang/AST/OpenMPClause.h
- lib/AST/OpenMPClause.cpp