Module tornado.api

Class AbstractWorkerGrid

java.lang.Object
uk.ac.manchester.tornado.api.AbstractWorkerGrid
All Implemented Interfaces:
WorkerGrid
Direct Known Subclasses:
WorkerGrid1D, WorkerGrid2D, WorkerGrid3D

public abstract class AbstractWorkerGrid extends Object implements WorkerGrid
  • Field Details

    • globalWork

      protected long[] globalWork
    • localWork

      protected long[] localWork
    • numOfWorkgroups

      protected long[] numOfWorkgroups
    • globalOffset

      protected long[] globalOffset
  • Constructor Details

    • AbstractWorkerGrid

      protected AbstractWorkerGrid(long x, long y, long z)
  • Method Details

    • getGlobalWork

      public long[] getGlobalWork()
      Description copied from interface: WorkerGrid
      Returns an array of 3 elements with the total number of threads per dimension.
      Specified by:
      getGlobalWork in interface WorkerGrid
      Returns:
      invalid reference
      long[]
    • getLocalWork

      public long[] getLocalWork()
      Description copied from interface: WorkerGrid
      Returns an array of 3 elements with the total number of threads per for the local work groups.
      Specified by:
      getLocalWork in interface WorkerGrid
      Returns:
      invalid reference
      long[]
    • getNumberOfWorkgroups

      public long[] getNumberOfWorkgroups()
      Description copied from interface: WorkerGrid
      Returns an array with the total number of work groups per dimension.
      Specified by:
      getNumberOfWorkgroups in interface WorkerGrid
      Returns:
      invalid reference
      long[]
    • getGlobalOffset

      public long[] getGlobalOffset()
      Description copied from interface: WorkerGrid
      Returns an array of 3 elements with the offset per dimension.
      Specified by:
      getGlobalOffset in interface WorkerGrid
      Returns:
      invalid reference
      long[]
    • setGlobalWork

      public void setGlobalWork(long x, long y, long z)
      Description copied from interface: WorkerGrid
      Sets the total number of threads per dimension to launch on the accelerator.
      Specified by:
      setGlobalWork in interface WorkerGrid
      Parameters:
      x -
      y -
      z -
    • setLocalWork

      public void setLocalWork(long x, long y, long z)
      Description copied from interface: WorkerGrid
      Sets the local work group threads per dimension to launch on the accelerator.
      Specified by:
      setLocalWork in interface WorkerGrid
      Parameters:
      x -
      y -
      z -
    • setGlobalOffset

      public void setGlobalOffset(long x, long y, long z)
      Description copied from interface: WorkerGrid
      Sets the global offsets per dimension.
      Specified by:
      setGlobalOffset in interface WorkerGrid
      Parameters:
      x -
      y -
      z -
    • setLocalWorkToNull

      public void setLocalWorkToNull()
      Description copied from interface: WorkerGrid
      Sets the local work group to null. In this case, the corresponding driver will launch a default number of thread blocks (e.g., OpenCL Runtime).
      Specified by:
      setLocalWorkToNull in interface WorkerGrid
    • setNumberOfWorkgroupsToNull

      public void setNumberOfWorkgroupsToNull()
      Description copied from interface: WorkerGrid
      Sets the global work group to null.
      Specified by:
      setNumberOfWorkgroupsToNull in interface WorkerGrid