|
PULSAR
2.0.0
Parallel Ultra-Light Systolic Array Runtime
|
Dependency-free linked list. More...
Go to the source code of this file.
Data Structures | |
| struct | icl_list_s |
Macros | |
| #define | icl_list_foreach(list, ptr) for (ptr = icl_list_first(list); ptr != NULL; ptr = icl_list_next(list, ptr)) |
Typedefs | |
| typedef struct icl_list_s | icl_list_t |
Functions | |
| icl_list_t * | icl_list_new () |
| Creates a new linked list. More... | |
| icl_list_t * | icl_list_insert (icl_list_t *, icl_list_t *, void *) |
| Inserts a new node after the specified node. More... | |
| icl_list_t * | icl_list_search (icl_list_t *, void *, int(*)(void *, void *)) |
| Finds a data item in a linked list. More... | |
| icl_list_t * | icl_list_isort (icl_list_t *head, void *data, int(*)(void *, void *)) |
| Inserts data into a sorted list. Does not support direct comparison of pointers. More... | |
| icl_list_t * | icl_list_first (icl_list_t *) |
| Returns the first item in a linked list. More... | |
| icl_list_t * | icl_list_last (icl_list_t *) |
| Returns the last item in a linked list. More... | |
| icl_list_t * | icl_list_next (icl_list_t *, icl_list_t *) |
| Returns the node following the specified node. More... | |
| icl_list_t * | icl_list_prev (icl_list_t *, icl_list_t *) |
| Returns the node preceding the specified node. More... | |
| icl_list_t * | icl_list_concat (icl_list_t *, icl_list_t *) |
| Concatenates two linked lists. More... | |
| icl_list_t * | icl_list_prepend (icl_list_t *, void *) |
| Inserts a node at the beginning of a list. More... | |
| icl_list_t * | icl_list_append (icl_list_t *, void *) |
| Inserts a node at the end of a list. More... | |
| int | icl_list_delete (icl_list_t *, icl_list_t *, void(*)(void *)) |
| Deletes the specified node. More... | |
| int | icl_list_destroy (icl_list_t *, void(*)(void *)) |
| Destroys a linked list. More... | |
| int | icl_list_size (icl_list_t *) |
| Returns the number of items in a linked list. More... | |
Dependency-free linked list.
PULSAR Runtime http://icl.utk.edu/pulsar/ Copyright (C) 2012-2015 University of Tennessee.
Definition in file icl_list.h.
| icl_list_t* icl_list_append | ( | icl_list_t * | head, |
| void * | data | ||
| ) |
Inserts a node at the end of a list.
| head | – The linked list. |
| data | – The data to be inserted. |
Definition at line 326 of file icl_list.c.
| icl_list_t* icl_list_concat | ( | icl_list_t * | head1, |
| icl_list_t * | head2 | ||
| ) |
Concatenates two linked lists.
| head1 | – The first linked list. |
| head2 | – The second linked list. |
Definition at line 290 of file icl_list.c.
| int icl_list_delete | ( | icl_list_t * | head, |
| icl_list_t * | pos, | ||
| void(*)(void *) | free_function | ||
| ) |
Deletes the specified node.
| head | – The linked list containing the node to be deleted. |
| pos | – The node to be deleted. |
| free_function | – The function that frees the node's data. |
| 0 | on success. |
| -1 | on failure. |
Definition at line 82 of file icl_list.c.
| int icl_list_destroy | ( | icl_list_t * | head, |
| void(*)(void *) | free_function | ||
| ) |
Destroys a linked list.
| head | – The linked list to be destroyed. |
| free_function | – The function that frees the node's data. |
| 0 | on success. |
| -1 | on failure. |
Definition at line 173 of file icl_list.c.
| icl_list_t* icl_list_first | ( | icl_list_t * | head) |
Returns the first item in a linked list.
| head | – The linked list. |
Definition at line 221 of file icl_list.c.
| icl_list_t* icl_list_insert | ( | icl_list_t * | head, |
| icl_list_t * | pos, | ||
| void * | data | ||
| ) |
Inserts a new node after the specified node.
| head | – The linked list. |
| pos | – The insertion position (the node to append to). |
| data | – The pointer to the data to be inserted. |
Definition at line 47 of file icl_list.c.
| icl_list_t* icl_list_isort | ( | icl_list_t * | head, |
| void * | data, | ||
| int(*)(void *, void *) | compare | ||
| ) |
Inserts data into a sorted list. Does not support direct comparison of pointers.
| head | – The linked list. |
| data | – The data to be inserted. |
| compare | – The function that compares the data items. |
Definition at line 144 of file icl_list.c.
| icl_list_t* icl_list_last | ( | icl_list_t * | head) |
Returns the last item in a linked list.
| head | – The linked list. |
Definition at line 237 of file icl_list.c.
| icl_list_t* icl_list_new | ( | ) |
Creates a new linked list.
Definition at line 22 of file icl_list.c.
| icl_list_t* icl_list_next | ( | icl_list_t * | head, |
| icl_list_t * | pos | ||
| ) |
Returns the node following the specified node.
| head | – The list containing the specified node. |
| pos | – The node whose successor should be returned. |
Definition at line 254 of file icl_list.c.
| icl_list_t* icl_list_prepend | ( | icl_list_t * | head, |
| void * | data | ||
| ) |
Inserts a node at the beginning of a list.
| head | – The linked list. |
| data | – The data to be inserted. |
Definition at line 312 of file icl_list.c.
| icl_list_t* icl_list_prev | ( | icl_list_t * | head, |
| icl_list_t * | pos | ||
| ) |
Returns the node preceding the specified node.
| head | – The list containing the specified node. |
| pos | – The node whose predecessor should be returned. |
Definition at line 271 of file icl_list.c.
| icl_list_t* icl_list_search | ( | icl_list_t * | head, |
| void * | data, | ||
| int(*)(void *, void *) | compare | ||
| ) |
Finds a data item in a linked list.
| head | – The linked list. |
| data | – The data to be found. |
| compare | – The function that compares the data items. |
Definition at line 114 of file icl_list.c.
| int icl_list_size | ( | icl_list_t * | head) |
Returns the number of items in a linked list.
| head | – The linked list. |
Definition at line 200 of file icl_list.c.