UfoTaskGraph

UfoTaskGraph — Hold task nodes

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── UfoGraph
        ╰── UfoTaskGraph

Description

Functions

ufo_task_graph_new ()

UfoGraph *
ufo_task_graph_new (void);

Create a new task graph without any nodes.

Returns

A UfoGraph that can be upcast to a UfoTaskGraph.


ufo_task_graph_read_from_file ()

void
ufo_task_graph_read_from_file (UfoTaskGraph *graph,
                               UfoPluginManager *manager,
                               const gchar *filename,
                               GError **error);

Read a JSON configuration file to fill the structure of graph .

Parameters

graph

A UfoTaskGraph.

 

manager

A UfoPluginManager used to load the filters

 

filename

Path and filename to the JSON file

 

error

Indicates error in case of failed file loading or parsing

 

ufo_task_graph_read_from_data ()

void
ufo_task_graph_read_from_data (UfoTaskGraph *graph,
                               UfoPluginManager *manager,
                               const gchar *json,
                               GError **error);

Read a JSON configuration file to fill the structure of graph .

Parameters

graph

A UfoTaskGraph.

 

manager

A UfoPluginManager used to load the filters

 

json

NULL-terminated string with JSON data

 

error

Indicates error in case of failed file loading or parsing

 

ufo_task_graph_save_to_json ()

void
ufo_task_graph_save_to_json (UfoTaskGraph *graph,
                             const gchar *filename,
                             GError **error);

Save a JSON configuration file with the filter structure of graph .

Parameters

graph

A UfoTaskGraph.

 

filename

Path and filename to the JSON file

 

error

Indicates error in case of failed file saving

 

ufo_task_graph_get_json_data ()

gchar *
ufo_task_graph_get_json_data (UfoTaskGraph *graph,
                              GError **error);

ufo_task_graph_is_alright ()

gboolean
ufo_task_graph_is_alright (UfoTaskGraph *task_graph,
                           GError **error);

Check if nodes int the task graph are properly connected.

Parameters

task_graph

A UfoTaskGraph

 

error

Location for a GError or NULL

 

Returns

TRUE if everything is alright, FALSE else.


ufo_task_graph_map ()

void
ufo_task_graph_map (UfoTaskGraph *task_graph,
                    GList *gpu_nodes);

Map task nodes of task_graph to the processing nodes of arch_graph . Not doing this could break execution of task_graph .

Parameters

task_graph

A UfoTaskGraph

 

gpu_nodes

List of UfoGpuNode objects.

[transfer none][element-type Ufo.GpuNode]

ufo_task_graph_expand ()

void
ufo_task_graph_expand (UfoTaskGraph *task_graph,
                       UfoResources *resources,
                       guint n_gpus,
                       gboolean expand_remote);

Expands task_graph in a way that most of the resources in arch_graph can be occupied. In the simple pipeline case, the longest possible GPU paths are duplicated as much as there are GPUs in arch_graph .

Parameters

task_graph

A UfoTaskGraph

 

resources

A UfoResources objects

 

n_gpus

Number of GPUs to expand the graph for

 

expand_remote

TRUE if remote nodes should be inserted

 

ufo_task_graph_connect_nodes ()

void
ufo_task_graph_connect_nodes (UfoTaskGraph *graph,
                              UfoTaskNode *n1,
                              UfoTaskNode *n2);

Connect n1 with n2 using n2 's default input port. To specify any other port, use ufo_task_graph_connect_nodes_full().

Parameters

graph

A UfoTaskGraph

 

n1

A source node

 

n2

A destination node

 

ufo_task_graph_connect_nodes_full ()

void
ufo_task_graph_connect_nodes_full (UfoTaskGraph *graph,
                                   UfoTaskNode *n1,
                                   UfoTaskNode *n2,
                                   guint input);

Connect n1 with n2 using n2 's input port.

Parameters

graph

A UfoTaskGraph

 

n1

A source node

 

n2

A destination node

 

input

Input port of n2

 

ufo_task_graph_fuse ()

void
ufo_task_graph_fuse (UfoTaskGraph *task_graph);

Fuses task nodes to increase data locality.

Note: This is not implemented and a no-op right now.

Parameters

task_graph

A UfoTaskGraph

 

ufo_task_graph_set_partition ()

void
ufo_task_graph_set_partition (UfoTaskGraph *task_graph,
                              guint index,
                              guint total);

ufo_task_graph_get_partition ()

void
ufo_task_graph_get_partition (UfoTaskGraph *task_graph,
                              guint *index,
                              guint *total);

ufo_task_graph_error_quark ()

GQuark
ufo_task_graph_error_quark (void);

Types and Values

UFO_TASK_GRAPH_ERROR

#define UFO_TASK_GRAPH_ERROR            ufo_task_graph_error_quark()

enum UfoTaskGraphError

Task graph errors

Members

UFO_TASK_GRAPH_ERROR_JSON_KEY

Key is not found in JSON

 

UFO_TASK_GRAPH_ERROR_BAD_INPUTS

Inputs of a task do not play well with each other.

 

struct UfoTaskGraph

struct UfoTaskGraph;

Main object for organizing filters. The contents of the UfoTaskGraph structure are private and should only be accessed via the provided API.


struct UfoTaskGraphClass

struct UfoTaskGraphClass {
};

UfoTaskGraph class