Browse Source

Make the starpu_task_bundle_expected_* functions public.

Thanks to Andra Hugo for suggesting this idea !
Cyril Roelandt 13 years ago
parent
commit
75685a6032

+ 6 - 0
include/starpu_scheduler.h

@@ -188,6 +188,12 @@ double starpu_data_expected_transfer_time(starpu_data_handle_t handle, unsigned
 double starpu_task_expected_power(struct starpu_task *task, enum starpu_perf_archtype arch, unsigned nimpl);
 /* Returns expected conversion time in ms (multiformat interface only) */
 double starpu_task_expected_conversion_time(struct starpu_task *task, enum starpu_perf_archtype arch, unsigned nimpl);
+/* Return the expected duration of the entire task bundle in µs. */
+double starpu_task_bundle_expected_length(starpu_task_bundle_t bundle, enum starpu_perf_archtype arch, unsigned nimpl);
+/* Return the time (in µs) expected to transfer all data used within the bundle */
+double starpu_task_bundle_expected_data_transfer_time(starpu_task_bundle_t bundle, unsigned memory_node);
+/* Return the expected power consumption of the entire task bundle in J. */
+double starpu_task_bundle_expected_power(starpu_task_bundle_t bundle, enum starpu_perf_archtype arch, unsigned nimpl);
 
 #ifdef __cplusplus
 }

+ 3 - 3
src/core/perfmodel/perfmodel.c

@@ -339,7 +339,7 @@ double starpu_task_expected_data_transfer_time(uint32_t memory_node, struct star
 }
 
 /* Return the expected duration of the entire task bundle in µs */
-double _starpu_task_bundle_expected_length(starpu_task_bundle_t bundle, enum starpu_perf_archtype arch, unsigned nimpl)
+double starpu_task_bundle_expected_length(starpu_task_bundle_t bundle, enum starpu_perf_archtype arch, unsigned nimpl)
 {
 	double expected_length = 0.0;
 
@@ -367,7 +367,7 @@ double _starpu_task_bundle_expected_length(starpu_task_bundle_t bundle, enum sta
 }
 
 /* Return the expected power consumption of the entire task bundle in J */
-double _starpu_task_bundle_expected_power(starpu_task_bundle_t bundle, enum starpu_perf_archtype arch, unsigned nimpl)
+double starpu_task_bundle_expected_power(starpu_task_bundle_t bundle, enum starpu_perf_archtype arch, unsigned nimpl)
 {
 	double expected_power = 0.0;
 
@@ -395,7 +395,7 @@ double _starpu_task_bundle_expected_power(starpu_task_bundle_t bundle, enum star
 }
 
 /* Return the time (in µs) expected to transfer all data used within the bundle */
-double _starpu_task_bundle_expected_data_transfer_time(starpu_task_bundle_t bundle, unsigned memory_node)
+double starpu_task_bundle_expected_data_transfer_time(starpu_task_bundle_t bundle, unsigned memory_node)
 {
 	_STARPU_PTHREAD_MUTEX_LOCK(&bundle->mutex);
 

+ 0 - 6
src/core/perfmodel/perfmodel.h

@@ -66,12 +66,6 @@ void _starpu_create_sampling_directory_if_needed(void);
 void _starpu_load_bus_performance_files(void);
 double _starpu_predict_transfer_time(unsigned src_node, unsigned dst_node, size_t size);
 
-/* Return the expected duration of the entire task bundle in µs. */
-double _starpu_task_bundle_expected_length(starpu_task_bundle_t bundle, enum starpu_perf_archtype arch, unsigned nimpl);
-/* Return the time (in µs) expected to transfer all data used within the bundle */
-double _starpu_task_bundle_expected_data_transfer_time(starpu_task_bundle_t bundle, unsigned memory_node);
-/* Return the expected power consumption of the entire task bundle in J. */
-double _starpu_task_bundle_expected_power(starpu_task_bundle_t bundle, enum starpu_perf_archtype arch, unsigned nimpl);
 
 void _starpu_set_calibrate_flag(unsigned val);
 unsigned _starpu_get_calibrate_flag(void);

+ 3 - 3
src/sched_policies/heft.c

@@ -276,9 +276,9 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 			if (bundle)
 			{
 				/* TODO : conversion time */
-				local_task_length[worker][nimpl] = _starpu_task_bundle_expected_length(bundle, perf_arch, nimpl);
-				local_data_penalty[worker][nimpl] = _starpu_task_bundle_expected_data_transfer_time(bundle, memory_node);
-				local_power[worker][nimpl] = _starpu_task_bundle_expected_power(bundle, perf_arch,nimpl);
+				local_task_length[worker][nimpl] = starpu_task_bundle_expected_length(bundle, perf_arch, nimpl);
+				local_data_penalty[worker][nimpl] = starpu_task_bundle_expected_data_transfer_time(bundle, memory_node);
+				local_power[worker][nimpl] = starpu_task_bundle_expected_power(bundle, perf_arch,nimpl);
 				//_STARPU_DEBUG("Scheduler heft bundle: task length (%lf) local power (%lf) worker (%u) kernel (%u) \n", local_task_length[worker],local_power[worker],worker,nimpl);
 
 			}