X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1fc042e8bc9c51f9267fa1936deaebe59ae01ee7..4e73c03c087fd07184d9ed45224f7fbad24e686e:/src/smpi/include/smpi_coll.hpp diff --git a/src/smpi/include/smpi_coll.hpp b/src/smpi/include/smpi_coll.hpp index f9356eae7d..b7c74e6b8d 100644 --- a/src/smpi/include/smpi_coll.hpp +++ b/src/smpi/include/smpi_coll.hpp @@ -1,5 +1,5 @@ /*High level handling of collective algorithms*/ -/* Copyright (c) 2009-2010, 2012-2017. The SimGrid Team. +/* Copyright (c) 2009-2019. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -11,12 +11,12 @@ #include "private.hpp" #include "xbt/base.h" -/** \brief MPI collective description */ +/** @brief MPI collective description */ -#define COLL_DEFS(cat, ret, args, args2)\ - static void set_##cat(const char* name);\ - static s_mpi_coll_description_t mpi_coll_##cat##_description[];\ - static int (*cat ) args; +#define COLL_DEFS(cat, ret, args, args2) \ + static void set_##cat(std::string name); \ + static s_mpi_coll_description_t mpi_coll_##cat##_description[]; \ + static int(*cat) args; #define COLL_SIG(cat, ret, args, args2)\ static int cat args; @@ -82,17 +82,16 @@ static ret cat (COLL_UNPAREN args); \ namespace simgrid{ namespace smpi{ -struct mpi_coll_description { - const char *name; - const char *description; +struct s_mpi_coll_description_t { + std::string name; + std::string description; void *coll; }; -typedef struct mpi_coll_description s_mpi_coll_description_t; class Colls{ public: - static XBT_PUBLIC(void) coll_help(const char *category, s_mpi_coll_description_t * table); - static XBT_PUBLIC(int) find_coll_description(s_mpi_coll_description_t * table, const char *name, const char *desc); + static XBT_PUBLIC void coll_help(const char* category, s_mpi_coll_description_t* table); + static XBT_PUBLIC int find_coll_description(s_mpi_coll_description_t* table, std::string name, const char* desc); static void set_collectives(); // for each collective type, create the set_* prototype, the description array and the function pointer @@ -399,6 +398,7 @@ COLL_APPLY(action, COLL_BARRIER_SIG, ompi_tree) COLL_sep \ COLL_APPLY(action, COLL_BARRIER_SIG, ompi_bruck) COLL_sep \ COLL_APPLY(action, COLL_BARRIER_SIG, ompi_recursivedoubling) COLL_sep \ COLL_APPLY(action, COLL_BARRIER_SIG, ompi_doublering) COLL_sep \ +COLL_APPLY(action, COLL_BARRIER_SIG, mpich_smp) COLL_sep \ COLL_APPLY(action, COLL_BARRIER_SIG, mpich) COLL_sep \ COLL_APPLY(action, COLL_BARRIER_SIG, mvapich2_pair) COLL_sep \ COLL_APPLY(action, COLL_BARRIER_SIG, mvapich2) COLL_sep \