Documentation of 'edu.rit.pj.WorkerConstruct' Java class
WorkerConstruct
edu.rit.pj

Class WorkerConstruct

    • Constructor Summary

      Constructors 
      Constructor and Description
      WorkerConstruct()
      Construct a new worker construct.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getThreadCount()
      Determine the number of worker threads in the current process in the worker team executing this worker construct.
      int getThreadIndex()
      Determine the index of the calling thread in the worker team executing this worker construct.
      int getTotalThreadCount()
      Determine the total number of worker threads in all processes in the worker team executing this worker construct.
      boolean isExecutingInParallel()
      Determine if a worker team is executing this worker construct.
      boolean isMasterThread()
      Determine if the calling thread is the master thread in the worker team executing this worker construct.
      WorkerRegion region()
      Returns the worker region of code within which a worker team is executing this worker construct.
      WorkerTeam team()
      Returns the worker team that is executing this worker construct.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkerConstruct

        public WorkerConstruct()
        Construct a new worker construct.
    • Method Detail

      • isExecutingInParallel

        public final boolean isExecutingInParallel()
        Determine if a worker team is executing this worker construct.
        Returns:
        True if a worker team is executing this worker construct, false otherwise.
      • team

        public final WorkerTeam team()
        Returns the worker team that is executing this worker construct.
        Returns:
        Worker team.
        Throws:
        java.lang.IllegalStateException - (unchecked exception) Thrown if no worker team is executing this worker construct.
      • region

        public final WorkerRegion region()
        Returns the worker region of code within which a worker team is executing this worker construct.
        Returns:
        Worker region.
        Throws:
        java.lang.IllegalStateException - (unchecked exception) Thrown if no worker team is executing this worker construct.
      • getThreadCount

        public final int getThreadCount()
        Determine the number of worker threads in the current process in the worker team executing this worker construct. This does not include the master thread if any.
        Returns:
        Number of worker threads in the current process.
        Throws:
        java.lang.IllegalStateException - (unchecked exception) Thrown if no worker team is executing this worker construct.
      • getTotalThreadCount

        public final int getTotalThreadCount()
        Determine the total number of worker threads in all processes in the worker team executing this worker construct. This does not include the master thread.
        Returns:
        Number of worker threads in all processes.
        Throws:
        java.lang.IllegalStateException - (unchecked exception) Thrown if no worker team is executing this worker construct.
      • getThreadIndex

        public final int getThreadIndex()
        Determine the index of the calling thread in the worker team executing this worker construct. Every worker thread in every process has a unique index, going from index 0 for the first thread in the first process to index K−1 for the last thread in the last process, where K is the total number of worker threads in all the processes. The master thread's index is −1.
        Returns:
        Index of the calling thread.
        Throws:
        java.lang.IllegalStateException - (unchecked exception) Thrown if no worker team is executing this worker construct. Thrown if the thread calling getThreadIndex() is not part of the worker team executing this worker construct.
      • isMasterThread

        public final boolean isMasterThread()
        Determine if the calling thread is the master thread in the worker team executing this worker construct.
        Returns:
        True if the calling thread is the master thread, false if the calling thread is a worker thread.
        Throws:
        java.lang.IllegalStateException - (unchecked exception) Thrown if no worker team is executing this worker construct. Thrown if the thread calling getThreadIndex() is not part of the worker team executing this worker construct.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.