class OMPLinearClause

Declaration

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

Description

This represents clause 'linear' in the '#pragma omp ...' directives. In this example directive '#pragma omp simd' has clause 'linear' with variables 'a', 'b' and linear step '2'.

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

Inherits from: OMPVarListClause, OMPClauseWithPostUpdate, TrailingObjects

Member Variables

private clang::OpenMPLinearClauseKind Modifier = OMPC_LINEAR_val
Modifier of 'linear' clause.
private clang::SourceLocation ModifierLoc
Location of linear modifier if any.
private clang::SourceLocation ColonLoc
Location of ':'.

Method Overview

  • public static clang::OMPLinearClause * Create(const clang::ASTContext & C, clang::SourceLocation StartLoc, clang::SourceLocation LParenLoc, clang::OpenMPLinearClauseKind Modifier, clang::SourceLocation ModifierLoc, clang::SourceLocation ColonLoc, clang::SourceLocation EndLoc, ArrayRef<clang::Expr *> VL, ArrayRef<clang::Expr *> PL, ArrayRef<clang::Expr *> IL, clang::Expr * Step, clang::Expr * CalcStep, clang::Stmt * PreInit, clang::Expr * PostUpdate)
  • public static clang::OMPLinearClause * CreateEmpty(const clang::ASTContext & C, unsigned int NumVars)
  • private OMPLinearClause(clang::SourceLocation StartLoc, clang::SourceLocation LParenLoc, clang::OpenMPLinearClauseKind Modifier, clang::SourceLocation ModifierLoc, clang::SourceLocation ColonLoc, clang::SourceLocation EndLoc, unsigned int NumVars)
  • private OMPLinearClause(unsigned int NumVars)
  • public clang::OMPClause::const_child_range children() const
  • public clang::OMPClause::child_range children()
  • public static bool classof(const clang::OMPClause * T)
  • public clang::OMPLinearClause::finals_const_range finals() const
  • public clang::OMPLinearClause::finals_range finals()
  • public const clang::Expr * getCalcStep() const
  • public clang::Expr * getCalcStep()
  • public clang::SourceLocation getColonLoc() const
  • private ArrayRef<const clang::Expr *> getFinals() const
  • private MutableArrayRef<clang::Expr *> getFinals()
  • private MutableArrayRef<clang::Expr *> getInits()
  • private ArrayRef<const clang::Expr *> getInits() const
  • public clang::OpenMPLinearClauseKind getModifier() const
  • public clang::SourceLocation getModifierLoc() const
  • private MutableArrayRef<clang::Expr *> getPrivates()
  • private ArrayRef<const clang::Expr *> getPrivates() const
  • public const clang::Expr * getStep() const
  • public clang::Expr * getStep()
  • private MutableArrayRef<clang::Expr *> getUpdates()
  • private ArrayRef<const clang::Expr *> getUpdates() const
  • private ArrayRef<const clang::Expr *> getUsedExprs() const
  • private MutableArrayRef<clang::Expr *> getUsedExprs()
  • public clang::OMPLinearClause::inits_const_range inits() const
  • public clang::OMPLinearClause::inits_range inits()
  • public clang::OMPLinearClause::privates_const_range privates() const
  • public clang::OMPLinearClause::privates_range privates()
  • private void setCalcStep(clang::Expr * CalcStep)
  • public void setColonLoc(clang::SourceLocation Loc)
  • public void setFinals(ArrayRef<clang::Expr *> FL)
  • private void setInits(ArrayRef<clang::Expr *> IL)
  • public void setModifier(clang::OpenMPLinearClauseKind Kind)
  • public void setModifierLoc(clang::SourceLocation Loc)
  • private void setPrivates(ArrayRef<clang::Expr *> PL)
  • private void setStep(clang::Expr * Step)
  • public void setUpdates(ArrayRef<clang::Expr *> UL)
  • public void setUsedExprs(ArrayRef<clang::Expr *> UE)
  • public clang::OMPLinearClause::updates_range updates()
  • public clang::OMPLinearClause::updates_const_range updates() const
  • public clang::OMPClause::child_range used_children()
  • public clang::OMPClause::const_child_range used_children() const
  • public clang::OMPLinearClause::used_expressions_range used_expressions()
  • public clang::OMPLinearClause::used_expressions_const_range used_expressions() const

Inherited from OMPClauseWithPostUpdate:

Inherited from OMPClauseWithPreInit:

Methods

static clang::OMPLinearClause* Create(
    const clang::ASTContext& C,
    clang::SourceLocation StartLoc,
    clang::SourceLocation LParenLoc,
    clang::OpenMPLinearClauseKind Modifier,
    clang::SourceLocation ModifierLoc,
    clang::SourceLocation ColonLoc,
    clang::SourceLocation EndLoc,
    ArrayRef<clang::Expr*> VL,
    ArrayRef<clang::Expr*> PL,
    ArrayRef<clang::Expr*> IL,
    clang::Expr* Step,
    clang::Expr* CalcStep,
    clang::Stmt* PreInit,
    clang::Expr* PostUpdate)

Description

Creates clause with a list of variables \a VL and a linear step\a Step.

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

Parameters

const clang::ASTContext& C
AST Context.
clang::SourceLocation StartLoc
Starting location of the clause.
clang::SourceLocation LParenLoc
Location of '('.
clang::OpenMPLinearClauseKind Modifier
Modifier of 'linear' clause.
clang::SourceLocation ModifierLoc
Modifier location.
clang::SourceLocation ColonLoc
Location of ':'.
clang::SourceLocation EndLoc
Ending location of the clause.
ArrayRef<clang::Expr*> VL
List of references to the variables.
ArrayRef<clang::Expr*> PL
List of private copies of original variables.
ArrayRef<clang::Expr*> IL
List of initial values for the variables.
clang::Expr* Step
Linear step.
clang::Expr* CalcStep
Calculation of the linear step.
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::OMPLinearClause* CreateEmpty(
    const clang::ASTContext& C,
    unsigned int NumVars)

Description

Creates an empty clause with the place for \a NumVars variables.

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

Parameters

const clang::ASTContext& C
AST context.
unsigned int NumVars
Number of variables.

OMPLinearClause(
    clang::SourceLocation StartLoc,
    clang::SourceLocation LParenLoc,
    clang::OpenMPLinearClauseKind Modifier,
    clang::SourceLocation ModifierLoc,
    clang::SourceLocation ColonLoc,
    clang::SourceLocation EndLoc,
    unsigned int NumVars)

Description

Build 'linear' clause with given number of variables \a NumVars.

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

Parameters

clang::SourceLocation StartLoc
Starting location of the clause.
clang::SourceLocation LParenLoc
Location of '('.
clang::OpenMPLinearClauseKind Modifier
clang::SourceLocation ModifierLoc
clang::SourceLocation ColonLoc
Location of ':'.
clang::SourceLocation EndLoc
Ending location of the clause.
unsigned int NumVars
Number of variables.

OMPLinearClause(unsigned int NumVars)

Description

Build an empty clause.

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

Parameters

unsigned int NumVars
Number of variables.

clang::OMPClause::const_child_range children()
    const

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

clang::OMPClause::child_range children()

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

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

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

Parameters

const clang::OMPClause* T

clang::OMPLinearClause::finals_const_range
finals() const

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

clang::OMPLinearClause::finals_range finals()

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

const clang::Expr* getCalcStep() const

Description

Returns expression to calculate linear step.

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

clang::Expr* getCalcStep()

Description

Returns expression to calculate linear step.

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

clang::SourceLocation getColonLoc() const

Description

Returns the location of ':'.

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

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

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

MutableArrayRef<clang::Expr*> getFinals()

Description

Sets the list of final update expressions for linear variables.

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

MutableArrayRef<clang::Expr*> getInits()

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

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

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

clang::OpenMPLinearClauseKind getModifier() const

Description

Return modifier.

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

clang::SourceLocation getModifierLoc() const

Description

Return modifier location.

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

MutableArrayRef<clang::Expr*> getPrivates()

Description

Gets the list of initial values for linear variables. There are NumVars expressions with initial values allocated after the varlist, they are followed by NumVars update expressions (used to update the linear variable's value on current iteration) and they are followed by NumVars final expressions (used to calculate the linear variable's value after the loop body). After these lists, there are 2 helper expressions - linear step and a helper to calculate it before the loop body (used when the linear step is not constant): { Vars[] /* in OMPVarListClause */; Privates[]; Inits[]; Updates[]; Finals[]; Step; CalcStep; }

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

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

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

const clang::Expr* getStep() const

Description

Returns linear step.

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

clang::Expr* getStep()

Description

Returns linear step.

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

MutableArrayRef<clang::Expr*> getUpdates()

Description

Sets the list of update expressions for linear variables.

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

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

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

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

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

MutableArrayRef<clang::Expr*> getUsedExprs()

Description

Gets the list of used expressions for linear variables.

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

clang::OMPLinearClause::inits_const_range inits()
    const

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

clang::OMPLinearClause::inits_range inits()

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

clang::OMPLinearClause::privates_const_range
privates() const

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

clang::OMPLinearClause::privates_range privates()

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

void setCalcStep(clang::Expr* CalcStep)

Description

Sets the expression to calculate linear step for clause.

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

Parameters

clang::Expr* CalcStep

void setColonLoc(clang::SourceLocation Loc)

Description

Sets the location of ':'.

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

Parameters

clang::SourceLocation Loc

void setFinals(ArrayRef<clang::Expr*> FL)

Description

Sets the list of final update expressions for linear variables.

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

Parameters

ArrayRef<clang::Expr*> FL
List of expressions.

void setInits(ArrayRef<clang::Expr*> IL)

Description

Sets the list of the initial values for linear variables.

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

Parameters

ArrayRef<clang::Expr*> IL
List of expressions.

void setModifier(
    clang::OpenMPLinearClauseKind Kind)

Description

Set modifier.

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

Parameters

clang::OpenMPLinearClauseKind Kind

void setModifierLoc(clang::SourceLocation Loc)

Description

Set modifier location.

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

Parameters

clang::SourceLocation Loc

void setPrivates(ArrayRef<clang::Expr*> PL)

Description

Sets the list of the copies of original linear variables.

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

Parameters

ArrayRef<clang::Expr*> PL
List of expressions.

void setStep(clang::Expr* Step)

Description

Sets the linear step for clause.

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

Parameters

clang::Expr* Step

void setUpdates(ArrayRef<clang::Expr*> UL)

Description

Sets the list of update expressions for linear variables.

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

Parameters

ArrayRef<clang::Expr*> UL
List of expressions.

void setUsedExprs(ArrayRef<clang::Expr*> UE)

Description

Sets the list of used expressions for the linear clause.

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

Parameters

ArrayRef<clang::Expr*> UE

clang::OMPLinearClause::updates_range updates()

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

clang::OMPLinearClause::updates_const_range
updates() const

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

clang::OMPClause::child_range used_children()

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

clang::OMPClause::const_child_range
used_children() const

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

clang::OMPLinearClause::used_expressions_range
used_expressions()

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

clang::OMPLinearClause::
    used_expressions_const_range
    used_expressions() const

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