- smx_action_t compute; /* SIMIX modeling of computation */
- smx_action_t comm; /* SIMIX modeling of communication */
- double message_size; /* Data size */
- double computation_amount; /* Computation size */
- msg_process_t sender;
- msg_process_t receiver;
- msg_host_t source;
- double priority;
- double rate;
- int isused; /* Indicates whether the task is used in SIMIX currently */
- int host_nb; /* ==0 if sequential task; parallel task if not */
+ ~simdata_task()
+ {
+ if (this->compute)
+ this->compute->unref();
+
+ /* parallel tasks only */
+ xbt_free(this->host_list);
+
+ xbt_dict_free(&this->affinity_mask_db);
+ }
+ void setUsed();
+ void setNotUsed()
+ {
+ this->isused = false;
+ }
+
+ simgrid::simix::Exec *compute = nullptr; /* SIMIX modeling of computation */
+ simgrid::simix::Comm *comm = nullptr; /* SIMIX modeling of communication */
+ double bytes_amount = 0.0; /* Data size */
+ double flops_amount = 0.0; /* Computation size */
+ msg_process_t sender = nullptr;
+ msg_process_t receiver = nullptr;
+ msg_host_t source = nullptr;
+ double priority = 0.0;
+ double bound = 0.0; /* Capping for CPU resource */
+ double rate = 0.0; /* Capping for network resource */
+
+ /* CPU affinity database of this task */
+ xbt_dict_t affinity_mask_db = nullptr; /* smx_host_t host => unsigned long mask */
+
+ bool isused = false; /* Indicates whether the task is used in SIMIX currently */
+ int host_nb = 0; /* ==0 if sequential task; parallel task if not */