class OMPTaskReductionClause
Declaration
class OMPTaskReductionClause : public OMPVarListClause,
public OMPClauseWithPostUpdate,
private TrailingObjects { /* full declaration omitted */ };
Description
This represents clause 'task_reduction' in the '#pragma omp taskgroup' directives. In this example directive '#pragma omp taskgroup' has clause 'task_reduction' with operator '+' and the variables 'a' and 'b'.
Declared at: clang/include/clang/AST/OpenMPClause.h:3375
Inherits from: OMPVarListClause, OMPClauseWithPostUpdate, TrailingObjects
Member Variables
- private clang::SourceLocation ColonLoc
- Location of ':'.
- private clang::NestedNameSpecifierLoc QualifierLoc
- Nested name specifier for C++.
- private clang::DeclarationNameInfo NameInfo
- Name of custom operator.
Method Overview
- public static clang::OMPTaskReductionClause * Create(const clang::ASTContext & C, clang::SourceLocation StartLoc, clang::SourceLocation LParenLoc, clang::SourceLocation ColonLoc, clang::SourceLocation EndLoc, ArrayRef<clang::Expr *> VL, clang::NestedNameSpecifierLoc QualifierLoc, const clang::DeclarationNameInfo & NameInfo, ArrayRef<clang::Expr *> Privates, ArrayRef<clang::Expr *> LHSExprs, ArrayRef<clang::Expr *> RHSExprs, ArrayRef<clang::Expr *> ReductionOps, clang::Stmt * PreInit, clang::Expr * PostUpdate)
- public static clang::OMPTaskReductionClause * CreateEmpty(const clang::ASTContext & C, unsigned int N)
- private OMPTaskReductionClause(unsigned int N)
- private OMPTaskReductionClause(clang::SourceLocation StartLoc, clang::SourceLocation LParenLoc, clang::SourceLocation ColonLoc, clang::SourceLocation EndLoc, unsigned int N, clang::NestedNameSpecifierLoc QualifierLoc, const clang::DeclarationNameInfo & NameInfo)
- public clang::OMPClause::const_child_range children() const
- public clang::OMPClause::child_range children()
- public static bool classof(const clang::OMPClause * T)
- public clang::SourceLocation getColonLoc() const
- private MutableArrayRef<clang::Expr *> getLHSExprs()
- private ArrayRef<const clang::Expr *> getLHSExprs() const
- public const clang::DeclarationNameInfo & getNameInfo() const
- private MutableArrayRef<clang::Expr *> getPrivates()
- private ArrayRef<const clang::Expr *> getPrivates() const
- public clang::NestedNameSpecifierLoc getQualifierLoc() const
- private ArrayRef<const clang::Expr *> getRHSExprs() const
- private MutableArrayRef<clang::Expr *> getRHSExprs()
- private MutableArrayRef<clang::Expr *> getReductionOps()
- private ArrayRef<const clang::Expr *> getReductionOps() const
- public clang::OMPTaskReductionClause::helper_expr_const_range lhs_exprs() const
- public clang::OMPTaskReductionClause::helper_expr_range lhs_exprs()
- public clang::OMPTaskReductionClause::helper_expr_const_range privates() const
- public clang::OMPTaskReductionClause::helper_expr_range privates()
- public clang::OMPTaskReductionClause::helper_expr_const_range reduction_ops() const
- public clang::OMPTaskReductionClause::helper_expr_range reduction_ops()
- public clang::OMPTaskReductionClause::helper_expr_const_range rhs_exprs() const
- public clang::OMPTaskReductionClause::helper_expr_range rhs_exprs()
- private void setColonLoc(clang::SourceLocation CL)
- private void setLHSExprs(ArrayRef<clang::Expr *> LHSExprs)
- private void setNameInfo(clang::DeclarationNameInfo DNI)
- private void setPrivates(ArrayRef<clang::Expr *> Privates)
- private void setQualifierLoc(clang::NestedNameSpecifierLoc NSL)
- private void setRHSExprs(ArrayRef<clang::Expr *> RHSExprs)
- private void setReductionOps(ArrayRef<clang::Expr *> ReductionOps)
- public clang::OMPClause::child_range used_children()
- public clang::OMPClause::const_child_range used_children() const
Inherited from OMPClauseWithPostUpdate:
Inherited from OMPClauseWithPreInit:
- public get
- public get
- public getCaptureRegion
- public getPreInitStmt
- public getPreInitStmt
- protected setPreInitStmt
Methods
¶static clang::OMPTaskReductionClause* Create(
const clang::ASTContext& C,
clang::SourceLocation StartLoc,
clang::SourceLocation LParenLoc,
clang::SourceLocation ColonLoc,
clang::SourceLocation EndLoc,
ArrayRef<clang::Expr*> VL,
clang::NestedNameSpecifierLoc QualifierLoc,
const clang::DeclarationNameInfo& NameInfo,
ArrayRef<clang::Expr*> Privates,
ArrayRef<clang::Expr*> LHSExprs,
ArrayRef<clang::Expr*> RHSExprs,
ArrayRef<clang::Expr*> ReductionOps,
clang::Stmt* PreInit,
clang::Expr* PostUpdate)
static clang::OMPTaskReductionClause* Create(
const clang::ASTContext& C,
clang::SourceLocation StartLoc,
clang::SourceLocation LParenLoc,
clang::SourceLocation ColonLoc,
clang::SourceLocation EndLoc,
ArrayRef<clang::Expr*> VL,
clang::NestedNameSpecifierLoc QualifierLoc,
const clang::DeclarationNameInfo& NameInfo,
ArrayRef<clang::Expr*> Privates,
ArrayRef<clang::Expr*> LHSExprs,
ArrayRef<clang::Expr*> RHSExprs,
ArrayRef<clang::Expr*> ReductionOps,
clang::Stmt* PreInit,
clang::Expr* PostUpdate)
Description
Creates clause with a list of variables \a VL. Required for proper codegen of final reduction operation performed by the reduction clause.
Declared at: clang/include/clang/AST/OpenMPClause.h:3515
Parameters
- const clang::ASTContext& C
- clang::SourceLocation StartLoc
- Starting location of the clause.
- clang::SourceLocation LParenLoc
- Location of '('.
- clang::SourceLocation ColonLoc
- Location of ':'.
- clang::SourceLocation EndLoc
- Ending location of the clause.
- ArrayRef<clang::Expr*> VL
- The variables in the clause.
- clang::NestedNameSpecifierLoc QualifierLoc
- The nested-name qualifier with location information
- const clang::DeclarationNameInfo& NameInfo
- The full name info for reduction identifier.
- ArrayRef<clang::Expr*> Privates
- List of helper expressions for proper generation of private copies.
- ArrayRef<clang::Expr*> LHSExprs
- List of helper expressions for proper generation of assignment operation required for copyprivate clause. This list represents LHSs of the reduction expressions.
- ArrayRef<clang::Expr*> RHSExprs
- List of helper expressions for proper generation of assignment operation required for copyprivate clause. This list represents RHSs of the reduction expressions. Also, variables in these expressions are used for proper initialization of reduction copies.
- ArrayRef<clang::Expr*> ReductionOps
- List of helper expressions that represents reduction expressions:
- clang::Stmt* PreInit
- Statement that must be executed before entering the OpenMP region with this clause.
- clang::Expr* PostUpdate
- Expression that must be executed after exit from the OpenMP region with this clause.
¶static clang::OMPTaskReductionClause* CreateEmpty(
const clang::ASTContext& C,
unsigned int N)
static clang::OMPTaskReductionClause* CreateEmpty(
const clang::ASTContext& C,
unsigned int N)
Description
Creates an empty clause with the place for \a N variables.
Declared at: clang/include/clang/AST/OpenMPClause.h:3526
Parameters
- const clang::ASTContext& C
- AST context.
- unsigned int N
- The number of variables.
¶OMPTaskReductionClause(unsigned int N)
OMPTaskReductionClause(unsigned int N)
Description
Build an empty clause.
Declared at: clang/include/clang/AST/OpenMPClause.h:3413
Parameters
- unsigned int N
- Number of variables.
¶OMPTaskReductionClause(
clang::SourceLocation StartLoc,
clang::SourceLocation LParenLoc,
clang::SourceLocation ColonLoc,
clang::SourceLocation EndLoc,
unsigned int N,
clang::NestedNameSpecifierLoc QualifierLoc,
const clang::DeclarationNameInfo& NameInfo)
OMPTaskReductionClause(
clang::SourceLocation StartLoc,
clang::SourceLocation LParenLoc,
clang::SourceLocation ColonLoc,
clang::SourceLocation EndLoc,
unsigned int N,
clang::NestedNameSpecifierLoc QualifierLoc,
const clang::DeclarationNameInfo& NameInfo)
Description
Build clause with number of variables \a N.
Declared at: clang/include/clang/AST/OpenMPClause.h:3401
Parameters
- clang::SourceLocation StartLoc
- Starting location of the clause.
- clang::SourceLocation LParenLoc
- Location of '('.
- clang::SourceLocation ColonLoc
- Location of ':'.
- clang::SourceLocation EndLoc
- Ending location of the clause.
- unsigned int N
- Number of the variables in the clause.
- clang::NestedNameSpecifierLoc QualifierLoc
- The nested-name qualifier with location information
- const clang::DeclarationNameInfo& NameInfo
- The full name info for reduction identifier.
¶clang::OMPClause::const_child_range children()
const
clang::OMPClause::const_child_range children()
const
Declared at: clang/include/clang/AST/OpenMPClause.h:3582
¶clang::OMPClause::child_range children()
clang::OMPClause::child_range children()
Declared at: clang/include/clang/AST/OpenMPClause.h:3577
¶static bool classof(const clang::OMPClause* T)
static bool classof(const clang::OMPClause* T)
Declared at: clang/include/clang/AST/OpenMPClause.h:3594
Parameters
- const clang::OMPClause* T
¶clang::SourceLocation getColonLoc() const
clang::SourceLocation getColonLoc() const
Description
Gets location of ':' symbol in clause.
Declared at: clang/include/clang/AST/OpenMPClause.h:3529
¶MutableArrayRef<clang::Expr*> getLHSExprs()
MutableArrayRef<clang::Expr*> getLHSExprs()
Description
Get the list of helper LHS expressions.
Declared at: clang/include/clang/AST/OpenMPClause.h:3446
¶ArrayRef<const clang::Expr*> getLHSExprs() const
ArrayRef<const clang::Expr*> getLHSExprs() const
Declared at: clang/include/clang/AST/OpenMPClause.h:3449
¶const clang::DeclarationNameInfo& getNameInfo()
const
const clang::DeclarationNameInfo& getNameInfo()
const
Description
Gets the name info for specified reduction identifier.
Declared at: clang/include/clang/AST/OpenMPClause.h:3532
¶MutableArrayRef<clang::Expr*> getPrivates()
MutableArrayRef<clang::Expr*> getPrivates()
Description
Get the list of helper privates.
Declared at: clang/include/clang/AST/OpenMPClause.h:3433
¶ArrayRef<const clang::Expr*> getPrivates() const
ArrayRef<const clang::Expr*> getPrivates() const
Declared at: clang/include/clang/AST/OpenMPClause.h:3436
¶clang::NestedNameSpecifierLoc getQualifierLoc()
const
clang::NestedNameSpecifierLoc getQualifierLoc()
const
Description
Gets the nested name specifier.
Declared at: clang/include/clang/AST/OpenMPClause.h:3535
¶ArrayRef<const clang::Expr*> getRHSExprs() const
ArrayRef<const clang::Expr*> getRHSExprs() const
Declared at: clang/include/clang/AST/OpenMPClause.h:3463
¶MutableArrayRef<clang::Expr*> getRHSExprs()
MutableArrayRef<clang::Expr*> getRHSExprs()
Description
Get the list of helper destination expressions.
Declared at: clang/include/clang/AST/OpenMPClause.h:3460
¶MutableArrayRef<clang::Expr*> getReductionOps()
MutableArrayRef<clang::Expr*> getReductionOps()
Description
Get the list of helper reduction expressions.
Declared at: clang/include/clang/AST/OpenMPClause.h:3474
¶ArrayRef<const clang::Expr*> getReductionOps()
const
ArrayRef<const clang::Expr*> getReductionOps()
const
Declared at: clang/include/clang/AST/OpenMPClause.h:3477
¶clang::OMPTaskReductionClause::
helper_expr_const_range
lhs_exprs() const
clang::OMPTaskReductionClause::
helper_expr_const_range
lhs_exprs() const
Declared at: clang/include/clang/AST/OpenMPClause.h:3551
¶clang::OMPTaskReductionClause::helper_expr_range
lhs_exprs()
clang::OMPTaskReductionClause::helper_expr_range
lhs_exprs()
Declared at: clang/include/clang/AST/OpenMPClause.h:3555
¶clang::OMPTaskReductionClause::
helper_expr_const_range
privates() const
clang::OMPTaskReductionClause::
helper_expr_const_range
privates() const
Declared at: clang/include/clang/AST/OpenMPClause.h:3543
¶clang::OMPTaskReductionClause::helper_expr_range
privates()
clang::OMPTaskReductionClause::helper_expr_range
privates()
Declared at: clang/include/clang/AST/OpenMPClause.h:3547
¶clang::OMPTaskReductionClause::
helper_expr_const_range
reduction_ops() const
clang::OMPTaskReductionClause::
helper_expr_const_range
reduction_ops() const
Declared at: clang/include/clang/AST/OpenMPClause.h:3567
¶clang::OMPTaskReductionClause::helper_expr_range
reduction_ops()
clang::OMPTaskReductionClause::helper_expr_range
reduction_ops()
Declared at: clang/include/clang/AST/OpenMPClause.h:3572
¶clang::OMPTaskReductionClause::
helper_expr_const_range
rhs_exprs() const
clang::OMPTaskReductionClause::
helper_expr_const_range
rhs_exprs() const
Declared at: clang/include/clang/AST/OpenMPClause.h:3559
¶clang::OMPTaskReductionClause::helper_expr_range
rhs_exprs()
clang::OMPTaskReductionClause::helper_expr_range
rhs_exprs()
Declared at: clang/include/clang/AST/OpenMPClause.h:3563
¶void setColonLoc(clang::SourceLocation CL)
void setColonLoc(clang::SourceLocation CL)
Description
Sets location of ':' symbol in clause.
Declared at: clang/include/clang/AST/OpenMPClause.h:3420
Parameters
¶void setLHSExprs(ArrayRef<clang::Expr*> LHSExprs)
void setLHSExprs(ArrayRef<clang::Expr*> LHSExprs)
Description
Set list of helper expressions, required for proper codegen of the clause. These expressions represent LHS expression in the final reduction expression performed by the reduction clause.
Declared at: clang/include/clang/AST/OpenMPClause.h:3443
Parameters
- ArrayRef<clang::Expr*> LHSExprs
¶void setNameInfo(clang::DeclarationNameInfo DNI)
void setNameInfo(clang::DeclarationNameInfo DNI)
Description
Sets the name info for specified reduction identifier.
Declared at: clang/include/clang/AST/OpenMPClause.h:3423
Parameters
¶void setPrivates(ArrayRef<clang::Expr*> Privates)
void setPrivates(ArrayRef<clang::Expr*> Privates)
Description
Set list of helper expressions, required for proper codegen of the clause. These expressions represent private copy of the reduction variable.
Declared at: clang/include/clang/AST/OpenMPClause.h:3430
Parameters
- ArrayRef<clang::Expr*> Privates
¶void setQualifierLoc(
clang::NestedNameSpecifierLoc NSL)
void setQualifierLoc(
clang::NestedNameSpecifierLoc NSL)
Description
Sets the nested name specifier.
Declared at: clang/include/clang/AST/OpenMPClause.h:3426
Parameters
¶void setRHSExprs(ArrayRef<clang::Expr*> RHSExprs)
void setRHSExprs(ArrayRef<clang::Expr*> RHSExprs)
Description
Set list of helper expressions, required for proper codegen of the clause. These expressions represent RHS expression in the final reduction expression performed by the reduction clause. Also, variables in these expressions are used for proper initialization of reduction copies.
Declared at: clang/include/clang/AST/OpenMPClause.h:3457
Parameters
- ArrayRef<clang::Expr*> RHSExprs
¶void setReductionOps(
ArrayRef<clang::Expr*> ReductionOps)
void setReductionOps(
ArrayRef<clang::Expr*> ReductionOps)
Description
Set list of helper reduction expressions, required for proper codegen of the clause. These expressions are binary expressions or operator/custom reduction call that calculates new value from source helper expressions to destination helper expressions.
Declared at: clang/include/clang/AST/OpenMPClause.h:3471
Parameters
- ArrayRef<clang::Expr*> ReductionOps
¶clang::OMPClause::child_range used_children()
clang::OMPClause::child_range used_children()
Declared at: clang/include/clang/AST/OpenMPClause.h:3587
¶clang::OMPClause::const_child_range
used_children() const
clang::OMPClause::const_child_range
used_children() const
Declared at: clang/include/clang/AST/OpenMPClause.h:3590