Interface Chunk

  • All Known Implementing Classes:
    CursorBasedChunk

    public interface Chunk
    A Chunk of code which can be executed by a thread.chunker Op.

    A Chunk processes a subset of a bigger problem and can be executed in parallel with other Chunks. The elements of the subproblem are identified by enumerating the original problem.

    Author:
    Christian Dietz (University of Konstanz)
    See Also:
    Parallel
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void execute​(long startIndex, long stepSize, long numSteps)
      Solve the subproblem for the element at startIndex, increase the index by the given stepSize and repeat numSteps.
    • Method Detail

      • execute

        void execute​(long startIndex,
                     long stepSize,
                     long numSteps)
        Solve the subproblem for the element at startIndex, increase the index by the given stepSize and repeat numSteps.
        Parameters:
        startIndex - zero based index that identifies the first element of this subproblem (w.r.t. the global problem enumeration)
        stepSize - the step-size between two consecutive elements
        numSteps - how many steps shall be taken