Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add a function xbt_dynar_shrink
[simgrid.git] / include / xbt / dynar.h
index d3b131c..1007daf 100644 (file)
@@ -70,6 +70,7 @@ SG_BEGIN_DECL()
 
   unsigned long xbt_dynar_length(const xbt_dynar_t dynar);
   void          xbt_dynar_reset(xbt_dynar_t dynar);
+  void          xbt_dynar_shrink(xbt_dynar_t dynar, int empty_slots);
 
   void          xbt_dynar_dump(xbt_dynar_t dynar);
 
@@ -88,6 +89,8 @@ SG_BEGIN_DECL()
   void xbt_dynar_insert_at(xbt_dynar_t dynar, int  idx, const void *src);
   void xbt_dynar_remove_at(xbt_dynar_t dynar, int  idx, void * const dst);
 
+  int  xbt_dynar_search(xbt_dynar_t dynar, void *elem);
+  int  xbt_dynar_member(xbt_dynar_t dynar, void *elem);
 /** @} */
 /** @defgroup XBT_dynar_perl Perl-like use of dynars
  *  @ingroup XBT_dynar
@@ -105,7 +108,7 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_dynar_ctn Direct manipulation to the dynars content
  *  @ingroup XBT_dynar
  *
- *  Those functions do not retrive the content, but only their address.
+ *  Those functions do not retrieve the content, but only their address.
  *
  *  @{
  */
@@ -119,7 +122,7 @@ SG_BEGIN_DECL()
 /** @defgroup XBT_dynar_speed Speed optimized access to dynars of scalars
  *  @ingroup XBT_dynar
  *
- *  While the other functions use a memcpy to retrive the content into the
+ *  While the other functions use a memcpy to retrieve the content into the
  *  user provided area, those ones use a regular affectation. It only works
  *  for scalar values, but should be a little faster.
  *