-/* Copyright (c) 2009-2011. The SimGrid Team.
+/* Copyright (c) 2009-2011, 2013. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
CpuCas01Model::CpuCas01Model() : CpuModel("cpu")
{
- ActionPtr action;
- ActionLmmPtr actionlmm;
+ ActionPtr action = NULL;
+ ActionLmmPtr actionlmm = NULL;
char *optim = xbt_cfg_get_string(_sg_cfg_set, "cpu/optim");
int select = xbt_cfg_get_boolean(_sg_cfg_set, "cpu/maxmin_selective_update");
double CpuCas01Lmm::getPowerPeakAt(int pstate_index)
{
xbt_dynar_t plist = p_powerPeakList;
- xbt_assert((pstate_index <= xbt_dynar_length(plist)), "Invalid parameters (pstate index out of bounds)");
+ xbt_assert((pstate_index <= (int)xbt_dynar_length(plist)), "Invalid parameters (pstate index out of bounds)");
return xbt_dynar_get_as(plist, pstate_index, double);
}
void CpuCas01Lmm::setPowerPeakAt(int pstate_index)
{
xbt_dynar_t plist = p_powerPeakList;
- xbt_assert((pstate_index <= xbt_dynar_length(plist)), "Invalid parameters (pstate index out of bounds)");
+ xbt_assert((pstate_index <= (int)xbt_dynar_length(plist)), "Invalid parameters (pstate index out of bounds)");
double new_power_peak = xbt_dynar_get_as(plist, pstate_index, double);
m_pstate = pstate_index;