class OMPDeclareReductionDecl

Declaration

class OMPDeclareReductionDecl : public ValueDecl, public DeclContext { /* full declaration omitted */ };

Description

This represents '#pragma omp declare reduction ...' directive. For example, in the following, declared reduction 'foo' for types 'int' and 'float': Here 'omp_out += omp_in' is a combiner and 'omp_priv = 0' is an initializer.

Declared at: clang/include/clang/AST/DeclOpenMP.h:171

Inherits from: ValueDecl, DeclContext

Member Variables

private clang::Expr* Combiner = nullptr
Combiner for declare reduction construct.
private clang::Expr* Initializer = nullptr
Initializer for declare reduction construct.
private clang::Expr* In = nullptr
In parameter of the combiner.
private clang::Expr* Out = nullptr
Out parameter of the combiner.
private clang::Expr* Priv = nullptr
Priv parameter of the initializer.
private clang::Expr* Orig = nullptr
Orig parameter of the initializer.
private clang::LazyDeclPtr PrevDeclInScope
Reference to the previous declare reduction construct in the same scope with the same name. Required for proper templates instantiation if the declare reduction construct is declared inside compound statement.

Inherited from DeclContext:

protected
protected FirstDecl = nullptr
protected LastDecl = nullptr

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

Inherited from DeclContext:

Inherited from ValueDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

static clang::OMPDeclareReductionDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::DeclarationName Name,
    clang::QualType T,
    clang::OMPDeclareReductionDecl*
        PrevDeclInScope)

Description

Create declare reduction node.

Declared at: clang/include/clang/AST/DeclOpenMP.h:214

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation L
clang::DeclarationName Name
clang::QualType T
clang::OMPDeclareReductionDecl* PrevDeclInScope

static clang::OMPDeclareReductionDecl*
CreateDeserialized(clang::ASTContext& C,
                   unsigned int ID)

Description

Create deserialized declare reduction node.

Declared at: clang/include/clang/AST/DeclOpenMP.h:217

Parameters

clang::ASTContext& C
unsigned int ID

OMPDeclareReductionDecl(
    clang::Decl::Kind DK,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::DeclarationName Name,
    clang::QualType Ty,
    clang::OMPDeclareReductionDecl*
        PrevDeclInScope)

Declared at: clang/include/clang/AST/DeclOpenMP.h:203

Parameters

clang::Decl::Kind DK
clang::DeclContext* DC
clang::SourceLocation L
clang::DeclarationName Name
clang::QualType Ty
clang::OMPDeclareReductionDecl* PrevDeclInScope

void anchor()

Declared at: clang/include/clang/AST/DeclOpenMP.h:201

static clang::OMPDeclareReductionDecl*
castFromDeclContext(const clang::DeclContext* DC)

Declared at: clang/include/clang/AST/DeclOpenMP.h:272

Parameters

const clang::DeclContext* DC

static clang::DeclContext* castToDeclContext(
    const clang::OMPDeclareReductionDecl* D)

Declared at: clang/include/clang/AST/DeclOpenMP.h:269

Parameters

const clang::OMPDeclareReductionDecl* D

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclOpenMP.h:267

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclOpenMP.h:268

Parameters

clang::Decl::Kind K

const clang::Expr* getCombiner() const

Declared at: clang/include/clang/AST/DeclOpenMP.h:222

clang::Expr* getCombiner()

Description

Get combiner expression of the declare reduction construct.

Declared at: clang/include/clang/AST/DeclOpenMP.h:221

clang::Expr* getCombinerIn()

Description

Get In variable of the combiner.

Declared at: clang/include/clang/AST/DeclOpenMP.h:224

const clang::Expr* getCombinerIn() const

Declared at: clang/include/clang/AST/DeclOpenMP.h:225

clang::Expr* getCombinerOut()

Description

Get Out variable of the combiner.

Declared at: clang/include/clang/AST/DeclOpenMP.h:227

const clang::Expr* getCombinerOut() const

Declared at: clang/include/clang/AST/DeclOpenMP.h:228

clang::Expr* getInitOrig()

Description

Get Orig variable of the initializer.

Declared at: clang/include/clang/AST/DeclOpenMP.h:246

const clang::Expr* getInitOrig() const

Declared at: clang/include/clang/AST/DeclOpenMP.h:247

clang::Expr* getInitPriv()

Description

Get Priv variable of the initializer.

Declared at: clang/include/clang/AST/DeclOpenMP.h:249

const clang::Expr* getInitPriv() const

Declared at: clang/include/clang/AST/DeclOpenMP.h:250

const clang::Expr* getInitializer() const

Declared at: clang/include/clang/AST/DeclOpenMP.h:240

clang::Expr* getInitializer()

Description

Get initializer expression (if specified) of the declare reduction construct.

Declared at: clang/include/clang/AST/DeclOpenMP.h:239

clang::OMPDeclareReductionDecl::InitKind
getInitializerKind() const

Description

Get initializer kind.

Declared at: clang/include/clang/AST/DeclOpenMP.h:242

clang::OMPDeclareReductionDecl*
getPrevDeclInScope()

Description

Get reference to previous declare reduction construct in the same scope with the same name.

Declared at: clang/include/clang/AST/DeclOpenMP.h:264

const clang::OMPDeclareReductionDecl*
getPrevDeclInScope() const

Declared at: clang/include/clang/AST/DeclOpenMP.h:265

void setCombiner(clang::Expr* E)

Description

Set combiner expression for the declare reduction construct.

Declared at: clang/include/clang/AST/DeclOpenMP.h:230

Parameters

clang::Expr* E

void setCombinerData(clang::Expr* InE,
                     clang::Expr* OutE)

Description

Set combiner In and Out vars.

Declared at: clang/include/clang/AST/DeclOpenMP.h:232

Parameters

clang::Expr* InE
clang::Expr* OutE

void setInitializer(
    clang::Expr* E,
    clang::OMPDeclareReductionDecl::InitKind IK)

Description

Set initializer expression for the declare reduction construct.

Declared at: clang/include/clang/AST/DeclOpenMP.h:252

Parameters

clang::Expr* E
clang::OMPDeclareReductionDecl::InitKind IK

void setInitializerData(clang::Expr* OrigE,
                        clang::Expr* PrivE)

Description

Set initializer Orig and Priv vars.

Declared at: clang/include/clang/AST/DeclOpenMP.h:257

Parameters

clang::Expr* OrigE
clang::Expr* PrivE

void setPrevDeclInScope(
    clang::OMPDeclareReductionDecl* Prev)

Declared at: clang/include/clang/AST/DeclOpenMP.h:207

Parameters

clang::OMPDeclareReductionDecl* Prev