- All Superinterfaces:
ASTNode,BlockItemNode,OmpExecutableNode,OmpNode,StatementNode
This represents an OpenMP parallel pragma. The syntax of a parallel construct
is as follows (Section 2.5, OpenMP Specification 4.0.0):
#pragma omp parallel [clause[ [, ]clause] ...] new-line structured-blockwhere clause is one of the following:
if(scalar-expression) num_threads(integer-expression) default(shared | none) private(list) firstprivate(list) shared(list) copyin(list) reduction(redution-identifier :list) proc_bind(master | close | spread)
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.ASTNode
ASTNode.NodeKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.statement.BlockItemNode
BlockItemNode.BlockItemKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.omp.OmpExecutableNode
OmpExecutableNode.OmpExecutableKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.omp.OmpNode
OmpNode.OmpNodeKindNested classes/interfaces inherited from interface dev.civl.abc.ast.node.IF.statement.StatementNode
StatementNode.StatementKind -
Method Summary
Modifier and TypeMethodDescriptionifClause()Returns the expression node ofif().booleantrue iffdefault(shared), false iffdefault(none).Returns the expression node ofnum_threads().voidsetDefault(boolean shared) Updates the default setting whendefault()clause is present.voidsetIfClause(ExpressionNode value) Updates the if-condition when the clauseif()is present.voidsetNumThreads(ExpressionNode value) Updates the number of threads when the clausenum_threads()is present.Methods inherited from interface dev.civl.abc.ast.node.IF.ASTNode
addAllTransformAnnotations, addTransformAnnotation, child, childIndex, children, diff, equiv, getAttribute, getOwner, getScope, getSource, id, keepOnly, nextDFS, nodeKind, numChildren, parent, prettyPrint, prettyRepresentation, prettyRepresentation, print, remove, removeChild, removeTransformAnnotation, setAttribute, setChild, setId, setOwner, setScope, toString, transformAnnotationsMethods inherited from interface dev.civl.abc.ast.node.IF.statement.BlockItemNode
blockItemKindMethods inherited from interface dev.civl.abc.ast.node.IF.omp.OmpExecutableNode
copyinList, copyprivateList, firstprivateList, isComplete, lastprivateList, nowait, ompExecutableKind, privateList, reductionList, setCopyinList, setCopyprivateList, setFirstprivateList, setLastprivateList, setNowait, setPrivateList, setReductionList, setSharedList, setStatementNode, sharedList, statementNodeMethods inherited from interface dev.civl.abc.ast.node.IF.omp.OmpNode
ompNodeKindMethods inherited from interface dev.civl.abc.ast.node.IF.statement.StatementNode
copy, statementKind
-
Method Details
-
numThreads
ExpressionNode numThreads()Returns the expression node ofnum_threads(). NULL if num_threads() is absent.- Returns:
- the expression node of
num_threads(); NULL ifnum_threads()is absent.
-
setNumThreads
Updates the number of threads when the clausenum_threads()is present.- Parameters:
value- The expression node representing the argument of the clausenum_threads().
-
ifClause
ExpressionNode ifClause()Returns the expression node ofif(). NULL ifif()is absent.- Returns:
- the expression node of
if(); NULL ifif()is absent.
-
setIfClause
Updates the if-condition when the clauseif()is present.- Parameters:
value- The expression node representing the argument of the clauseif().
-
setDefault
void setDefault(boolean shared) Updates the default setting whendefault()clause is present.- Parameters:
shared- The value to be used to update the default setting.
-