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-2020 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
#define _STARPU_TAG_SIZE (sizeof(starpu_tag_t)*8)
28
29
enum
_starpu_tag_state
30
{
32
STARPU_INVALID_STATE
,
34
STARPU_ASSOCIATED
,
36
STARPU_BLOCKED
,
38
STARPU_READY
,
39
// useless ...
40
// /** the task has been submitted to the scheduler */
41
// STARPU_SCHEDULED,
43
STARPU_DONE
44
};
45
46
struct
_starpu_job
;
47
48
struct
_starpu_tag
49
{
53
struct
_starpu_spinlock
lock
;
55
starpu_tag_t
id
;
56
enum
_starpu_tag_state
state;
57
58
struct
_starpu_cg_list
tag_successors;
59
61
struct
_starpu_job
*
job
;
62
63
unsigned
is_assigned;
64
unsigned
is_submitted;
65
};
66
67
void
_starpu_init_tags(
void
);
68
69
void
_starpu_notify_tag_dependencies(
struct
_starpu_tag
*
tag
);
70
void
_starpu_notify_job_start_tag_dependencies(
struct
_starpu_tag
*
tag
, _starpu_notify_job_start_data *data);
71
72
void
_starpu_tag_declare(starpu_tag_t
id
,
struct
_starpu_job
*job);
73
75
void
_starpu_tag_set_ready
(
struct
_starpu_tag
*
tag
);
76
77
unsigned
_starpu_submit_job_enforce_task_deps(
struct
_starpu_job
*j);
78
79
void
_starpu_tag_clear(
void
);
80
81
#endif // __TAGS_H__
STARPU_ASSOCIATED
@ STARPU_ASSOCIATED
Definition:
tags.h:34
_starpu_cg_list
Definition:
cg.h:41
STARPU_READY
@ STARPU_READY
Definition:
tags.h:38
starpu_spinlock.h
_starpu_tag
Definition:
tags.h:49
_starpu_tag::id
starpu_tag_t id
Definition:
tags.h:55
_starpu_job::tag
struct _starpu_tag * tag
Definition:
jobs.h:107
_starpu_tag_set_ready
void _starpu_tag_set_ready(struct _starpu_tag *tag)
_starpu_tag::job
struct _starpu_job * job
Definition:
tags.h:61
_starpu_spinlock
Definition:
starpu_spinlock.h:82
_starpu_job
Definition:
jobs.h:79
_starpu_tag::lock
struct _starpu_spinlock lock
Definition:
tags.h:53
STARPU_DONE
@ STARPU_DONE
Definition:
tags.h:43
STARPU_BLOCKED
@ STARPU_BLOCKED
Definition:
tags.h:36
STARPU_INVALID_STATE
@ STARPU_INVALID_STATE
Definition:
tags.h:32
cg.h
_starpu_tag_state
_starpu_tag_state
Definition:
tags.h:30
src
core
dependencies
tags.h
Generated on Sat Oct 24 2020 11:14:54 for StarPU Internal Handbook by
1.8.20