class OMPInReductionClause

Declaration

class OMPInReductionClause : public OMPVarListClause,
                             public OMPClauseWithPostUpdate,
                             private TrailingObjects { /* full declaration omitted */ };

Description

This represents clause 'in_reduction' in the '#pragma omp task' directives. In this example directive '#pragma omp task' has clause 'in_reduction' with operator '+' and the variables 'a' and 'b'.

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

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::OMPInReductionClause * 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, ArrayRef<clang::Expr *> TaskgroupDescriptors, clang::Stmt * PreInit, clang::Expr * PostUpdate)
  • public static clang::OMPInReductionClause * CreateEmpty(const clang::ASTContext & C, unsigned int N)
  • private OMPInReductionClause(unsigned int N)
  • private OMPInReductionClause(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 ArrayRef<const clang::Expr *> getPrivates() const
  • private MutableArrayRef<clang::Expr *> getPrivates()
  • public clang::NestedNameSpecifierLoc getQualifierLoc() const
  • private MutableArrayRef<clang::Expr *> getRHSExprs()
  • private ArrayRef<const clang::Expr *> getRHSExprs() const
  • private MutableArrayRef<clang::Expr *> getReductionOps()
  • private ArrayRef<const clang::Expr *> getReductionOps() const
  • private MutableArrayRef<clang::Expr *> getTaskgroupDescriptors()
  • private ArrayRef<const clang::Expr *> getTaskgroupDescriptors() const
  • public clang::OMPInReductionClause::helper_expr_const_range lhs_exprs() const
  • public clang::OMPInReductionClause::helper_expr_range lhs_exprs()
  • public clang::OMPInReductionClause::helper_expr_const_range privates() const
  • public clang::OMPInReductionClause::helper_expr_range privates()
  • public clang::OMPInReductionClause::helper_expr_const_range reduction_ops() const
  • public clang::OMPInReductionClause::helper_expr_range reduction_ops()
  • public clang::OMPInReductionClause::helper_expr_range rhs_exprs()
  • public clang::OMPInReductionClause::helper_expr_const_range rhs_exprs() const
  • 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)
  • private void setTaskgroupDescriptors(ArrayRef<clang::Expr *> ReductionOps)
  • public clang::OMPInReductionClause::helper_expr_const_range taskgroup_descriptors() const
  • public clang::OMPInReductionClause::helper_expr_range taskgroup_descriptors()
  • public clang::OMPClause::child_range used_children()
  • public clang::OMPClause::const_child_range used_children() const

Inherited from OMPClauseWithPostUpdate:

Inherited from OMPClauseWithPreInit:

Methods

static clang::OMPInReductionClause* 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,
    ArrayRef<clang::Expr*> TaskgroupDescriptors,
    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:3759

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:
ArrayRef<clang::Expr*> TaskgroupDescriptors
List of helper taskgroup descriptors for corresponding items in parent taskgroup task_reduction clause.
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::OMPInReductionClause* 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:3771

Parameters

const clang::ASTContext& C
AST context.
unsigned int N
The number of variables.

OMPInReductionClause(unsigned int N)

Description

Build an empty clause.

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

Parameters

unsigned int N
Number of variables.

OMPInReductionClause(
    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:3632

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

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

clang::OMPClause::child_range children()

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

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

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

Parameters

const clang::OMPClause* T

clang::SourceLocation getColonLoc() const

Description

Gets location of ':' symbol in clause.

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

MutableArrayRef<clang::Expr*> getLHSExprs()

Description

Get the list of helper LHS expressions.

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

ArrayRef<const clang::Expr*> getLHSExprs() const

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

const clang::DeclarationNameInfo& getNameInfo()
    const

Description

Gets the name info for specified reduction identifier.

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

ArrayRef<const clang::Expr*> getPrivates() const

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

MutableArrayRef<clang::Expr*> getPrivates()

Description

Get the list of helper privates.

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

clang::NestedNameSpecifierLoc getQualifierLoc()
    const

Description

Gets the nested name specifier.

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

MutableArrayRef<clang::Expr*> getRHSExprs()

Description

Get the list of helper destination expressions.

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

ArrayRef<const clang::Expr*> getRHSExprs() const

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

MutableArrayRef<clang::Expr*> getReductionOps()

Description

Get the list of helper reduction expressions.

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

ArrayRef<const clang::Expr*> getReductionOps()
    const

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

MutableArrayRef<clang::Expr*>
getTaskgroupDescriptors()

Description

Get the list of helper reduction taskgroup descriptors.

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

ArrayRef<const clang::Expr*>
getTaskgroupDescriptors() const

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

clang::OMPInReductionClause::
    helper_expr_const_range
    lhs_exprs() const

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

clang::OMPInReductionClause::helper_expr_range
lhs_exprs()

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

clang::OMPInReductionClause::
    helper_expr_const_range
    privates() const

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

clang::OMPInReductionClause::helper_expr_range
privates()

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

clang::OMPInReductionClause::
    helper_expr_const_range
    reduction_ops() const

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

clang::OMPInReductionClause::helper_expr_range
reduction_ops()

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

clang::OMPInReductionClause::helper_expr_range
rhs_exprs()

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

clang::OMPInReductionClause::
    helper_expr_const_range
    rhs_exprs() const

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

void setColonLoc(clang::SourceLocation CL)

Description

Sets location of ':' symbol in clause.

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

Parameters

clang::SourceLocation CL

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:3674

Parameters

ArrayRef<clang::Expr*> LHSExprs

void setNameInfo(clang::DeclarationNameInfo DNI)

Description

Sets the name info for specified reduction identifier.

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

Parameters

clang::DeclarationNameInfo DNI

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:3661

Parameters

ArrayRef<clang::Expr*> Privates

void setQualifierLoc(
    clang::NestedNameSpecifierLoc NSL)

Description

Sets the nested name specifier.

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

Parameters

clang::NestedNameSpecifierLoc NSL

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:3688

Parameters

ArrayRef<clang::Expr*> RHSExprs

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:3702

Parameters

ArrayRef<clang::Expr*> ReductionOps

void setTaskgroupDescriptors(
    ArrayRef<clang::Expr*> ReductionOps)

Description

Set list of helper reduction taskgroup descriptors.

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

Parameters

ArrayRef<clang::Expr*> ReductionOps

clang::OMPInReductionClause::
    helper_expr_const_range
    taskgroup_descriptors() const

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

clang::OMPInReductionClause::helper_expr_range
taskgroup_descriptors()

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

clang::OMPClause::child_range used_children()

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

clang::OMPClause::const_child_range
used_children() const

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