+
+/**
+ * \brief Parallel map structure
+ */
+typedef struct s_xbt_parmap {
+ e_xbt_parmap_flag_t status; /* is the parmap active or being destroyed? */
+
+ int work; /* index of the current round (1 is the first) */
+ int done; /* number of rounds already done */
+ unsigned int thread_counter; /* number of threads currently working */
+ unsigned int num_workers; /* total number of worker threads including the controller */
+ void_f_pvoid_t fun; /* function to run in parallel on each element of data */
+ xbt_dynar_t data; /* parameters to pass to fun in parallel */
+ unsigned int index; /* index of the next element of data to pick */
+} s_xbt_parmap_t;
+
+/**
+ * \brief Creates a parallel map object
+ * \param num_workers number of worker threads to create
+ * \return the parmap created
+ */