Bläddra i källkod

perfmodel: rename struct starpu_history_list to struct starpu_perfmodel_history_list

Nathalie Furmento 12 år sedan
förälder
incheckning
74889b4885

+ 1 - 1
doc/chapters/basic-api.texi

@@ -2020,7 +2020,7 @@ case it depends on the architecture-specific implementation.
 @item @code{struct starpu_htbl32_node *history}
 The history of performance measurements.
 
-@item @code{struct starpu_history_list *list}
+@item @code{struct starpu_perfmodel_history_list *list}
 Used by @code{STARPU_HISTORY_BASED} and @code{STARPU_NL_REGRESSION_BASED},
 records all execution history measures.
 

+ 4 - 4
include/starpu_perfmodel.h

@@ -36,7 +36,7 @@ extern "C"
 struct starpu_task;
 
 struct starpu_history_table;
-struct starpu_history_list;
+struct starpu_perfmodel_history_list;
 struct starpu_buffer_descr;
 
 /*
@@ -108,9 +108,9 @@ struct starpu_history_entry
 #endif
 };
 
-struct starpu_history_list
+struct starpu_perfmodel_history_list
 {
-	struct starpu_history_list *next;
+	struct starpu_perfmodel_history_list *next;
 	struct starpu_history_entry *entry;
 };
 
@@ -150,7 +150,7 @@ struct starpu_per_arch_perfmodel
 
 	/* internal variables */
 	struct starpu_history_table *history;
-	struct starpu_history_list *list;
+	struct starpu_perfmodel_history_list *list;
 	struct starpu_regression_model regression;
 #ifdef STARPU_MODEL_DEBUG
 	char debug_path[256];

+ 7 - 7
src/core/perfmodel/perfmodel_history.c

@@ -56,12 +56,12 @@ static struct _starpu_perfmodel_list *registered_models = NULL;
 /*
  * History based model
  */
-static void insert_history_entry(struct starpu_history_entry *entry, struct starpu_history_list **list, struct starpu_history_table **history_ptr)
+static void insert_history_entry(struct starpu_history_entry *entry, struct starpu_perfmodel_history_list **list, struct starpu_history_table **history_ptr)
 {
-	struct starpu_history_list *link;
+	struct starpu_perfmodel_history_list *link;
 	struct starpu_history_table *table;
 
-	link = (struct starpu_history_list *) malloc(sizeof(struct starpu_history_list));
+	link = (struct starpu_perfmodel_history_list *) malloc(sizeof(struct starpu_perfmodel_history_list));
 	link->next = *list;
 	link->entry = entry;
 	*list = link;
@@ -355,7 +355,7 @@ static void dump_per_arch_model_file(FILE *f, struct starpu_perfmodel *model, un
 
 	per_arch_model = &model->per_arch[arch][nimpl];
 	/* count the number of elements in the lists */
-	struct starpu_history_list *ptr = NULL;
+	struct starpu_perfmodel_history_list *ptr = NULL;
 	unsigned nentries = 0;
 
 	if (model->type == STARPU_HISTORY_BASED || model->type == STARPU_NL_REGRESSION_BASED)
@@ -397,7 +397,7 @@ static unsigned get_n_entries(struct starpu_perfmodel *model, unsigned arch, uns
 	struct starpu_per_arch_perfmodel *per_arch_model;
 	per_arch_model = &model->per_arch[arch][impl];
 	/* count the number of elements in the lists */
-	struct starpu_history_list *ptr = NULL;
+	struct starpu_perfmodel_history_list *ptr = NULL;
 	unsigned nentries = 0;
 
 	if (model->type == STARPU_HISTORY_BASED || model->type == STARPU_NL_REGRESSION_BASED)
@@ -718,7 +718,7 @@ void _starpu_deinitialize_registered_performance_models(void)
 			for (nimpl = 0; nimpl < STARPU_MAXIMPLEMENTATIONS; nimpl++)
 			{
 				struct starpu_per_arch_perfmodel *archmodel = &model->per_arch[arch][nimpl];
-				struct starpu_history_list *list, *plist;
+				struct starpu_perfmodel_history_list *list, *plist;
 				struct starpu_history_table *entry, *tmp;
 
 				HASH_ITER(hh, archmodel->history, entry, tmp)
@@ -1070,7 +1070,7 @@ void _starpu_update_perfmodel_history(struct _starpu_job *j, struct starpu_perfm
 		{
 			struct starpu_history_entry *entry;
 			struct starpu_history_table *elt;
-			struct starpu_history_list **list;
+			struct starpu_perfmodel_history_list **list;
 			uint32_t key = _starpu_compute_buffers_footprint(model, arch, nimpl, j);
 
 			list = &per_arch_model->list;

+ 1 - 1
src/core/perfmodel/perfmodel_print.c

@@ -23,7 +23,7 @@
 static
 void _starpu_perfmodel_print_history_based(struct starpu_per_arch_perfmodel *per_arch_model, char *parameter, uint32_t *footprint, FILE *output)
 {
-	struct starpu_history_list *ptr;
+	struct starpu_perfmodel_history_list *ptr;
 
 	ptr = per_arch_model->list;
 

+ 5 - 5
src/core/perfmodel/regression.c

@@ -112,11 +112,11 @@ static double test_r(double c, unsigned n, unsigned *x, double *y)
 	return r;
 }
 
-static unsigned find_list_size(struct starpu_history_list *list_history)
+static unsigned find_list_size(struct starpu_perfmodel_history_list *list_history)
 {
 	unsigned cnt = 0;
 
-	struct starpu_history_list *ptr = list_history;
+	struct starpu_perfmodel_history_list *ptr = list_history;
 	while (ptr)
 	{
 		cnt++;
@@ -139,9 +139,9 @@ static double find_list_min(double *y, unsigned n)
 	return min;
 }
 
-static void dump_list(unsigned *x, double *y, struct starpu_history_list *list_history)
+static void dump_list(unsigned *x, double *y, struct starpu_perfmodel_history_list *list_history)
 {
-	struct starpu_history_list *ptr = list_history;
+	struct starpu_perfmodel_history_list *ptr = list_history;
 	unsigned i = 0;
 
 	while (ptr)
@@ -159,7 +159,7 @@ static void dump_list(unsigned *x, double *y, struct starpu_history_list *list_h
  * 	return 0 if success, -1 otherwise
  * 	if success, a, b and c are modified
  * */
-int _starpu_regression_non_linear_power(struct starpu_history_list *ptr, double *a, double *b, double *c)
+int _starpu_regression_non_linear_power(struct starpu_perfmodel_history_list *ptr, double *a, double *b, double *c)
 {
 	unsigned n = find_list_size(ptr);
 

+ 1 - 1
src/core/perfmodel/regression.h

@@ -24,6 +24,6 @@
 #include <core/perfmodel/perfmodel.h>
 #include <starpu.h>
 
-int _starpu_regression_non_linear_power(struct starpu_history_list *ptr, double *a, double *b, double *c);
+int _starpu_regression_non_linear_power(struct starpu_perfmodel_history_list *ptr, double *a, double *b, double *c);
 
 #endif // __REGRESSION_H__ 

+ 1 - 0
tools/dev/rename.sed

@@ -14,6 +14,7 @@
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
+s/\bstruct starpu_history_list\b/struct starpu_perfmodel_history_list/g
 s/\bstarpu_list_models\b/starpu_perfmodel_list/g
 s/\bstruct starpu_model_list\b/struct _starpu_perfmodel_list/g
 s/\bstarpu_load_history_debug\b/starpu_perfmodel_load_symbol/g

+ 1 - 1
tools/starpu_perfmodel_plot.c

@@ -220,7 +220,7 @@ static void display_history_based_perf_models(FILE *gnuplot_file, struct starpu_
 	char *command;
 	FILE *datafile;
 	unsigned arch;
-	struct starpu_history_list *ptr;
+	struct starpu_perfmodel_history_list *ptr;
 	char archname[32];
 	int col;
 	int len;