org.apache.sysds.runtime.controlprogram.parfor

## Class TaskPartitioner

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

- Direct Known Subclasses:
    TaskPartitionerFactoring, TaskPartitionerFixedsize

      public abstract class TaskPartitioner
      extends Object

  This is the base class for all task partitioner. For this purpose it stores relevant information such as the loop specification (FROM, TO, INCR), the index variable and the task size. Furthermore, it declares two prototypes: (1) full task creation, (2) streaming task creation. Known implementation classes: TaskPartitionerFixedsize, TaskPartitionerFactoring

- - ### Method Summary

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

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

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

- - ### Method Detail

    - #### createTasks

          public abstract List<Task> createTasks()

      Creates and returns set of all tasks for given problem at once.
      Returns:
        list of tasks

    - #### createTasks

          public abstract long createTasks(LocalTaskQueue<Task> queue)

      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.
      Parameters:
        `queue` - queue of takss
      Returns:
        ?

    - #### getNumIterations

          public long getNumIterations()

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