Module dev.civl.abc

Interface OmpForNode

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

public interface OmpForNode extends OmpWorksharingNode
This interface represents the OpenMP loop construct.
The syntax of the loop construct is specified in Section 2.7.1, OpenMP 4.0.0, as follows:
 #pragma omp for [clause[[,] clause] ... ] new-line 
 for-loops
 
where clause is one of the following:
 private(list)
 firstprivate(list) 
 lastprivate(list) 
 reduction(reduction-identifier: list)
 schedule(kind[, chunk_size])
 collapse(n)
 ordered
 nowait
 
  • Method Details

    • schedule

      Returns the schedule kind of the loop construct. The default schedule is implementation defined, in our case we choose STATIC.
      Returns:
      The schedule kind of the loop construct.
    • setSchedule

      void setSchedule(OmpForNode.OmpScheduleKind ompScheduleKind)
      Updates the schedule kind of this loop construct.
      Parameters:
      ompScheduleKind - The schedule kind to be used to update this loop construct.
    • collapse

      int collapse()
      Returns the number of loops associated with this loop construct. 1 by default if there is no explicit collapse clause.
      Returns:
      The number of loops associated with this loop construct.
    • setCollapse

      void setCollapse(int value)
      Updates the number of loops associated with this loop construct.
      Parameters:
      value - The number to be used to update this loop construct.
    • isOrdered

      boolean isOrdered()
      Returns true iff ordered clause is present.
      Returns:
      true iff ordered clause is present.
    • ordered

      int ordered()
      Returns:
      the number of loops associated with ordered clause.
    • setOrdered

      void setOrdered(int value)
      Updates the ordered flag of this loop construct.
      Parameters:
      value - The value to be used to update this loop construct.
    • chunkSize

      ExpressionNode chunkSize()
      Returns the chunk size. NULL if there is no schedule clause.
      Returns:
      the chunk size, NULL if there is no schedule clause.
    • setChunsize

      void setChunsize(ExpressionNode chunkSize)
      Updates the chunk size of this loop construct.
      Parameters:
      chunkSize - The expression node representing the new chunk size.
    • assertions

      Returns the assertions to be checked before the entry of this loop construct.
      Returns:
      the assertions to be checked before the entry of this loop construct.
    • setAssertions

      void setAssertions(SequenceNode<FunctionCallNode> assertions)
      Updates the assertions to be checked before the entry of this loop construct.
      Parameters:
      assertions - The assertions to be used to update this loop construct.
    • invariant

      FunctionCallNode invariant()
      Returns the loop invariant.
      Returns:
      the loop invariant.
    • setInvariant

      void setInvariant(FunctionCallNode invariant)
      Updates the loop invariant of this loop construct.
      Parameters:
      invariant - The assertion to be used as the new invariant.