- storage_running_action_set_that_does_not_need_being_checked =
- xbt_swag_new(xbt_swag_offset(*action, stateHookup_));
+ storage_running_action_set_that_does_not_need_being_checked = xbt_swag_new(xbt_swag_offset(*action, stateHookup_));
#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
Storage *StorageN11Model::createStorage(const char* id, const char* type_id,
#include "src/surf/xml/platf.hpp" // FIXME: move that back to the parsing area
Storage *StorageN11Model::createStorage(const char* id, const char* type_id,
- const char* content_name, const char* content_type, xbt_dict_t properties,
- const char* attach)
+ const char* content_name, const char* content_type, xbt_dict_t properties, const char* attach)
storage_type_t storage_type = (storage_type_t) xbt_lib_get_or_null(storage_type_lib, type_id,ROUTING_STORAGE_TYPE_LEVEL);
storage_type_t storage_type = (storage_type_t) xbt_lib_get_or_null(storage_type_lib, type_id,ROUTING_STORAGE_TYPE_LEVEL);
xbt_lib_set(storage_lib, id, SURF_STORAGE_LEVEL, storage);
XBT_DEBUG("SURF storage create resource\n\t\tid '%s'\n\t\ttype '%s'\n\t\tproperties '%p'\n\t\tBread '%f'\n",
xbt_lib_set(storage_lib, id, SURF_STORAGE_LEVEL, storage);
XBT_DEBUG("SURF storage create resource\n\t\tid '%s'\n\t\ttype '%s'\n\t\tproperties '%p'\n\t\tBread '%f'\n",
- double min_completion = shareResourcesMaxMin(getRunningActionSet(),
- maxminSystem_, lmm_solve);
+ double min_completion = shareResourcesMaxMin(getRunningActionSet(), maxminSystem_, lmm_solve);
- XBT_DEBUG("%s:\n\t progress = %.2f, current_progress = %.2f, "
- "incr = %ld, lrint(1) = %ld, lrint(2) = %ld",
+ XBT_DEBUG("%s:\n\t progress = %.2f, current_progress = %.2f, incr = %ld, lrint(1) = %ld, lrint(2) = %ld",
action->p_file->name,
action->progress, current_progress, incr,
lrint(action->progress + current_progress),
lrint(action->progress)+ incr);
/* take care of rounding error accumulation */
action->p_file->name,
action->progress, current_progress, incr,
lrint(action->progress + current_progress),
lrint(action->progress)+ incr);
/* take care of rounding error accumulation */
action->p_file->current_position+= incr; // current_position
// which becomes the new file size
action->p_file->size = action->p_file->current_position ;
sg_size_t *psize = xbt_new(sg_size_t,1);
*psize = action->p_file->size;
action->p_file->current_position+= incr; // current_position
// which becomes the new file size
action->p_file->size = action->p_file->current_position ;
sg_size_t *psize = xbt_new(sg_size_t,1);
*psize = action->p_file->size;
xbt_dict_set(content_dict, action->p_file->name, psize, nullptr);
}
xbt_dict_set(content_dict, action->p_file->name, psize, nullptr);
}
- if(action->getRemainsNoUpdate() > 0 &&
- lmm_get_variable_weight(action->getVariable()) > 0 &&
- action->p_storage->m_usedSize == action->p_storage->m_size)
- {
+ if(action->getRemainsNoUpdate() > 0 && lmm_get_variable_weight(action->getVariable()) > 0 &&
+ action->p_storage->usedSize_ == action->p_storage->size_) {
- xbt_dict_set(p_content, path, psize, nullptr);
+ xbt_dict_set(content_, path, psize, nullptr);
XBT_DEBUG("File '%s' was not found, file created.",path);
}
surf_file_t file = xbt_new0(s_surf_file_t,1);
XBT_DEBUG("File '%s' was not found, file created.",path);
}
surf_file_t file = xbt_new0(s_surf_file_t,1);
- char *filename = fd->name;
- XBT_DEBUG("\tClose file '%s' size '%llu'", filename, fd->size);
+ XBT_DEBUG("\tClose file '%s' size '%llu'", fd->name, fd->size);
- void *_write_action;
- StorageAction *write_action;
- unsigned int i;
- xbt_dynar_foreach(p_writeActions, i, _write_action) {
- write_action = static_cast<StorageAction*>(_write_action);
+ for (std::vector<StorageAction*>::iterator it = writeActions_.begin(); it != writeActions_.end();) {
+ StorageAction *write_action = *it;
StorageAction *action = new StorageN11Action(getModel(), size, isOff(), this, WRITE);
action->p_file = fd;
StorageAction *action = new StorageN11Action(getModel(), size, isOff(), this, WRITE);
action->p_file = fd;
- /* Substract the part of the file that might disappear from the used sized on
- * the storage element */
- m_usedSize -= (fd->size - fd->current_position);
+ /* Substract the part of the file that might disappear from the used sized on the storage element */
+ usedSize_ -= (fd->size - fd->current_position);
- lmm_expand(model->getMaxminSystem(), storage->p_constraintRead,
- getVariable(), 1.0);
+ lmm_expand(model->getMaxminSystem(), storage->constraintRead_, getVariable(), 1.0);
- lmm_expand(model->getMaxminSystem(), storage->p_constraintWrite,
- getVariable(), 1.0);
+ lmm_expand(model->getMaxminSystem(), storage->constraintWrite_, getVariable(), 1.0);
//TODO there is something annoying with what's below. Have to sort it out...
// Action *action = this;
//TODO there is something annoying with what's below. Have to sort it out...
// Action *action = this;