## UfoBaseScheduler

UfoBaseScheduler — Common scheduler functionality

## Functions

void | ufo_base_scheduler_run ()
void | ufo_base_scheduler_abort ()
void | ufo_base_scheduler_set_resources ()
UfoResources * | ufo_base_scheduler_get_resources ()
void | ufo_base_scheduler_set_gpu_nodes ()
GQuark | ufo_base_scheduler_error_quark ()

## Properties

gboolean | enable-tracing | Read / Write
gboolean | expand | Read / Write
guint | max-input-nodes | Read
double | time | Read
gboolean | timestamps | Read / Write

## Types and Values

#define | UFO_BASE_SCHEDULER_ERROR
enum | UfoBaseSchedulerError
struct | UfoBaseScheduler
struct | UfoBaseSchedulerClass

## Object Hierarchy

        GObject
        ╰── UfoBaseScheduler
            ├── UfoFixedScheduler
            ├── UfoGroupScheduler
            ├── UfoLocalScheduler
            ╰── UfoScheduler

## Implemented Interfaces

UfoBaseScheduler implements GInitable.

## Description

This is the base interface of a scheduler. By itself, it cannot execute any UfoTaskGraph.

## Functions

### ufo_base_scheduler_run ()

    void
    ufo_base_scheduler_run (UfoBaseScheduler *scheduler,
                            UfoTaskGraph *task_graph,
                            GError **error);

### ufo_base_scheduler_abort ()

    void
    ufo_base_scheduler_abort (UfoBaseScheduler *scheduler);

### ufo_base_scheduler_set_resources ()

    void
    ufo_base_scheduler_set_resources (UfoBaseScheduler *scheduler,
                                      UfoResources *resources);

Assigns `resources` to `scheduler` for specific use cases.

#### Parameters

scheduler | A UfoBaseScheduler object |
resources | A UfoResources object. | [transfer full]

### ufo_base_scheduler_get_resources ()

    UfoResources *
    ufo_base_scheduler_get_resources (UfoBaseScheduler *scheduler,
                                      GError **error);

Get the current UfoResources currently associated with `scheduler` .

#### Parameters

scheduler | A UfoBaseScheduler |
error | Location of a GError or `NULL` |

#### Returns

the currently associated UfoResources object.

[transfer none]

### ufo_base_scheduler_set_gpu_nodes ()

    void
    ufo_base_scheduler_set_gpu_nodes (UfoBaseScheduler *scheduler,
                                      GList *gpu_nodes);

Sets the GPU nodes that `scheduler` can only use. Note, that the UfoGpuNode objects must be from the same UfoArchGraph that is returned by `ufo_base_scheduler_get_resources()`.

#### Parameters

scheduler | A UfoBaseScheduler |
gpu_nodes | A list of UfoGpuNode objects. | [element-type Ufo.GpuNode]

### ufo_base_scheduler_error_quark ()

    GQuark
    ufo_base_scheduler_error_quark (void);

## Types and Values

### UFO_BASE_SCHEDULER_ERROR

    #define UFO_BASE_SCHEDULER_ERROR            ufo_base_scheduler_error_quark()

### enum UfoBaseSchedulerError

#### Members

UFO_BASE_SCHEDULER_ERROR_SETUP | Could not start scheduler due to error |
UFO_BASE_SCHEDULER_ERROR_EXECUTION | Error occurred during execution |

### struct UfoBaseScheduler

    struct UfoBaseScheduler;

The base class scheduler is responsible of assigning command queues to filters (thus managing GPU device resources) and decide if to run a GPU or a CPU. The actual schedule planning can be overriden.

### struct UfoBaseSchedulerClass

    struct UfoBaseSchedulerClass {
    };

UfoBaseScheduler class

## Property Details

### The `“enable-tracing”` property

      “enable-tracing”           gboolean

Enable and write profile traces.

Owner: UfoBaseScheduler

Flags: Read / Write

Default value: FALSE

### The `“expand”` property

      “expand”                   gboolean

Expand the task graph for better multi GPU performance.

Owner: UfoBaseScheduler

Flags: Read / Write

Default value: TRUE

### The `“max-input-nodes”` property

      “max-input-nodes”          guint

Maximum inputs per task.

Owner: UfoBaseScheduler

Flags: Read

Allowed values: >= 1

Default value: 64

### The `“time”` property

      “time”                     double

Finished execution time in seconds.

Owner: UfoBaseScheduler

Flags: Read

Allowed values: >= 0

Default value: 0

### The `“timestamps”` property

      “timestamps”               gboolean

Enable generating timestamp metadata.

Owner: UfoBaseScheduler

Flags: Read / Write

Default value: FALSE