ROSE
0.9.6a
|
#include <OmpAttribute.h>
Public Member Functions | |
SgPragmaDeclaration * | getPragmaDeclaration () |
-----------—AST connection---------------— Get the associated SgPragmaDeclaration for C/C++, if any More... | |
PreprocessingInfo * | getPreprocessingInfo () |
Get the associated PreprocessingInfo for Fortran, if any. More... | |
void | setPreprocessingInfo (PreprocessingInfo *info) |
SgNode * | getNode () |
Get the associated SgNode, can be SgPragmaDeclaration or others( for fortran nodes or during parallelization) More... | |
void | setNode (SgNode *n) |
void | setOmpDirectiveType (omp_construct_enum omptype) |
---------—directive type----— More... | |
omp_construct_enum | getOmpDirectiveType () |
void | addClause (omp_construct_enum clause_type) |
--------—clauses-------------— Add a clause into an OpenMP directive, the content of the clause is set by other interface, such as addVariable(), addExpression() , setReductionOperator() etc. More... | |
bool | hasClause (omp_construct_enum clause_type) |
Check if a directive has a clause of the specified type. More... | |
std::vector< omp_construct_enum > | getClauses () |
Get all existing clauses. More... | |
SgVariableSymbol * | addVariable (omp_construct_enum targetConstruct, const std::string &varString, SgInitializedName *sgvar=NULL) |
-----—var list -----------— Add a variable into a variable list of an OpenMP construct ,return the symbol of the variable added, if possible More... | |
bool | hasVariableList (omp_construct_enum) |
Check if a variable list is associated with a construct. More... | |
std::vector< std::pair < std::string, SgNode * > > | getVariableList (omp_construct_enum) |
Get the variable list associated with a construct. More... | |
std::vector< enum omp_construct_enum > | get_clauses (const std::string &variable) |
Find the relevant clauses for a variable. More... | |
void | addExpression (omp_construct_enum targetConstruct, const std::string &expString, SgExpression *sgexp=NULL) |
-----—Expressions --------------------------— Add an expression to a clause More... | |
std::pair< std::string, SgExpression * > | getExpression (omp_construct_enum targetConstruct) |
Get expression of a clause. More... | |
void | setReductionOperator (omp_construct_enum operatorx) |
-----—values for some clauses -------— More... | |
std::vector< omp_construct_enum > | getReductionOperators () |
Get reduction clauses for each operations, reduction(op:kind) More... | |
bool | hasReductionOperator (omp_construct_enum operatorx) |
Check if a reduction operation exists. More... | |
void | setMapVariant (omp_construct_enum operatorx) |
std::vector< omp_construct_enum > | getMapVariants () |
Get map clauses for each variant, map(variant:var_list) More... | |
bool | hasMapVariant (omp_construct_enum operatorx) |
Check if a map variant exists. More... | |
bool | isMapVariant (omp_construct_enum omp_type) |
Check if the input parameter is a map variant enum type. More... | |
void | setDefaultValue (omp_construct_enum valuex) |
omp_construct_enum | getDefaultValue () |
omp_construct_enum | getScheduleKind () |
void | setScheduleKind (omp_construct_enum kindx) |
bool | isInConstruct (const std::string &variable, enum omp_construct_enum) |
Check if a variable is inside a variable list of a clause/directive. More... | |
void | setCriticalName (const std::string &name) |
Set name for named critical section. More... | |
std::string | getCriticalName () |
bool | isNamedCritical () |
void | print () |
Pretty print the OmpAttribute. More... | |
bool | get_isUserDefined () |
std::string | toOpenMPString () |
Convert OmpAttribute to a legal OpenMP pragma string,. More... | |
Public Attributes | |
std::map< SgSymbol *, std::vector< std::pair < SgExpression *, SgExpression * > > > | array_dimensions |
Dimension information for array variables, used by map clause, such as map (inout:array[0:n][0:m]) More... | |
Private Member Functions | |
OmpAttribute () | |
Default constructors. More... | |
OmpAttribute (omp_construct_enum omptype, SgNode *mynode) | |
Constructor for known directive type and originating pragma/scope node. More... | |
void | init () |
Member functions ------------------------------— Initialize internal data. More... | |
std::string | toOpenMPString (omp_construct_enum omp_type) |
Convert entire directives and clauses to string ,. More... | |
std::string | toOpenMPString (std::vector< std::pair< std::string, SgNode * > >) |
Convert a variable list to x,y,z ,without parenthesis. More... | |
Private Attributes | |
SgNode * | mNode |
The associated SgNode for this attribute, could be SgPragmaDeclaration or other nodes. More... | |
PreprocessingInfo * | pinfo |
Associated PreprocessingInfo for Fortran only. More... | |
bool | isUserDefined |
A flag to indicate if the source OpenMP directive is introduced by programmers or not (by autoPar) More... | |
enum omp_construct_enum | omp_type |
Directive information: type of OpenMP directive. More... | |
std::vector< omp_construct_enum > | clauses |
Clause information. More... | |
std::map< omp_construct_enum, bool > | clause_map |
std::vector< omp_construct_enum > | reduction_operators |
std::vector< omp_construct_enum > | map_variants |
std::map< omp_construct_enum, std::vector< std::pair < std::string, SgNode * > > > | variable_lists |
std::map< std::string, std::vector < omp_construct_enum > > | var_clauses |
std::map< omp_construct_enum, std::pair< std::string, SgExpression * > > | expressions |
omp_construct_enum | default_scope |
omp_construct_enum | schedule_kind |
bool | hasName |
std::string | name |
bool | isOrphaned |
int | wrapperCount |
OmpAttribute * | parent |
Friends | |
OmpAttribute * | buildOmpAttribute (omp_construct_enum directive_type, SgNode *node, bool userDefined) |
Some utility functions to manipulate OmpAttribute. More... | |
Definition at line 255 of file OmpAttribute.h.
|
inlineprivate |
Default constructors.
Definition at line 362 of file OmpAttribute.h.
References OmpSupport::e_unknown, and Dbg::init().
|
inlineprivate |
Constructor for known directive type and originating pragma/scope node.
Definition at line 370 of file OmpAttribute.h.
References Dbg::init(), and isSgLocatedNode().
SgPragmaDeclaration* OmpSupport::OmpAttribute::getPragmaDeclaration | ( | ) |
-----------—AST connection---------------— Get the associated SgPragmaDeclaration for C/C++, if any
|
inline |
Get the associated PreprocessingInfo for Fortran, if any.
Definition at line 263 of file OmpAttribute.h.
|
inline |
Definition at line 264 of file OmpAttribute.h.
|
inline |
Get the associated SgNode, can be SgPragmaDeclaration or others( for fortran nodes or during parallelization)
Definition at line 267 of file OmpAttribute.h.
|
inline |
Definition at line 268 of file OmpAttribute.h.
|
inline |
---------—directive type----—
Definition at line 270 of file OmpAttribute.h.
References OmpSupport::isDirective().
|
inline |
Definition at line 271 of file OmpAttribute.h.
void OmpSupport::OmpAttribute::addClause | ( | omp_construct_enum | clause_type) |
--------—clauses-------------— Add a clause into an OpenMP directive, the content of the clause is set by other interface, such as addVariable(), addExpression() , setReductionOperator() etc.
bool OmpSupport::OmpAttribute::hasClause | ( | omp_construct_enum | clause_type) |
Check if a directive has a clause of the specified type.
std::vector<omp_construct_enum> OmpSupport::OmpAttribute::getClauses | ( | ) |
Get all existing clauses.
SgVariableSymbol* OmpSupport::OmpAttribute::addVariable | ( | omp_construct_enum | targetConstruct, |
const std::string & | varString, | ||
SgInitializedName * | sgvar = NULL |
||
) |
-----—var list -----------— Add a variable into a variable list of an OpenMP construct ,return the symbol of the variable added, if possible
bool OmpSupport::OmpAttribute::hasVariableList | ( | omp_construct_enum | ) |
Check if a variable list is associated with a construct.
std::vector<std::pair<std::string,SgNode* > > OmpSupport::OmpAttribute::getVariableList | ( | omp_construct_enum | ) |
Get the variable list associated with a construct.
std::vector<enum omp_construct_enum> OmpSupport::OmpAttribute::get_clauses | ( | const std::string & | variable) |
Find the relevant clauses for a variable.
void OmpSupport::OmpAttribute::addExpression | ( | omp_construct_enum | targetConstruct, |
const std::string & | expString, | ||
SgExpression * | sgexp = NULL |
||
) |
-----—Expressions --------------------------— Add an expression to a clause
std::pair<std::string, SgExpression*> OmpSupport::OmpAttribute::getExpression | ( | omp_construct_enum | targetConstruct) |
Get expression of a clause.
void OmpSupport::OmpAttribute::setReductionOperator | ( | omp_construct_enum | operatorx) |
-----—values for some clauses -------—
std::vector<omp_construct_enum> OmpSupport::OmpAttribute::getReductionOperators | ( | ) |
Get reduction clauses for each operations, reduction(op:kind)
bool OmpSupport::OmpAttribute::hasReductionOperator | ( | omp_construct_enum | operatorx) |
Check if a reduction operation exists.
void OmpSupport::OmpAttribute::setMapVariant | ( | omp_construct_enum | operatorx) |
std::vector<omp_construct_enum> OmpSupport::OmpAttribute::getMapVariants | ( | ) |
Get map clauses for each variant, map(variant:var_list)
bool OmpSupport::OmpAttribute::hasMapVariant | ( | omp_construct_enum | operatorx) |
Check if a map variant exists.
bool OmpSupport::OmpAttribute::isMapVariant | ( | omp_construct_enum | omp_type) |
Check if the input parameter is a map variant enum type.
void OmpSupport::OmpAttribute::setDefaultValue | ( | omp_construct_enum | valuex) |
omp_construct_enum OmpSupport::OmpAttribute::getDefaultValue | ( | ) |
omp_construct_enum OmpSupport::OmpAttribute::getScheduleKind | ( | ) |
void OmpSupport::OmpAttribute::setScheduleKind | ( | omp_construct_enum | kindx) |
bool OmpSupport::OmpAttribute::isInConstruct | ( | const std::string & | variable, |
enum | omp_construct_enum | ||
) |
Check if a variable is inside a variable list of a clause/directive.
void OmpSupport::OmpAttribute::setCriticalName | ( | const std::string & | name) |
Set name for named critical section.
|
inline |
Definition at line 343 of file OmpAttribute.h.
References name.
|
inline |
Definition at line 344 of file OmpAttribute.h.
void OmpSupport::OmpAttribute::print | ( | ) |
Pretty print the OmpAttribute.
|
inline |
Definition at line 350 of file OmpAttribute.h.
std::string OmpSupport::OmpAttribute::toOpenMPString | ( | ) |
Convert OmpAttribute to a legal OpenMP pragma string,.
|
private |
Member functions ------------------------------— Initialize internal data.
|
private |
Convert entire directives and clauses to string ,.
|
private |
Convert a variable list to x,y,z ,without parenthesis.
|
friend |
Some utility functions to manipulate OmpAttribute.
A builder for OmpAttribute, useDefined indicates if the directive is added by programmer or not (by autoParallelization)
std::map<SgSymbol*, std::vector < std::pair <SgExpression*, SgExpression*> > > OmpSupport::OmpAttribute::array_dimensions |
Dimension information for array variables, used by map clause, such as map (inout:array[0:n][0:m])
Definition at line 293 of file OmpAttribute.h.
|
private |
The associated SgNode for this attribute, could be SgPragmaDeclaration or other nodes.
Definition at line 388 of file OmpAttribute.h.
|
private |
Associated PreprocessingInfo for Fortran only.
Definition at line 390 of file OmpAttribute.h.
|
private |
A flag to indicate if the source OpenMP directive is introduced by programmers or not (by autoPar)
Definition at line 393 of file OmpAttribute.h.
|
private |
Directive information: type of OpenMP directive.
Definition at line 396 of file OmpAttribute.h.
|
private |
Clause information.
Definition at line 402 of file OmpAttribute.h.
|
private |
Definition at line 403 of file OmpAttribute.h.
|
private |
Definition at line 407 of file OmpAttribute.h.
|
private |
Definition at line 412 of file OmpAttribute.h.
|
private |
Definition at line 422 of file OmpAttribute.h.
|
private |
Definition at line 424 of file OmpAttribute.h.
|
private |
Definition at line 428 of file OmpAttribute.h.
|
private |
Definition at line 433 of file OmpAttribute.h.
|
private |
Definition at line 436 of file OmpAttribute.h.
|
private |
Definition at line 440 of file OmpAttribute.h.
|
private |
Definition at line 441 of file OmpAttribute.h.
|
private |
Definition at line 445 of file OmpAttribute.h.
|
private |
Definition at line 448 of file OmpAttribute.h.
|
private |
Definition at line 451 of file OmpAttribute.h.