Header file for list.c.
More...
#include "offload_acc_omp.h"
Go to the source code of this file.
|
typedef struct list_int_node | list_int_node |
| Linked list node that stores int data.
|
|
Header file for list.c.
Definition in file list.h.
◆ list_int_create()
Create an empty list.
- Parameters
-
list | pointer to the created list |
Definition at line 16 of file list.c.
◆ list_int_free()
DECLARE_TARGET_END DECLARE_TARGET void list_int_free |
( |
list_int_node ** | list | ) |
|
Deallocate this list and all lists it is linked to.
- Parameters
-
list | pointer to the list to be freed |
Definition at line 28 of file list.c.
◆ list_int_add()
DECLARE_TARGET_END DECLARE_TARGET void list_int_add |
( |
list_int_node * | list, |
|
|
int | data ) |
Add new node to the end of the chain.
- Parameters
-
list | list node to which new node is linked |
data | int value to be stored in the new node |
Definition at line 48 of file list.c.
◆ list_int_get()
DECLARE_TARGET_END DECLARE_TARGET int list_int_get |
( |
list_int_node * | list, |
|
|
int | index ) |
Retrieve the data stored in a list node.
- Parameters
-
list | list node |
index | node index where data is retrieved, zero refers to current node |
- Returns
- the stored data
Definition at line 69 of file list.c.
◆ list_int_size()
DECLARE_TARGET_END DECLARE_TARGET int list_int_size |
( |
list_int_node * | list | ) |
|
Get list size.
- Parameters
-
- Returns
- number of nodes this node is linked to
Definition at line 86 of file list.c.