-/* Copyright (c) 2006-2015. The SimGrid Team.
+/* Copyright (c) 2006-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "simgrid/simdag.h"
#include "simgrid/s4u.hpp"
+#include "simgrid/simdag.h"
#include "xbt/ex.h"
-#include <xbt/ex.hpp>
#include "xbt/log.h"
-#include <math.h>
+#include <cmath>
#include <set>
+#include <xbt/ex.hpp>
XBT_LOG_NEW_DEFAULT_CATEGORY(sd_test, "Logging specific to this SimDag example");
-/* Copyright (c) 2010-2012, 2014-2016. The SimGrid Team.
+/* Copyright (c) 2010-2012, 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#ifndef JEDULE_HPP_
#define JEDULE_HPP_
-#include <stdio.h>
#include "simgrid_config.h"
+#include <cstdio>
#include "jedule_events.hpp"
#include "jedule_platform.hpp"
#include <simgrid_config.h>
-#include <string>
#include <cstdarg>
-#include <stdlib.h>
+#include <cstdlib>
+#include <string>
#if SIMGRID_HAVE_MC
#include <stdexcept>
#include <cstddef>
-#include <cstdlib>
#include <cstring>
#include <iterator>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <locale.h>
+#include <clocale>
#include "simgrid/msg.h"
#include "simgrid/plugins/energy.h"
#include "xbt/sysdep.h"
#include "jxbt_utilities.h"
-#include <stdlib.h> /* abort */
+#include <cstdlib> /* abort */
SG_BEGIN_DECL()
-/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
+/* Copyright (c) 2010, 2012-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/network_interface.hpp"
#include "src/surf/xml/platf_private.hpp"
-#include <ctype.h>
-#include <string.h>
+#include <cctype>
+#include <cstring>
extern "C" {
#include <lauxlib.h>
#include "xbt/swag.h"
#include "xbt/xbt_os_time.h"
-#include <signal.h>
#include "src/simix/ActorImpl.hpp"
+#include <csignal>
#include <simgrid/simix.hpp>
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/kernel/routing/NetPoint.hpp"
#include "src/surf/network_interface.hpp"
-#include <float.h>
+#include <cfloat>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_dijkstra, surf, "Routing part of surf -- dijkstra routing logic");
-/* Copyright (c) 2009-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/surf/network_interface.hpp"
#include "xbt/log.h"
-#include <float.h>
+#include <cfloat>
#include <limits>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_route_floyd, surf, "Routing part of surf");
-/* Copyright (c) 2013-2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2013-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include <xbt/signal.hpp>
#include "src/kernel/routing/NetZoneImpl.hpp"
-/*
-#include <float.h>
-#include <vector>
-*/
+
namespace simgrid {
namespace kernel {
namespace routing {
-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <cstring> // memcpy, memcmp
#include <unistd.h>
-#include <string.h> // memcpy, memcmp
#include <sys/mman.h>
#ifdef __FreeBSD__
-/* Copyright (c) 2015-2016. The SimGrid Team.
+/* Copyright (c) 2015-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <csignal>
#include <fcntl.h>
-#include <signal.h>
#include <functional>
-/* Copyright (c) 2008-2015. The SimGrid Team.
+/* Copyright (c) 2008-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <unistd.h>
+#include <cstring>
+#include <dirent.h>
#include <fcntl.h>
-#include <string.h>
#include <link.h>
-#include <dirent.h>
#ifndef WIN32
#include <sys/mman.h>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <string.h>
+#include <cstring>
#include "xbt/dynar.h"
#include "xbt/sysdep.h"
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#ifdef SIMGRID_TEST
-#include <string.h>
-#include <stdlib.h>
+#include <cstdlib>
+#include <cstring>
#include <sys/mman.h>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <assert.h>
+#include <cassert>
#include <boost/range/algorithm.hpp>
-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
// We need this for the register indices:
// #define _GNU_SOURCE
-#include <string.h>
+#include <cstring>
// On x86_64, libunwind unw_context_t has the same layout as ucontext_t:
#include <sys/types.h>
-/* Copyright (c) 2015-2016. The SimGrid Team.
+/* Copyright (c) 2015-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <errno.h>
+#include <cerrno>
#include <unistd.h>
#include <sys/socket.h>
#define _FILE_OFFSET_BITS 64 /* needed for pread_whole to work as expected on 32bits */
-#include <assert.h>
-#include <errno.h>
-#include <stddef.h>
-#include <stdint.h>
+#include <cassert>
+#include <cerrno>
+#include <cstddef>
+#include <cstdint>
#include <sys/ptrace.h>
-/* Copyright (c) 2015. The SimGrid Team.
+/* Copyright (c) 2015-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <cerrno>
#include <cstddef> // std::size_t
-#include <errno.h>
-#include <stdio.h> // perror
-#include <string.h>
+#include <cstdio> // perror
+#include <cstring>
#include <sys/socket.h>
#include <sys/types.h>
-/* Copyright (c) 2009-2015. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2009-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/msg/msg_private.h"
#include "xbt/replay.hpp"
-#include <errno.h>
+#include <cerrno>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(msg_action, msg, "MSG actions for trace driven simulation");
#include "simgrid/simdag.h"
#include "src/internal_config.h"
#include "xbt/file.h"
-#include <string.h>
+#include <cstring>
#include <unordered_map>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_dotparse, sd, "Parsing DOT files");
#include <functional>
#include <memory>
-#include <signal.h> /* Signal handling */
-#include <stdlib.h>
#include "src/internal_config.h"
+#include <csignal> /* Signal handling */
+#include <cstdlib>
#include <xbt/functional.hpp>
#include "src/mc/mc_private.h"
#include "src/mc/remote/Client.hpp"
#include "src/mc/remote/mc_protocol.h"
-#include <stdlib.h>
#endif
#include "src/mc/mc_record.h"
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "../colls_private.h"
-#include <math.h>
+#include <cmath>
/*****************************************************************************
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "../colls_private.h"
-#include <math.h>
+#include <cmath>
/*****************************************************************************
*/
#include "../colls_private.h"
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#define REDUCE_NEW_ALWAYS 1
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <float.h>
+#include <cfloat>
#include <exception>
#include "private.h"
#include "private.hpp"
-#include <ctype.h>
+#include <cctype>
+#include <cstdarg>
+#include <cwchar>
#include <simgrid/sg_config.h>
-#include <stdarg.h>
-#include <wchar.h>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_smpi, instr, "Tracing SMPI");
#ifndef WIN32
#include <sys/mman.h>
#endif
-#include <math.h> // sqrt
+#include <cmath>
#if HAVE_PAPI
#include <papi.h>
#include "smpi_info.hpp"
#include "smpi_process.hpp"
+#include <cfloat> /* DBL_MAX */
#include <dlfcn.h>
#include <fcntl.h>
-#include <sys/stat.h>
-#include <float.h> /* DBL_MAX */
#include <fstream>
+#include <sys/stat.h>
#if HAVE_SENDFILE
#include <sys/sendfile.h>
#include <vector>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <string.h>
-#include <stdio.h>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <fcntl.h>
#include <sys/stat.h>
-#include <errno.h>
+#include <sys/types.h>
#ifndef WIN32
#include <sys/mman.h>
#include "private.hpp"
#include "xbt/dict.h"
#include "xbt/ex.hpp"
-#include <errno.h>
+#include <cerrno>
#include <sys/types.h>
#ifndef WIN32
#include <sys/mman.h>
#endif
-#include <sys/stat.h>
+#include <cstdio>
#include <fcntl.h>
-#include <string.h>
-#include <stdio.h>
+#include <sys/stat.h>
#ifndef MAP_ANONYMOUS
#define MAP_ANONYMOUS MAP_ANON
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include "xbt/sysdep.h"
#include "smpi/smpi.h"
#include "private.h"
-#include <vector>
-#include <math.h>
#include "smpi_comm.hpp"
#include "smpi_topo.hpp"
+#include "xbt/sysdep.h"
+#include <cmath>
+#include <vector>
/* static functions */
static int assignnodes(int ndim, int nfactor, int *pfacts,int **pdims);
-/* Copyright (c) 2007-2011, 2013-2014. The SimGrid Team.
+/* Copyright (c) 2007-2011, 2013-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "maxmin_private.hpp"
#include "xbt/log.h"
#include "xbt/sysdep.h"
-#include <float.h>
-#include <math.h>
-#include <stdlib.h>
+#include <cfloat>
+#include <cmath>
+#include <cstdlib>
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_maxmin);
#define SHOW_EXPR_G(expr) XBT_DEBUG(#expr " = %g",expr);
#include "xbt/sysdep.h"
#include "maxmin_private.hpp"
-#include <stdlib.h>
+#include <cstdlib>
#ifndef MATH
-#include <math.h>
+#include <cmath>
#endif
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_lagrange, surf, "Logging specific to SURF (lagrange)");
#include "xbt/log.h"
#include "xbt/mallocator.h"
#include "xbt/sysdep.h"
+#include <cmath>
+#include <cstdlib>
#include <cxxabi.h>
#include <limits>
-#include <math.h>
-#include <stdlib.h>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_maxmin, surf, "Logging specific to SURF (maxmin)");
#include "storage_n11.hpp"
#include "simgrid/s4u/Engine.hpp"
#include "src/kernel/routing/NetPoint.hpp"
-#include <math.h> /*ceil*/
+#include <cmath> /*ceil*/
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(surf_storage);
-/* Copyright (c) 2004-2005, 2007, 2009-2014. The SimGrid Team.
+/* Copyright (c) 2004-2005, 2007, 2009-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/split.hpp>
+#include <cmath>
#include <fstream>
-#include <math.h>
#include <sstream>
#include <unordered_map>
#include "xbt/log.h"
#include "xbt/misc.h"
-#include <math.h>
+#include <cmath>
namespace utf = boost::unit_test;
namespace tmgr = simgrid::trace_mgr;
-/* Copyright (c) 2004-2014,2016. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2004-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <stdio.h>
+#include <cstdio>
#include <algorithm>
#include <cerrno>
/* At some point we should use https://github.com/google/googletest instead */
#include "src/internal_config.h"
-#include <stdio.h>
+#include <cstdio>
#include <xbt/ex.hpp>
#include "xbt/sysdep.h" /* bvprintf */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
-#include <string.h>
-#include <stdio.h>
+#include <cstdio>
+#include <cstring>
#include "xbt/dict.h"
#include "xbt/ex.h"
}
#ifdef SIMGRID_TEST
-#include <time.h>
+#include "src/internal_config.h"
#include "xbt.h"
#include "xbt/ex.h"
+#include <ctime>
#include <xbt/ex.hpp>
-#include "src/internal_config.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(xbt_dict);
/* The extensions made for the SimGrid project can either be distributed */
/* under the same license, or under the LGPL v2.1 */
-#include <stdio.h>
-#include <stdlib.h>
+#include <cstdio>
+#include <cstdlib>
#include <xbt/backtrace.hpp>
#include "src/internal_config.h" /* execinfo when available */
}
#ifdef SIMGRID_TEST
-#include <stdio.h>
#include "xbt/ex.h"
+#include <cstdio>
#include <xbt/ex.hpp>
XBT_TEST_SUITE("xbt_ex", "Exception Handling");
#endif
#if HAVE_FUTEX_H
+#include <climits>
#include <linux/futex.h>
-#include <limits.h>
#endif
#include "xbt/parmap.h"
#define XBT_LOG_LOCALLY_DEFINE_XBT_CHANNEL /* MSVC don't want it to be declared extern in headers and local here */
-#include <math.h>
-#include "xbt/misc.h"
#include "simgrid_config.h"
-#include "xbt/sysdep.h"
+#include "xbt/config.h"
+#include "xbt/dynar.h"
#include "xbt/log.h"
#include "xbt/log.hpp"
-#include "xbt/dynar.h"
-#include "xbt/config.h"
+#include "xbt/misc.h"
+#include "xbt/sysdep.h"
+#include <cmath>
#include "xbt/module.h" /* this module */
#include "simgrid/sg_config.h"
#include "src/internal_config.h"
-#include <stdio.h>
+#include <cstdio>
#ifdef _WIN32
-#include <signal.h> /* To silence MSVC on abort() */
+#include <csignal> /* To silence MSVC on abort() */
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#undef NDEBUG
#endif
-#include <string.h>
-#include <assert.h>
-#include <stdlib.h>
+#include <cassert>
+#include <cstdlib>
+#include <cstring>
#include "src/mc/mc_private.h"
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#undef NDEBUG
#endif
-#include <string.h>
-#include <assert.h>
+#include <cassert>
+#include <cstring>
#include <mc/mc.h>
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#include <cstdlib>
#include <iostream>
#include <simgrid/s4u.hpp>
-#include <stdlib.h>
#include <vector>
#define NUM_COMMS 1
#include "simgrid/simdag.h"
#include "src/kernel/routing/NetPoint.hpp"
#include <algorithm>
-#include <stdio.h>
+#include <cstdio>
int main(int argc, char **argv)
{
/* A few tests for the maxmin library */
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "xbt/log.h"
#include "xbt/module.h"
#include "xbt/sysdep.h"
-#include <math.h>
+#include <cmath>
XBT_LOG_NEW_DEFAULT_CATEGORY(surf_test, "Messages specific for surf example");
/* A crash few tests for the maxmin library */
-/* Copyright (c) 2004-2015. The SimGrid Team.
+/* Copyright (c) 2004-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#define MYRANDMAX 1000
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdint.h>
+#include <cstdint>
+#include <cstdio>
+#include <cstdlib>
double date;
int64_t seedx = 0;
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2014, 2016-2017. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "xbt/mmalloc.h"
#include "xbt.h"
-#include <stdio.h>
-#include <assert.h>
+#include <cassert>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
#include <fcntl.h>
#include <sys/stat.h>
-#include <stdlib.h>
-#include <string.h>
#include <unistd.h>
#include <xbt/ex.hpp>