SimGrid  3.14.159
Versatile Simulation of Distributed Systems

Detailed Description

Functions

void xbt_dynar_push (xbt_dynar_t const dynar, const void *src)
 Add an element at the end of the dynar. More...
 
void xbt_dynar_pop (xbt_dynar_t const dynar, void *const dst)
 Get and remove the last element of the dynar. More...
 
void xbt_dynar_unshift (xbt_dynar_t const dynar, const void *src)
 Add an element at the begining of the dynar. More...
 
void xbt_dynar_shift (xbt_dynar_t const dynar, void *const dst)
 Get and remove the first element of the dynar. More...
 
void xbt_dynar_map (const xbt_dynar_t dynar, void_f_pvoid_t const op)
 Apply a function to each member of a dynar. More...
 

Function Documentation

§ xbt_dynar_push()

void xbt_dynar_push ( xbt_dynar_t const  dynar,
const void src 
)

Add an element at the end of the dynar.

Examples:
examples/msg/actions-comm/actions-comm.c.

§ xbt_dynar_pop()

void xbt_dynar_pop ( xbt_dynar_t const  dynar,
void *const  dst 
)

Get and remove the last element of the dynar.

§ xbt_dynar_unshift()

void xbt_dynar_unshift ( xbt_dynar_t const  dynar,
const void *const  src 
)

Add an element at the begining of the dynar.

This is less efficient than xbt_dynar_push()

§ xbt_dynar_shift()

void xbt_dynar_shift ( xbt_dynar_t const  dynar,
void *const  dst 
)

Get and remove the first element of the dynar.

This is less efficient than xbt_dynar_pop()

§ xbt_dynar_map()

void xbt_dynar_map ( const xbt_dynar_t  dynar,
void_f_pvoid_t const  op 
)

Apply a function to each member of a dynar.

The mapped function may change the value of the element itself, but should not mess with the structure of the dynar.