Loading...
Searching...
No Matches
graph.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2016-2022 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
#ifndef __GRAPH_H__
#define __GRAPH_H__
#include <core/task.h>
#include <common/list.h>
#pragma GCC visibility push(hidden)
MULTILIST_CREATE_TYPE(_starpu_graph_node, all)
MULTILIST_CREATE_TYPE(_starpu_graph_node, top)
MULTILIST_CREATE_TYPE(_starpu_graph_node, bottom)
MULTILIST_CREATE_TYPE(_starpu_graph_node, dropped)
struct _starpu_graph_node
{
starpu_pthread_mutex_t mutex;
struct _starpu_job *job;
struct _starpu_graph_node_multilist_top top;
struct _starpu_graph_node_multilist_bottom bottom;
struct _starpu_graph_node_multilist_all all;
struct _starpu_graph_node_multilist_dropped dropped;
struct _starpu_graph_node **incoming;
unsigned *incoming_slot;
unsigned n_incoming;
unsigned alloc_incoming;
struct _starpu_graph_node **outgoing;
unsigned total_incoming;
unsigned *outgoing_slot;
unsigned n_outgoing;
unsigned alloc_outgoing;
unsigned depth;
unsigned descendants;
int graph_n;
};
MULTILIST_CREATE_INLINES(struct _starpu_graph_node, _starpu_graph_node, all)
MULTILIST_CREATE_INLINES(struct _starpu_graph_node, _starpu_graph_node, top)
MULTILIST_CREATE_INLINES(struct _starpu_graph_node, _starpu_graph_node, bottom)
MULTILIST_CREATE_INLINES(struct _starpu_graph_node, _starpu_graph_node, dropped)
extern int _starpu_graph_record;
void _starpu_graph_init(void);
void _starpu_graph_wrlock(void);
void _starpu_graph_rdlock(void);
void _starpu_graph_wrunlock(void);
void _starpu_graph_rdunlock(void);
void _starpu_graph_add_job(struct _starpu_job *job);
void _starpu_graph_add_job_dep(struct _starpu_job *job, struct _starpu_job *prev_job);
void _starpu_graph_drop_job(struct _starpu_job *job);
void _starpu_graph_drop_dropped_nodes(void);
void _starpu_graph_compute_depths(void);
void _starpu_graph_compute_descendants(void);
void _starpu_graph_foreach(void (*func)(void *data, struct _starpu_graph_node *node), void *data);
struct _starpu_graph_node *_starpu_graph_task_node(struct starpu_task *task);
struct starpu_task *_starpu_graph_node_task(struct _starpu_graph_node *node);
void _starpu_graph_node_outgoing(struct _starpu_graph_node *node, unsigned *n_outgoing, struct _starpu_graph_node ***outgoing);
#pragma GCC visibility pop
#endif /* __GRAPH_H__ */
_starpu_graph_node::total_incoming
unsigned total_incoming
Definition graph.h:64
_starpu_graph_add_job
void _starpu_graph_add_job(struct _starpu_job *job)
_starpu_graph_node::depth
unsigned depth
Definition graph.h:76
_starpu_graph_compute_descendants
void _starpu_graph_compute_descendants(void)
_starpu_graph_node::outgoing_slot
unsigned * outgoing_slot
Definition graph.h:67
_starpu_graph_node::alloc_incoming
unsigned alloc_incoming
Definition graph.h:59
_starpu_graph_drop_dropped_nodes
void _starpu_graph_drop_dropped_nodes(void)
_starpu_graph_add_job_dep
void _starpu_graph_add_job_dep(struct _starpu_job *job, struct _starpu_job *prev_job)
_starpu_graph_node::job
struct _starpu_job * job
Definition graph.h:37
_starpu_graph_node::incoming
struct _starpu_graph_node ** incoming
Definition graph.h:53
_starpu_graph_node::descendants
unsigned descendants
Definition graph.h:80
_starpu_graph_compute_depths
void _starpu_graph_compute_depths(void)
_starpu_graph_node::mutex
starpu_pthread_mutex_t mutex
Definition graph.h:35
_starpu_graph_foreach
void _starpu_graph_foreach(void(*func)(void *data, struct _starpu_graph_node *node), void *data)
_starpu_graph_node::bottom
struct _starpu_graph_node_multilist_bottom bottom
Definition graph.h:45
_starpu_graph_node::top
struct _starpu_graph_node_multilist_top top
Definition graph.h:43
_starpu_graph_node::outgoing
struct _starpu_graph_node ** outgoing
Definition graph.h:61
_starpu_graph_node::all
struct _starpu_graph_node_multilist_all all
Definition graph.h:47
_starpu_graph_node::alloc_outgoing
unsigned alloc_outgoing
Definition graph.h:71
_starpu_graph_node::graph_n
int graph_n
Definition graph.h:83
_starpu_graph_node::incoming_slot
unsigned * incoming_slot
Definition graph.h:55
_starpu_graph_node::n_outgoing
unsigned n_outgoing
Definition graph.h:69
_starpu_graph_node::dropped
struct _starpu_graph_node_multilist_dropped dropped
Definition graph.h:49
_starpu_graph_drop_job
void _starpu_graph_drop_job(struct _starpu_job *job)
_starpu_graph_node::n_incoming
unsigned n_incoming
Definition graph.h:57
_starpu_graph_node
Definition graph.h:33
list.h
struct
#define struct
Definition list.h:175
_starpu_job
Definition jobs.h:74
task.h