MAGMA  magma-1.4.0
Matrix Algebra on GPU and Multicore Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
icl_list.h File Reference
This graph shows which files directly or indirectly include this file:

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_ticl_list_new ()
 
icl_list_ticl_list_insert (icl_list_t *, icl_list_t *, void *)
 
icl_list_ticl_list_search (icl_list_t *, void *, int(*)(void *, void *))
 
icl_list_ticl_list_first (icl_list_t *)
 
icl_list_ticl_list_last (icl_list_t *)
 
icl_list_ticl_list_next (icl_list_t *, icl_list_t *)
 
icl_list_ticl_list_prev (icl_list_t *, icl_list_t *)
 
icl_list_ticl_list_concat (icl_list_t *, icl_list_t *)
 
icl_list_ticl_list_prepend (icl_list_t *, void *)
 
icl_list_ticl_list_append (icl_list_t *, void *)
 
int icl_list_delete (icl_list_t *, icl_list_t *, void(*)(void *))
 
int icl_list_destroy (icl_list_t *, void(*)(void *))
 
int icl_list_size (icl_list_t *)
 

Detailed Description

Header file for the icl_list routines.

Definition in file icl_list.h.

Macro Definition Documentation

#define icl_list_foreach (   list,
  ptr 
)    for (ptr = icl_list_first(list); ptr != NULL; ptr = icl_list_next(list, ptr))

Definition at line 42 of file icl_list.h.

Typedef Documentation

typedef struct icl_list_s icl_list_t

Definition at line 23 of file icl_list.h.

Function Documentation

icl_list_t * icl_list_append ( icl_list_t head,
void *  data 
)

Insert a node at the end of this list.

Parameters
head– the linked list
data– the data to be inserted
Returns
pointer to the new node. returns NULL on error.

Definition at line 304 of file icl_list.c.

References icl_list_s::blink, and icl_list_insert().

305 {
306  return(icl_list_insert(head, head->blink, data));
307 }
icl_list_t * icl_list_insert(icl_list_t *head, icl_list_t *pos, void *data)
Definition: icl_list.c:49
struct icl_list_s * blink
Definition: icl_list.h:20

Here is the call graph for this function:

Here is the caller graph for this function:

icl_list_t * icl_list_concat ( icl_list_t ,
icl_list_t  
)
int icl_list_delete ( icl_list_t ,
icl_list_t ,
void(*)(void *)   
)
int icl_list_destroy ( icl_list_t ,
void(*)(void *)   
)
icl_list_t * icl_list_first ( icl_list_t )
icl_list_t * icl_list_insert ( icl_list_t ,
icl_list_t ,
void *   
)
icl_list_t * icl_list_last ( icl_list_t )
icl_list_t* icl_list_new ( )
icl_list_t * icl_list_next ( icl_list_t ,
icl_list_t  
)
icl_list_t * icl_list_prepend ( icl_list_t ,
void *   
)
icl_list_t * icl_list_prev ( icl_list_t ,
icl_list_t  
)
icl_list_t * icl_list_search ( icl_list_t ,
void *  ,
int(*)(void *, void *)   
)
int icl_list_size ( icl_list_t head)

Get the number of items in this linked list.

Parameters
head– the linked list
Returns
the number of items in the list. returns -1 on error.

Definition at line 171 of file icl_list.c.

References icl_list_s::flink.

172 {
173  int size=0;
174 
175  if(!head) return -1;
176 
177  while((head=head->flink))
178  size++;
179 
180  return size;
181 }
struct icl_list_s * flink
Definition: icl_list.h:19