org.apache.sysds.runtime.controlprogram.parfor

## Class TaskPartitionerFixedsize

- java.lang.Object
- - org.apache.sysds.runtime.controlprogram.parfor.TaskPartitioner
  - - org.apache.sysds.runtime.controlprogram.parfor.TaskPartitionerFixedsize

- Direct Known Subclasses:
    TaskPartitionerNaive, TaskPartitionerStatic

      public class TaskPartitionerFixedsize
      extends TaskPartitioner

  This naive task partitioner virtually iterates over the given FOR loop (from, to, incr), creates iterations and group them to tasks according to the given task size. There, all tasks are equally sized.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaskPartitionerFixedsize(long taskSize, String iterVarName, IntObject fromVal, IntObject toVal, IntObject incrVal)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<Task>` | `createTasks()` Creates and returns set of all tasks for given problem at once.
    `long` | `createTasks(LocalTaskQueue<Task> queue)` Creates set of all tasks for given problem, but streams them directly into task queue.

    - ### Methods inherited from class org.apache.sysds.runtime.controlprogram.parfor.TaskPartitioner

      `getNumIterations`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TaskPartitionerFixedsize

          public TaskPartitionerFixedsize(long taskSize,
                                          String iterVarName,
                                          IntObject fromVal,
                                          IntObject toVal,
                                          IntObject incrVal)

  - ### Method Detail

    - #### createTasks

          public List<Task> createTasks()

      Description copied from class: `TaskPartitioner`
      Creates and returns set of all tasks for given problem at once.
      Specified by:
        `createTasks` in class `TaskPartitioner`
      Returns:
        list of tasks

    - #### createTasks

          public long createTasks(LocalTaskQueue<Task> queue)

      Description copied from class: `TaskPartitioner`
      Creates set of all tasks for given problem, but streams them directly into task queue. This allows for more tasks than fitting in main memory.
      Specified by:
        `createTasks` in class `TaskPartitioner`
      Parameters:
        `queue` - queue of takss
      Returns:
        ?

Copyright © 2021 The Apache Software Foundation. All rights reserved.