Top | ![]() |
![]() |
![]() |
![]() |
UfoGraph * | ufo_task_graph_new () |
|
ufo_task_graph_read_from_file () |
|
ufo_task_graph_read_from_data () |
|
ufo_task_graph_save_to_json () |
|
ufo_task_graph_get_json_data () |
|
ufo_task_graph_is_alright () |
|
ufo_task_graph_map () |
|
ufo_task_graph_expand () |
|
ufo_task_graph_connect_nodes () |
|
ufo_task_graph_connect_nodes_full () |
|
ufo_task_graph_fuse () |
|
ufo_task_graph_set_partition () |
|
ufo_task_graph_get_partition () |
|
ufo_task_graph_error_quark () |
#define | UFO_TASK_GRAPH_ERROR |
enum | UfoTaskGraphError |
struct | UfoTaskGraph |
struct | UfoTaskGraphClass |
The task graph is the central data structure that connects UfoTaskNode objects to form computational pipelines and graphs. To execute a task graph, it has to be passed to a UfoBaseScheduler.
UfoGraph *
ufo_task_graph_new (void
);
Create a new task graph without any nodes.
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
.
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 |
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
.
graph |
A UfoTaskGraph. |
|
manager |
A UfoPluginManager used to load the filters |
|
json |
|
|
error |
Indicates error in case of failed file loading or parsing |
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
.
gchar * ufo_task_graph_get_json_data (UfoTaskGraph *graph
,);
GError **error
Serialize graph
to a JSON string.
gboolean ufo_task_graph_is_alright (UfoTaskGraph *graph
,);
GError **error
Check if nodes int the task graph are properly connected.
void ufo_task_graph_map (UfoTaskGraph *graph
,);
GList *gpu_nodes
Map task nodes of graph
to the list of gpu_nodes
.
void ufo_task_graph_expand (UfoTaskGraph *graph
,UfoResources *resources
,,
guint n_gpus);
GError **error
Expands graph
in a way that most of the resources in 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
.
graph |
||
resources |
A UfoResources objects |
|
n_gpus |
Number of GPUs to expand the graph for |
|
error |
error to pass on |
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()
.
void ufo_task_graph_connect_nodes_full (UfoTaskGraph *graph
,UfoTaskNode *n1
,UfoTaskNode *n2
,);
guint input
Connect n1
with n2
using n2
's input
port.
void ufo_task_graph_fuse (UfoTaskGraph *graph
);
Fuses task nodes to increase data locality.
Note: This is not implemented and a no-op right now.
void ufo_task_graph_set_partition (UfoTaskGraph *graph
,,
guint index);
guint total
Set the partition of this task graph.
void ufo_task_graph_get_partition (UfoTaskGraph *graph
,,
guint *index);
guint *total
Get the partition structure of graph
.
struct UfoTaskGraph;
Main object for organizing filters. The contents of the UfoTaskGraph structure are private and should only be accessed via the provided API.