-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf,
- "Logging specific to the SURF storage module");
+XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_storage, surf, "Logging specific to the SURF storage module");
-int ROUTING_STORAGE_LEVEL; //Routing for storagelevel
-int ROUTING_STORAGE_HOST_LEVEL;
-int SURF_STORAGE_LEVEL;
+int ROUTING_STORAGE_LEVEL = -1; //Routing for storagelevel
+int ROUTING_STORAGE_HOST_LEVEL = -1;
+int SURF_STORAGE_LEVEL = -1;
-int ROUTING_STORAGE_TYPE_LEVEL; //Routing for storage_type level
-simgrid::surf::StorageModel *surf_storage_model = NULL;
+int ROUTING_STORAGE_TYPE_LEVEL = -1; //Routing for storage_type level
+simgrid::surf::StorageModel *surf_storage_model = nullptr;
- , p_contentType(xbt_strdup(content_type))
- , m_size(size), m_usedSize(0)
- , p_typeId(xbt_strdup(type_id))
- , p_writeActions(xbt_dynar_new(sizeof(Action*),NULL))
+ , contentType_(xbt_strdup(content_type))
+ , size_(size), usedSize_(0)
+ , typeId_(xbt_strdup(type_id))
+ , writeActions_(std::vector<StorageAction*>())
const char *content_type, sg_size_t size, const char *attach)
: Resource(model, name, lmm_constraint_new(maxminSystem, this, bconnection))
, PropertyHolder(props)
const char *content_type, sg_size_t size, const char *attach)
: Resource(model, name, lmm_constraint_new(maxminSystem, this, bconnection))
, PropertyHolder(props)
- , p_contentType(xbt_strdup(content_type))
- , m_size(size), m_usedSize(0)
- , p_typeId(xbt_strdup(type_id))
- , p_writeActions(xbt_dynar_new(sizeof(Action*),NULL))
+ , contentType_(xbt_strdup(content_type))
+ , size_(size), usedSize_(0)
+ , typeId_(xbt_strdup(type_id))
+ , writeActions_(std::vector<StorageAction*>())
turnOn();
XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
turnOn();
XBT_DEBUG("Create resource with Bconnection '%f' Bread '%f' Bwrite '%f' and Size '%llu'", bconnection, bread, bwrite, size);
- p_constraintRead = lmm_constraint_new(maxminSystem, this, bread);
- p_constraintWrite = lmm_constraint_new(maxminSystem, this, bwrite);
+ constraintRead_ = lmm_constraint_new(maxminSystem, this, bread);
+ constraintWrite_ = lmm_constraint_new(maxminSystem, this, bwrite);
xbt_dict_t parse_content = xbt_dict_new_homogeneous(xbt_free_f);
FILE *file = surf_fopen(filename, "r");
xbt_assert(file, "Cannot open file '%s' (path=%s)", filename, xbt_str_join(surf_path, ":"));
xbt_dict_t parse_content = xbt_dict_new_homogeneous(xbt_free_f);
FILE *file = surf_fopen(filename, "r");
xbt_assert(file, "Cannot open file '%s' (path=%s)", filename, xbt_str_join(surf_path, ":"));
if (read){
xbt_assert(sscanf(line,"%s %llu", path, &size) == 2, "Parse error in %s: %s",filename,line);
if (read){
xbt_assert(sscanf(line,"%s %llu", path, &size) == 2, "Parse error in %s: %s",filename,line);
- xbt_dict_set(parse_content,path,psize,NULL);
+ xbt_dict_set(parse_content,path,psize,nullptr);
- xbt_dict_foreach(p_content, cursor, file, psize){
- xbt_dict_set(content_dict,file,psize,NULL);
+ xbt_dict_foreach(content_, cursor, file, psize){
+ xbt_dict_set(content_dict,file,psize,nullptr);
StorageAction::StorageAction(Model *model, double cost, bool failed,
Storage *storage, e_surf_action_storage_type_t type)
: Action(model, cost, failed)
StorageAction::StorageAction(Model *model, double cost, bool failed,
Storage *storage, e_surf_action_storage_type_t type)
: Action(model, cost, failed)
-, m_type(type), p_storage(storage), p_file(NULL){
+, m_type(type), p_storage(storage), p_file(nullptr){
progress = 0;
};
StorageAction::StorageAction(Model *model, double cost, bool failed, lmm_variable_t var,
Storage *storage, e_surf_action_storage_type_t type)
: Action(model, cost, failed, var)
progress = 0;
};
StorageAction::StorageAction(Model *model, double cost, bool failed, lmm_variable_t var,
Storage *storage, e_surf_action_storage_type_t type)
: Action(model, cost, failed, var)
- , m_type(type), p_storage(storage), p_file(NULL){
+ , m_type(type), p_storage(storage), p_file(nullptr){