- friend Action *CpuL07::execution_start(double size);
- friend Action *CpuL07::sleep(double duration);
- friend Action *HostL07Model::executeParallelTask(int host_nb, sg_host_t*host_list,
- double *flops_amount, double *bytes_amount, double rate);
+ std::vector<s4u::Host*> hostList_;
+ bool free_arrays_ = false; // By default, computationAmount_ and friends are freed by caller. But not for sequential
+ // exec and regular comms
+ const double* computationAmount_; /* pointer to the data that lives in s4u action -- do not free unless if
+ * free_arrays */
+ const double* communicationAmount_; /* pointer to the data that lives in s4u action -- do not free unless if
+ * free_arrays */
+ double latency_;
+ double rate_;
+
+ friend CpuAction* CpuL07::execution_start(double size, double user_bound);
+ friend CpuAction* CpuL07::sleep(double duration);
+ friend CpuAction* HostL07Model::execute_parallel(const std::vector<s4u::Host*>& host_list, const double* flops_amount,
+ const double* bytes_amount, double rate);
+ friend Action* NetworkL07Model::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate);
+ /**
+ * @brief Calculate the CPU bound for the parallel task
+ *
+ * The task is bounded by the slowest CPU running the ptask, considering the current pstate of each CPU.
+ * Return MAX_DOUBLE if ptask has no computation.
+ */
+ double calculateCpuBound();
+
+ /**
+ * @brief Calculate the network bound for the parallel task
+ *
+ * The network bound depends on the largest latency between the communication in the ptask.
+ * Return MAX_DOUBLE if latency is 0 (or ptask doesn't have any communication)
+ */
+ double calculateNetworkBound();
+