- 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 */
- 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->m_usedSize == action->p_storage->m_size) {
- 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 (auto it = p_writeActions.cbegin(); it != p_writeActions.cend();) {
+ 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;
m_usedSize -= (fd->size - fd->current_position);
// If the storage is full before even starting to write
if(m_usedSize==m_size) {
m_usedSize -= (fd->size - fd->current_position);
// If the storage is full before even starting to write
if(m_usedSize==m_size) {
- lmm_expand(model->getMaxminSystem(), storage->p_constraintRead,
- getVariable(), 1.0);
+ lmm_expand(model->getMaxminSystem(), storage->p_constraintRead, getVariable(), 1.0);
- lmm_expand(model->getMaxminSystem(), storage->p_constraintWrite,
- getVariable(), 1.0);
+ lmm_expand(model->getMaxminSystem(), storage->p_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;