StarPU Internal Handbook
tags.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2008-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4  *
5  * StarPU is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation; either version 2.1 of the License, or (at
8  * your option) any later version.
9  *
10  * StarPU is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
15  */
16 
17 #ifndef __TAGS_H__
18 #define __TAGS_H__
19 
22 #include <starpu.h>
23 #include <common/config.h>
24 #include <common/starpu_spinlock.h>
25 #include <core/dependencies/cg.h>
26 
27 #pragma GCC visibility push(hidden)
28 
29 #define _STARPU_TAG_SIZE (sizeof(starpu_tag_t)*8)
30 
32 {
41 // useless ...
42 // /** the task has been submitted to the scheduler */
43 // STARPU_SCHEDULED,
46 };
47 
48 struct _starpu_job;
49 
51 {
55  struct _starpu_spinlock lock;
57  starpu_tag_t id;
58  enum _starpu_tag_state state;
59 
60  struct _starpu_cg_list tag_successors;
61 
63  struct _starpu_job *job;
64 
65  unsigned is_assigned;
66  unsigned is_submitted;
67 };
68 
69 void _starpu_init_tags(void);
70 
71 void _starpu_notify_tag_dependencies(struct _starpu_tag *tag);
72 void _starpu_notify_job_start_tag_dependencies(struct _starpu_tag *tag, _starpu_notify_job_start_data *data);
73 
74 void _starpu_tag_declare(starpu_tag_t id, struct _starpu_job *job);
75 
78 
79 void _starpu_tag_clear(void);
80 
81 #pragma GCC visibility pop
82 
83 #endif // __TAGS_H__
Definition: cg.h:45
Definition: starpu_spinlock.h:82
Definition: jobs.h:74
struct _starpu_tag * tag
Definition: jobs.h:102
void _starpu_tag_set_ready(struct _starpu_tag *tag)
struct _starpu_spinlock lock
Definition: tags.h:55
_starpu_tag_state
Definition: tags.h:32
@ STARPU_DONE
Definition: tags.h:45
@ STARPU_READY
Definition: tags.h:40
@ STARPU_BLOCKED
Definition: tags.h:38
@ STARPU_INVALID_STATE
Definition: tags.h:34
@ STARPU_ASSOCIATED
Definition: tags.h:36
starpu_tag_t id
Definition: tags.h:57
struct _starpu_job * job
Definition: tags.h:63
Definition: tags.h:51