Interface OmpParallelNode

All Superinterfaces:
ASTNode, BlockItemNode, OmpExecutableNode, OmpNode, StatementNode

public interface OmpParallelNode extends OmpExecutableNode
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-block
 
where 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)
 
  • Method Details

    • numThreads

      ExpressionNode numThreads()
      Returns the expression node of num_threads(). NULL if num_threads() is absent.
      Returns:
      the expression node of num_threads(); NULL if num_threads() is absent.
    • setNumThreads

      void setNumThreads(ExpressionNode value)
      Updates the number of threads when the clause num_threads() is present.
      Parameters:
      value - The expression node representing the argument of the clause num_threads().
    • ifClause

      ExpressionNode ifClause()
      Returns the expression node of if(). NULL if if() is absent.
      Returns:
      the expression node of if(); NULL if if() is absent.
    • setIfClause

      void setIfClause(ExpressionNode value)
      Updates the if-condition when the clause if() is present.
      Parameters:
      value - The expression node representing the argument of the clause if().
    • isDefaultShared

      boolean isDefaultShared()
      true iff default(shared), false iff default(none). The default(none) clause requires that each variable that is referenced in the construct, and that does not have a predetermined data-sharing attribute, must have its data-sharing attribute explicitly determined by being listed in a data-sharing attribute clause. By default, default(shared) is assumed.
    • setDefault

      void setDefault(boolean shared)
      Updates the default setting when default() clause is present.
      Parameters:
      shared - The value to be used to update the default setting.