X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4871b54f42ce85370d6acdbcb7e42bf75a63b389..d44e911ae45609418de22c72114e85c4e031fcf4:/src/surf/vm_workstation_hl13.hpp diff --git a/src/surf/vm_workstation_hl13.hpp b/src/surf/vm_workstation_hl13.hpp index 4278426505..24d6175e70 100644 --- a/src/surf/vm_workstation_hl13.hpp +++ b/src/surf/vm_workstation_hl13.hpp @@ -1,9 +1,9 @@ -/* - * vm_workstation.hpp - * - * Created on: Nov 12, 2013 - * Author: bedaride - */ +/* Copyright (c) 2013-2014. The SimGrid Team. + * All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #include "vm_workstation_interface.hpp" #include "workstation_clm03.hpp" @@ -22,8 +22,8 @@ void surf_vm_workstation_model_init(void); class WorkstationVMHL13Model; typedef WorkstationVMHL13Model *WorkstationVMHL13ModelPtr; -class WorkstationVMHL13Lmm; -typedef WorkstationVMHL13Lmm *WorkstationVMHL13LmmPtr; +class WorkstationVMHL13; +typedef WorkstationVMHL13 *WorkstationVMHL13Ptr; /********* * Tools * @@ -32,25 +32,30 @@ typedef WorkstationVMHL13Lmm *WorkstationVMHL13LmmPtr; /********* * Model * *********/ -class WorkstationVMHL13Model : public WorkstationVMModel, public WorkstationCLM03Model { +class WorkstationVMHL13Model : public WorkstationVMModel { public: WorkstationVMHL13Model(); ~WorkstationVMHL13Model(){}; void createResource(const char *name, void *ind_phys_workstation); double shareResources(double now); void adjustWeightOfDummyCpuActions() {}; - xbt_dynar_t getRoute(WorkstationPtr src, WorkstationPtr dst); ActionPtr communicate(WorkstationPtr src, WorkstationPtr dst, double size, double rate); + ActionPtr executeParallelTask(int workstation_nb, + void **workstation_list, + double *computation_amount, + double *communication_amount, + double rate); + void updateActionsState(double /*now*/, double /*delta*/); }; /************ * Resource * ************/ -class WorkstationVMHL13Lmm : public WorkstationVMLmm, public WorkstationCLM03Lmm { +class WorkstationVMHL13 : public WorkstationVM { public: - WorkstationVMHL13Lmm(WorkstationVMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t ind_phys_workstation); - ~WorkstationVMHL13Lmm(); + WorkstationVMHL13(WorkstationVMModelPtr model, const char* name, xbt_dict_t props, surf_resource_t ind_phys_workstation); + ~WorkstationVMHL13(); void suspend(); void resume(); @@ -66,20 +71,14 @@ public: surf_resource_t getPm(); // will be vm_ws_get_pm() void setBound(double bound); - void setAffinity(CpuLmmPtr cpu, unsigned long mask); + void setAffinity(CpuPtr cpu, unsigned long mask); //FIXME: remove - void updateState(tmgr_trace_event_t event_type, double value, double date) { - WorkstationCLM03Lmm::updateState(event_type, value, date); - } - bool isUsed() { - return WorkstationCLM03Lmm::isUsed(); - } - xbt_dict_t getProperties() { - return WorkstationCLM03Lmm::getProperties(); - } - ActionPtr execute(double size); + void updateState(tmgr_trace_event_t event_type, double value, double date); + bool isUsed(); + ActionPtr execute(double size); + ActionPtr sleep(double duration); }; /**********