TargetRegionVariable
Represents a variable captured by a target region. More...
#include <TargetRegionVariable.h>
Public Classes
Name | |
---|---|
class | shape_const_kind_iterator Iterator which acts as a filter over std::vector |
Public Types
Name | |
---|---|
using std::vector< TargetRegionVariableShape >::const_iterator | shape_const_iterator Iterator of all shapes of this variable. |
using llvm::iterator_range< shape_const_iterator > | shape_const_range Range over all shapes of this variable. |
using llvm::iterator_range< shape_const_kind_iterator > | shape_const_kind_range Range over all shapes of a certain kind of this variable. |
Public Functions
Name | |
---|---|
llvm::StringRef | name() const The name of the variable. |
llvm::StringRef | baseTypeName() const The name of the base type (stripped of all qualifiers). |
clang::VarDecl * | getDecl() const The Decl node of the variable. |
bool | containsArray() const Whether this variable's type contains an array or not. |
bool | containsPointer() const Whether this variable's type contains a pointer or not. |
bool | passedByPointer() const Returns true if this variable is passed by pointer. |
llvm::Optional< clang::Expr * > | arrayLowerBound() const The lower bound of an array slice in the first dimension. |
bool | operator==(const TargetRegionVariable & Other) const |
shape_const_range | shapes() const Gives a range over the shape of all dimensions. |
shape_const_kind_range | variableArrayShapes() const Gives a range over those shape dimensions which are variable arrays. |
TargetRegionVariable(const clang::CapturedStmt::Capture * Capture, const std::map< clang::VarDecl *, clang::Expr * > & MappingLowerBounds) Construct a new Target Region Variable:: Target Region Variable object. |
Private Functions
Name | |
---|---|
void | determineShapes(clang::QualType T) Determine variable shape. |
Private Attributes
Name | |
---|---|
const clang::CapturedStmt::Capture * | Capture |
clang::VarDecl * | Decl |
std::string | VarName |
std::string | BaseTypeName This is the base type name, i.e. |
std::vector< TargetRegionVariableShape > | Shapes |
unsigned int | NumVariableArrayDims |
const std::map< clang::VarDecl *, clang::Expr * > & | OmpMappingLowerBound |
Detailed Description
1 |
|
Represents a variable captured by a target region.
This class is an abstraction that provides information on how the variable is passed to the target region, whether it is a slice or array and how it's dimensionality is declared
Public Types Documentation
using shape_const_iterator
1 |
|
Iterator of all shapes of this variable.
using shape_const_range
1 |
|
Range over all shapes of this variable.
using shape_const_kind_range
1 |
|
Range over all shapes of a certain kind of this variable.
Public Functions Documentation
function name
1 |
|
The name of the variable.
function baseTypeName
1 |
|
The name of the base type (stripped of all qualifiers).
function getDecl
1 |
|
The Decl node of the variable.
function containsArray
1 |
|
Whether this variable's type contains an array or not.
Return: true if an array is contained, false otherwise
Check if the shape of a TargetRegionVariable contains an array.
function containsPointer
1 |
|
Whether this variable's type contains a pointer or not.
Return: true if a pointer is contained, false otherwise
Check if the shape of a TargetRegionVariable contains an pointer.
function passedByPointer
1 |
|
Returns true if this variable is passed by pointer.
Return: true If a variable is passed by pointer
false If a variable is not passed by pointer
Determines whether a variable is passed by pointer.
This is the case for shared and first-private variables scalars and for arrays. Note that pointer types are generally passed by value and we do not generate an additional * for it.
function arrayLowerBound
1 |
|
The lower bound of an array slice in the first dimension.
Return: llvm::Optional
Finds the lower bound of an array.
All other dimension can be ignored because libomptarget only transfers continuous data. In case of a scalar (or an array which is mapped completly in the first dimension) this returns 0.
function operator==
1 2 3 |
|
function shapes
1 |
|
Gives a range over the shape of all dimensions.
function variableArrayShapes
1 |
|
Gives a range over those shape dimensions which are variable arrays.
This is called while generating the functions argument for variable array sizes.
function TargetRegionVariable
1 2 3 4 |
|
Construct a new Target Region Variable:: Target Region Variable object.
Parameters:
- Capture
- MappingLowerBounds
Private Functions Documentation
function determineShapes
1 2 3 |
|
Determine variable shape.
Parameters:
- T Type
Determines the shape of a varable by resolving its type.
Private Attributes Documentation
variable Capture
1 |
|
variable Decl
1 |
|
variable VarName
1 |
|
variable BaseTypeName
1 |
|
This is the base type name, i.e.
the name of the type without pointer or array qualifiers.
variable Shapes
1 |
|
variable NumVariableArrayDims
1 |
|
variable OmpMappingLowerBound
1 |
|