* @param src Source host (set by simgrid)
* @param dst Source host (set by simgrid)
*/
-static double smpi_cost_cb(SmpiOperation op, double size, sg4::Host* src, sg4::Host* dst)
+static double smpi_cost_cb(SmpiOperation op, size_t /*size*/, const sg4::Host* src, const sg4::Host* dst)
{
/* some dummy cost that depends on the operation and host */
static std::unordered_map<std::string, double> read_cost = {{"Tremblay", 1}, {"Jupiter", 2}};
* @param source Source host
* @param dst Destination host
*/
-using SmpiOpCostCb = std::function<double(double size, simgrid::s4u::Host* source, simgrid::s4u::Host* dst)>;
+using SmpiOpCostCb = std::function<double(size_t size, simgrid::s4u::Host* source, simgrid::s4u::Host* dst)>;
/** @brief SMPI functions that accept cost functions */
enum class SmpiOperation { RECV = 2, SEND = 1, ISEND = 0 };
/**
* @brief Generates warning message if user's config is conflicting (callback vs command line/xml)
* @param op String with config name (smpi/os, smpi/or, smpi/ois)
*/
- void check_factor_configs(const std::string op) const;
+ void check_factor_configs(const std::string& op) const;
public:
static xbt::Extension<s4u::Host, smpi::Host> EXTENSION_ID;
return current;
}
-void Host::check_factor_configs(const std::string op) const
+void Host::check_factor_configs(const std::string& op) const
{
static const std::unordered_map<std::string, SmpiOperation> name_to_op_enum{
{"smpi/or", SmpiOperation::RECV}, {"smpi/os", SmpiOperation::SEND}, {"smpi/ois", SmpiOperation::ISEND}};