StarPU Handbook
starpu_task_list.h
Go to the documentation of this file.
1 /* StarPU --- Runtime system for heterogeneous multicore architectures.
2  *
3  * Copyright (C) 2010-2012,2014,2016,2017 Université de Bordeaux
4  * Copyright (C) 2011-2014,2017,2018,2019 CNRS
5  * Copyright (C) 2011,2012 Inria
6  *
7  * StarPU is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU Lesser General Public License as published by
9  * the Free Software Foundation; either version 2.1 of the License, or (at
10  * your option) any later version.
11  *
12  * StarPU is distributed in the hope that it will be useful, but
13  * WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15  *
16  * See the GNU Lesser General Public License in COPYING.LGPL for more details.
17  */
18 
19 #ifndef __STARPU_TASK_LIST_H__
20 #define __STARPU_TASK_LIST_H__
21 
22 #include <starpu_task.h>
23 #include <starpu_util.h>
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
35 /* NOTE: this needs to have at least the same size as lists in src/common/list.h */
36 #ifdef BUILDING_STARPU
37 #define STARPU_TASK_LIST_INLINE extern inline
38 #else
39 
43 {
44  struct starpu_task *head;
45  struct starpu_task *tail;
46 };
47 #define STARPU_TASK_LIST_INLINE extern
48 #endif
49 
53 STARPU_TASK_LIST_INLINE
54 void starpu_task_list_init(struct starpu_task_list *list);
55 
59 STARPU_TASK_LIST_INLINE
60 void starpu_task_list_push_front(struct starpu_task_list *list, struct starpu_task *task);
61 
65 STARPU_TASK_LIST_INLINE
66 void starpu_task_list_push_back(struct starpu_task_list *list, struct starpu_task *task);
67 
71 STARPU_TASK_LIST_INLINE
72 struct starpu_task *starpu_task_list_front(const struct starpu_task_list *list);
73 
77 STARPU_TASK_LIST_INLINE
78 struct starpu_task *starpu_task_list_back(const struct starpu_task_list *list);
79 
83 STARPU_TASK_LIST_INLINE
84 int starpu_task_list_empty(const struct starpu_task_list *list);
85 
89 STARPU_TASK_LIST_INLINE
90 void starpu_task_list_erase(struct starpu_task_list *list, struct starpu_task *task);
91 
95 STARPU_TASK_LIST_INLINE
97 
101 STARPU_TASK_LIST_INLINE
103 
107 STARPU_TASK_LIST_INLINE
108 struct starpu_task *starpu_task_list_begin(const struct starpu_task_list *list);
109 
113 STARPU_TASK_LIST_INLINE
115 
119 STARPU_TASK_LIST_INLINE
120 struct starpu_task *starpu_task_list_next(const struct starpu_task *task);
121 
125 STARPU_TASK_LIST_INLINE
126 int starpu_task_list_ismember(const struct starpu_task_list *list, const struct starpu_task *look);
127 
128 STARPU_TASK_LIST_INLINE
129 void starpu_task_list_move(struct starpu_task_list *ldst, struct starpu_task_list *lsrc);
130 
133 #ifdef __cplusplus
134 }
135 #endif
136 
137 #endif /* __STARPU_TASK_LIST_H__ */
Definition: starpu_task_list.h:42
int starpu_task_list_empty(const struct starpu_task_list *list)
struct starpu_task * starpu_task_list_front(const struct starpu_task_list *list)
struct starpu_task * head
Definition: starpu_task_list.h:44
void starpu_task_list_init(struct starpu_task_list *list)
struct starpu_task * starpu_task_list_back(const struct starpu_task_list *list)
void starpu_task_list_push_front(struct starpu_task_list *list, struct starpu_task *task)
Definition: starpu_task.h:548
struct starpu_task * tail
Definition: starpu_task_list.h:45
struct starpu_task * starpu_task_list_pop_back(struct starpu_task_list *list)
struct starpu_task * starpu_task_list_next(const struct starpu_task *task)
int starpu_task_list_ismember(const struct starpu_task_list *list, const struct starpu_task *look)
struct starpu_task * starpu_task_list_begin(const struct starpu_task_list *list)
void starpu_task_list_push_back(struct starpu_task_list *list, struct starpu_task *task)
struct starpu_task * starpu_task_list_end(const struct starpu_task_list *list STARPU_ATTRIBUTE_UNUSED)
void starpu_task_list_erase(struct starpu_task_list *list, struct starpu_task *task)
struct starpu_task * starpu_task_list_pop_front(struct starpu_task_list *list)
#define STARPU_ATTRIBUTE_UNUSED
Definition: starpu_util.h:87