StarPU Internal Handbook
|
#include <starpu_util.h>
Go to the source code of this file.
Macros | |
#define | LIST_INLINE |
#define | struct |
#define | LIST_CREATE_TYPE(ENAME, DECL) |
#define | LIST_CREATE_TYPE_NOSTRUCT(ENAME, _prev, _next) |
#define | STARPU_ASSERT_MULTILIST(expr) |
#define | MULTILIST_CREATE_TYPE(ENAME, MEMBER) |
#define | MULTILIST_CREATE_INLINES(TYPE, ENAME, MEMBER) |
#define LIST_INLINE |
declares the following types:
+ for cells : struct FOO + for lists : struct FOO_list + for iterators : struct FOO
declares the following inlines (all O(1) except stated otherwise, n is the number of elements) :
* Create a cell struct FOO* FOO_new(void);
* Suppress a cell void FOO_delete(struct FOO*);
* Create a list (initially empty) struct FOO_list* FOO_list_new(void);
* Initializes a list (initially empty) void FOO_list_init(struct FOO_list*);
* Suppresses a liste void FOO_list_delete(struct FOO_list*);
* Check whether a list is empty int FOO_list_empty(struct FOO_list*);
* Remove a given cell from the list void FOO_list_erase(struct FOO_list*, struct FOO*);
* Add a cell at the back of the list void FOO_list_push_back(struct FOO_list*, struct FOO*);
* Add a cell at the front of the list void FOO_list_push_front(struct FOO_list*, struct FOO*);
* Add a cell before a given cell of a list void FOO_list_insert_before(struct FOO_list*, struct FOO*new, struct FOO*);
* Add a cell after a given cell of a list void FOO_list_insert_after(struct FOO_list*, struct FOO*new, struct FOO*);
* Append the second list at the end of the first list struct FOO* FOO_list_push_list_back(struct FOO_list*, struct FOO_list*);
* Prepend the first list at the beginning of the second list struct FOO* FOO_list_push_list_front(struct FOO_list*, struct FOO_list*);
* Return and remove the node at the back of the list struct FOO* FOO_list_pop_back(struct FOO_list*);
* Return and remove the node at the front of the list struct FOO* FOO_list_pop_front(struct FOO_list*);
* Return the node at the back of the list struct FOO* FOO_list_back(struct FOO_list*);
* Return the node at the front of the list struct FOO* FOO_list_front(struct FOO_list*);
* Check that the list chaining is coherent (O(n)) int FOO_list_check(struct FOO_list*);
* Return the first cell of the list (from the front) struct FOO* FOO_list_begin(struct FOO_list*);
* Return the value to be tested at the end of the list (at the back) struct FOO* FOO_list_end(struct FOO_list*);
* Return the next element of the list (from the front) struct FOO* FOO_list_next(struct FOO*)
* Return the last element of the list (from the back) struct FOO* FOO_list_last(struct FOO_list*);
* Return the value to be tested at the beginning of the list (at the fromt) struct FOO* FOO_list_alpha(struct FOO_list*);
* Return the previous element of the list (from the back) struct FOO* FOO_list_prev(struct FOO*)
* Return the size of the list in O(n) int FOO_list_size(struct FOO_list*)
* Return the position of the cell in the list (indexed from 0) (O(n) on average) int FOO_list_member(struct FOO_list*, struct FOO*)
* Test whether the cell is in the list (O(n) on average) int FOO_list_ismember(struct FOO_list*, struct FOO*)
********************************************************* Usage example:
#define struct |
Generates a new type for list of elements
#define LIST_CREATE_TYPE_NOSTRUCT | ( | ENAME, | |
_prev, | |||
_next | |||
) |
The effective type declaration for lists