class OMPUsesAllocatorsClause

Declaration

class OMPUsesAllocatorsClause : public OMPClause,
                                private TrailingObjects { /* full declaration omitted */ };

Description

This represents clause 'uses_allocators' in the '#pragma omp target'-based directives. In this example directive '#pragma omp target' has clause 'uses_allocators' with the allocators 'default_allocator' and user-defined 'my_allocator'.

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

Inherits from: OMPClause, TrailingObjects

Member Variables

private clang::SourceLocation LParenLoc
Location of '('.
private unsigned int NumOfAllocators = 0
Total number of allocators in the clause.

Method Overview

  • public static clang::OMPUsesAllocatorsClause * Create(const clang::ASTContext & C, clang::SourceLocation StartLoc, clang::SourceLocation LParenLoc, clang::SourceLocation EndLoc, ArrayRef<OMPUsesAllocatorsClause::Data> Data)
  • public static clang::OMPUsesAllocatorsClause * CreateEmpty(const clang::ASTContext & C, unsigned int N)
  • private OMPUsesAllocatorsClause(clang::SourceLocation StartLoc, clang::SourceLocation LParenLoc, clang::SourceLocation EndLoc, unsigned int N)
  • private OMPUsesAllocatorsClause(unsigned int N)
  • public clang::OMPClause::child_range children()
  • public clang::OMPClause::const_child_range children() const
  • public static bool classof(const clang::OMPClause * T)
  • public OMPUsesAllocatorsClause::Data getAllocatorData(unsigned int I) const
  • public clang::SourceLocation getLParenLoc() const
  • public unsigned int getNumberOfAllocators() const
  • private unsigned int numTrailingObjects(OverloadToken<clang::Expr *>) const
  • private void setAllocatorsData(ArrayRef<OMPUsesAllocatorsClause::Data> Data)
  • private void setLParenLoc(clang::SourceLocation Loc)
  • public clang::OMPClause::child_range used_children()
  • public clang::OMPClause::const_child_range used_children() const

Inherited from OMPClause:

Methods

static clang::OMPUsesAllocatorsClause* Create(
    const clang::ASTContext& C,
    clang::SourceLocation StartLoc,
    clang::SourceLocation LParenLoc,
    clang::SourceLocation EndLoc,
    ArrayRef<OMPUsesAllocatorsClause::Data> Data)

Description

Creates clause with a list of allocators \p Data.

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

Parameters

const clang::ASTContext& C
AST context.
clang::SourceLocation StartLoc
Starting location of the clause.
clang::SourceLocation LParenLoc
Location of '('.
clang::SourceLocation EndLoc
Ending location of the clause.
ArrayRef<OMPUsesAllocatorsClause::Data> Data
List of allocators.

static clang::OMPUsesAllocatorsClause*
CreateEmpty(const clang::ASTContext& C,
            unsigned int N)

Description

Creates an empty clause with the place for \p N allocators.

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

Parameters

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

OMPUsesAllocatorsClause(
    clang::SourceLocation StartLoc,
    clang::SourceLocation LParenLoc,
    clang::SourceLocation EndLoc,
    unsigned int N)

Description

Build clause.

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

Parameters

clang::SourceLocation StartLoc
Starting location of the clause.
clang::SourceLocation LParenLoc
Location of '('.
clang::SourceLocation EndLoc
Ending location of the clause.
unsigned int N
Number of allocators asssociated with the clause.

OMPUsesAllocatorsClause(unsigned int N)

Description

Build an empty clause.

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

Parameters

unsigned int N
Number of allocators asssociated with the clause.

clang::OMPClause::child_range children()

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

clang::OMPClause::const_child_range children()
    const

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

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

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

Parameters

const clang::OMPClause* T

OMPUsesAllocatorsClause::Data getAllocatorData(
    unsigned int I) const

Description

Returns data for the specified allocator.

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

Parameters

unsigned int I

clang::SourceLocation getLParenLoc() const

Description

Returns the location of '('.

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

unsigned int getNumberOfAllocators() const

Description

Returns number of allocators associated with the clause.

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

unsigned int numTrailingObjects(
    OverloadToken<clang::Expr*>) const

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

Parameters

OverloadToken<clang::Expr*>

void setAllocatorsData(
    ArrayRef<OMPUsesAllocatorsClause::Data> Data)

Description

Sets the allocators data for the clause.

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

Parameters

ArrayRef<OMPUsesAllocatorsClause::Data> Data

void setLParenLoc(clang::SourceLocation Loc)

Description

Sets the location of '('.

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

Parameters

clang::SourceLocation Loc

clang::OMPClause::child_range used_children()

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

clang::OMPClause::const_child_range
used_children() const

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