Explorar el Código

Rename function starpu_load_history_debug to starpu_perfmodel_load_symbol

Nathalie Furmento hace 13 años
padre
commit
f8327e8c53

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

@@ -1986,7 +1986,7 @@ regression.
 @end table
 @end deftp
 
-@deftypefun int starpu_load_history_debug ({const char} *@var{symbol}, {struct starpu_perfmodel} *@var{model})
+@deftypefun int starpu_perfmodel_load_symbol ({const char} *@var{symbol}, {struct starpu_perfmodel} *@var{model})
 loads a given performance model. The @var{model} structure has to be completely zero, and will be filled with the information saved in @code{$HOME/.starpu} (@code{$USERPROFILE/.starpu} in windows environments).
 @end deftypefun
 

+ 1 - 1
doc/chapters/perf-feedback.texi

@@ -383,7 +383,7 @@ performance models. It also writes a @code{.gp} file in the current directory,
 to be run in the @code{gnuplot} tool, which shows the corresponding curve.
 
 The same can also be achieved by using StarPU's library API, see
-@ref{Performance Model API} and notably the @code{starpu_load_history_debug}
+@ref{Performance Model API} and notably the @code{starpu_perfmodel_load_symbol}
 function. The source code of the @code{starpu_perfmodel_display} tool can be a
 useful example.
 

+ 1 - 1
include/starpu_perfmodel.h

@@ -204,7 +204,7 @@ enum starpu_perf_archtype starpu_worker_get_perf_archtype(int workerid);
 
 /* This function is intended to be used by external tools that should read the
  * performance model files */
-int starpu_load_history_debug(const char *symbol, struct starpu_perfmodel *model);
+int starpu_perfmodel_load_symbol(const char *symbol, struct starpu_perfmodel *model);
 void starpu_perfmodel_debugfilepath(struct starpu_perfmodel *model, enum starpu_perf_archtype arch, char *path, size_t maxlen, unsigned nimpl);
 void starpu_perfmodel_get_arch_name(enum starpu_perf_archtype arch, char *archname, size_t maxlen, unsigned nimpl);
 int starpu_list_models(FILE *output);

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

@@ -876,7 +876,7 @@ int starpu_list_models(FILE *output)
 
 /* This function is intended to be used by external tools that should read the
  * performance model files */
-int starpu_load_history_debug(const char *symbol, struct starpu_perfmodel *model)
+int starpu_perfmodel_load_symbol(const char *symbol, struct starpu_perfmodel *model)
 {
 	model->symbol = strdup(symbol);
 	initialize_model(model);
@@ -899,7 +899,7 @@ int starpu_load_history_debug(const char *symbol, struct starpu_perfmodel *model
 			symbol2[dot-symbol] = '\0';
 			int ret;
 			fprintf(stderr,"note: loading history from %s instead of %s\n", symbol2, symbol);
-			ret = starpu_load_history_debug(symbol2,model);
+			ret = starpu_perfmodel_load_symbol(symbol2,model);
 			free(symbol2);
 			return ret;
 		}

+ 3 - 3
tests/perfmodels/valid_model.c

@@ -71,7 +71,7 @@ static int submit(struct starpu_codelet *codelet, struct starpu_perfmodel *model
 	codelet->model = model;
 
 	old_nsamples = 0;
-	ret = starpu_load_history_debug(codelet->model->symbol, &lmodel);
+	ret = starpu_perfmodel_load_symbol(codelet->model->symbol, &lmodel);
 	if (ret != 1)
 		for (archid = 0; archid < STARPU_NARCH_VARIATIONS; archid++)
 			old_nsamples += lmodel.per_arch[archid][0].regression.nsample;
@@ -86,10 +86,10 @@ static int submit(struct starpu_codelet *codelet, struct starpu_perfmodel *model
         starpu_data_unregister(handle);
 	starpu_shutdown(); // To force dumping perf models on disk
 
-	ret = starpu_load_history_debug(codelet->model->symbol, &lmodel);
+	ret = starpu_perfmodel_load_symbol(codelet->model->symbol, &lmodel);
 	if (ret == 1)
 	{
-		FPRINTF(stderr, "The performance model could not be loaded\n");
+		FPRINTF(stderr, "The performance model for the symbol <%s> could not be loaded\n", codelet->model->symbol);
 		return 1;
 	}
 

+ 1 - 0
tools/dev/rename.sed

@@ -14,6 +14,7 @@
 #
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
+s/\bstarpu_load_history_debug\b/starpu_perfmodel_load_symbol/g
 s/\bstarpu_access_mode\b/enum starpu_access_mode/g
 s/\bstruct starpu_codelet_t\b/struct starpu_codelet/g
 s/\bstarpu_codelet\b/struct starpu_codelet/g

+ 2 - 2
tools/starpu_perfmodel_display.c

@@ -384,10 +384,10 @@ int main(int argc, char **argv)
         else
 	{
 		struct starpu_perfmodel model;
-                int ret = starpu_load_history_debug(symbol, &model);
+                int ret = starpu_perfmodel_load_symbol(symbol, &model);
                 if (ret == 1)
 		{
-			fprintf(stderr, "The performance model could not be loaded\n");
+			fprintf(stderr, "The performance model for the symbol <%s> could not be loaded\n", symbol);
 			return 1;
 		}
                 display_all_perf_models(&model);

+ 2 - 2
tools/starpu_perfmodel_plot.c

@@ -423,10 +423,10 @@ int main(int argc, char **argv)
         }
 
 	/* Load the performance model associated to the symbol */
-	ret = starpu_load_history_debug(symbol, &model);
+	ret = starpu_perfmodel_load_symbol(symbol, &model);
 	if (ret == 1)
 	{
-		fprintf(stderr, "The performance model could not be loaded\n");
+		fprintf(stderr, "The performance model for the symbol <%s> could not be loaded\n", symbol);
 		return 1;
 	}