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-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 __STARPU_TASK_LIST_H__
18#define __STARPU_TASK_LIST_H__
19
20#include <starpu_task.h>
21#include <starpu_util.h>
22
23#ifdef __cplusplus
24 extern "C"
25{
26#endif
27
33/* NOTE: this needs to have at least the same size as lists in src/common/list.h */
34#ifdef BUILDING_STARPU
35#define STARPU_TASK_LIST_INLINE extern inline
36#else
40 struct starpu_task_list
41{
42 struct starpu_task *head;
43 struct starpu_task *tail;
44};
45#define STARPU_TASK_LIST_INLINE extern
46#endif
47
51STARPU_TASK_LIST_INLINE
52 void starpu_task_list_init(struct starpu_task_list *list);
53
57STARPU_TASK_LIST_INLINE
58 void starpu_task_list_push_front(struct starpu_task_list *list, struct starpu_task *task);
59
63STARPU_TASK_LIST_INLINE
64 void starpu_task_list_push_back(struct starpu_task_list *list, struct starpu_task *task);
65
69STARPU_TASK_LIST_INLINE
70 struct starpu_task *starpu_task_list_front(const struct starpu_task_list *list);
71
75STARPU_TASK_LIST_INLINE
76 struct starpu_task *starpu_task_list_back(const struct starpu_task_list *list);
77
81STARPU_TASK_LIST_INLINE
82 int starpu_task_list_empty(const struct starpu_task_list *list);
83
87STARPU_TASK_LIST_INLINE
88 void starpu_task_list_erase(struct starpu_task_list *list, struct starpu_task *task);
89
93STARPU_TASK_LIST_INLINE
94 struct starpu_task *starpu_task_list_pop_front(struct starpu_task_list *list);
95
99STARPU_TASK_LIST_INLINE
100 struct starpu_task *starpu_task_list_pop_back(struct starpu_task_list *list);
101
105STARPU_TASK_LIST_INLINE
106 struct starpu_task *starpu_task_list_begin(const struct starpu_task_list *list);
107
111STARPU_TASK_LIST_INLINE
112 struct starpu_task *starpu_task_list_end(const struct starpu_task_list *list STARPU_ATTRIBUTE_UNUSED);
113
117STARPU_TASK_LIST_INLINE
118 struct starpu_task *starpu_task_list_next(const struct starpu_task *task);
119
123STARPU_TASK_LIST_INLINE
124 int starpu_task_list_ismember(const struct starpu_task_list *list, const struct starpu_task *look);
125
126STARPU_TASK_LIST_INLINE
127 void starpu_task_list_move(struct starpu_task_list *ldst, struct starpu_task_list *lsrc);
128
131#ifdef __cplusplus
132}
133#endif
134
135#endif /* __STARPU_TASK_LIST_H__ */
starpu_task
Definition: starpu_task.h:567
starpu_task_list::tail
struct starpu_task * tail
Definition: starpu_task_list.h:43
starpu_task_list::head
struct starpu_task * head
Definition: starpu_task_list.h:42
starpu_task_list_next
struct starpu_task * starpu_task_list_next(const struct starpu_task *task)
starpu_task_list_ismember
int starpu_task_list_ismember(const struct starpu_task_list *list, const struct starpu_task *look)
starpu_task_list_begin
struct starpu_task * starpu_task_list_begin(const struct starpu_task_list *list)
starpu_task_list_end
struct starpu_task * starpu_task_list_end(const struct starpu_task_list *list STARPU_ATTRIBUTE_UNUSED)
starpu_task_list_init
void starpu_task_list_init(struct starpu_task_list *list)
starpu_task_list_back
struct starpu_task * starpu_task_list_back(const struct starpu_task_list *list)
starpu_task_list_front
struct starpu_task * starpu_task_list_front(const struct starpu_task_list *list)
starpu_task_list_push_front
void starpu_task_list_push_front(struct starpu_task_list *list, struct starpu_task *task)
starpu_task_list_pop_front
struct starpu_task * starpu_task_list_pop_front(struct starpu_task_list *list)
starpu_task_list_pop_back
struct starpu_task * starpu_task_list_pop_back(struct starpu_task_list *list)
starpu_task_list_empty
int starpu_task_list_empty(const struct starpu_task_list *list)
starpu_task_list_push_back
void starpu_task_list_push_back(struct starpu_task_list *list, struct starpu_task *task)
starpu_task_list_erase
void starpu_task_list_erase(struct starpu_task_list *list, struct starpu_task *task)
starpu_task_list
Definition: starpu_task_list.h:41
STARPU_ATTRIBUTE_UNUSED
#define STARPU_ATTRIBUTE_UNUSED
Definition: starpu_util.h:85
starpu_task.h
starpu_util.h