SimGrid
3.13
Versatile Simulation of Distributed Systems
|
DynArr are dynamically sized vector which may contain any type of variables. More...
Modules | |
Dynar constructor and destructor | |
Dynar as a regular array | |
Dynar miscellaneous functions | |
Perl-like use of dynars | |
Direct manipulation to the dynars content | |
Those functions do not retrieve the content, but only their address. | |
Speed optimized access to dynars of scalars | |
While the other functions use a memcpy to retrieve the content into the user provided area, those ones use a regular affectation. | |
Cursors on dynar | |
Cursors are used to iterate over the structure. | |
DynArr are dynamically sized vector which may contain any type of variables.
These are the SimGrid version of the dynamically size arrays, which all C programmer recode one day or another.
For performance concerns, the content of DynArr must be homogeneous (in contrary to dictionnaries – see the Dict: generic dictionnary section). You thus have to provide the function which will be used to free the content at structure creation (of type void_f_ppvoid_t or void_f_pvoid_t).
Note that if you use dynars to store pointed data, the xbt_dynar_search(), xbt_dynar_search_or_negative() and xbt_dynar_member() won't be for you. Instead of comparing your pointed elements, they compare the pointer to them. See the documentation of xbt_dynar_search() for more info.