-/* Copyright (c) 2006-2022. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2006-2023. 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/chrono.hpp>
#include <xbt/Extendable.hpp>
#include <xbt/signal.hpp>
-#include <xbt/string.hpp>
#include <functional>
#include <unordered_map>
*
* These objects are somewhat surprising from a modeling point of view. For example, the unit of their speed is
* somewhere between flop/sec and byte/sec. Arbitrary parallel executions will simply not work with the usual platform
- * models, and you must :ref:`use the ptask_L07 host model <options_model_select>` for that. Note that you can mix
+ * models, and you must :ref:`use the ptask_L07 host model <models_l07>` for that. Note that you can mix
* regular executions and communications with parallel executions, provided that the host model is ptask_L07.
*
* @endrst
*/
-/** Block the current actor until the built parallel execution completes */
+/** Block the current actor until the built parallel execution completes. */
XBT_PUBLIC void parallel_execute(const std::vector<s4u::Host*>& hosts, const std::vector<double>& flops_amounts,
const std::vector<double>& bytes_amounts);
-/** Block the current actor until the built multi-thread execution completes */
+/** Block the current actor until the built multi-thread execution completes. */
XBT_PUBLIC void thread_execute(s4u::Host* host, double flop_amounts, int thread_count);
/** Initialize a sequential execution that must then be started manually */
static void on_destruction_cb(const std::function<void(Actor const&)>& cb) { on_destruction.connect(cb); }
/** Create an actor from a @c std::function<void()>.
- * If the actor is restarted, it gets a fresh copy of the function.
+ * If the actor is restarted, it gets a fresh copy of the function.
* @verbatim embed:rst:inline See the :ref:`example <s4u_ex_actors_create>`. @endverbatim */
static ActorPtr create(const std::string& name, s4u::Host* host, const std::function<void()>& code);
/** Create an actor, but don't start it yet.
ActorPtr start(const std::function<void()>& code, std::vector<std::string> args);
- /** Create an actor from a callable thing.
+ /** Create an actor from a callable thing.
* @verbatim embed:rst:inline See the :ref:`example <s4u_ex_actors_create>`. @endverbatim */
template <class F> static ActorPtr create(const std::string& name, s4u::Host* host, F code)
{
/** Create an actor using a callable thing and its arguments.
*
- * Note that the arguments will be copied, so move-only parameters are forbidden.
+ * Note that the arguments will be copied, so move-only parameters are forbidden.
* @verbatim embed:rst:inline See the :ref:`example <s4u_ex_actors_create>`. @endverbatim */
template <class F, class... Args,
return create(name, host, std::bind(std::move(code), std::move(args)...));
}
- /** Create actor from function name and a vector of strings as arguments.
+ /** Create actor from function name and a vector of strings as arguments.
* @verbatim embed:rst:inline See the :ref:`example <s4u_ex_actors_create>`. @endverbatim */
static ActorPtr create(const std::string& name, s4u::Host* host, const std::string& function,
std::vector<std::string> args);
static bool is_maestro();
/** Retrieves the name of that actor as a C++ string */
- const simgrid::xbt::string& get_name() const;
+ const std::string& get_name() const;
/** Retrieves the name of that actor as a C string */
const char* get_cname() const;
/** Retrieves the host on which that actor is running */