Browse Source

rendre _starpu_arch_comb_get publique sous le nom starpu_perfmodel_arch_comb_fetch

Samuel Thibault 8 years ago
parent
commit
4bde16fd88

+ 1 - 0
ChangeLog

@@ -80,6 +80,7 @@ Small features:
   * Add STARPU_PERF_MODEL_HOMOGENEOUS_CPU environment variable to
     allow having one perfmodel per CPU core
   * Add starpu_vector_filter_list_long filter.
+  * Add starpu_perfmodel_arch_comb_fetch function.
 
 Small changes:
   * Output generated through STARPU_MPI_COMM has been modified to

+ 1 - 0
include/starpu_perfmodel.h

@@ -170,6 +170,7 @@ struct starpu_perfmodel_arch *starpu_worker_get_perf_archtype(int workerid, unsi
 int starpu_perfmodel_get_narch_combs();
 int starpu_perfmodel_arch_comb_add(int ndevices, struct starpu_perfmodel_device* devices);
 int starpu_perfmodel_arch_comb_get(int ndevices, struct starpu_perfmodel_device *devices);
+struct starpu_perfmodel_arch *starpu_perfmodel_arch_comb_fetch(int comb);
 
 struct starpu_perfmodel_per_arch *starpu_perfmodel_get_model_per_arch(struct starpu_perfmodel *model, struct starpu_perfmodel_arch *arch, unsigned impl);
 struct starpu_perfmodel_per_arch *starpu_perfmodel_get_model_per_devices(struct starpu_perfmodel *model, int impl, ...);

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

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2009-2016  Université de Bordeaux
+ * Copyright (C) 2009-2017  Université de Bordeaux
  * Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015  CNRS
  * Copyright (C) 2011  Télécom-SudParis
  * Copyright (C) 2016  Inria
@@ -108,8 +108,6 @@ void _starpu_write_double(FILE *f, char *format, double val);
 int _starpu_read_double(FILE *f, char *format, double *val);
 void _starpu_simgrid_get_platform_path(int version, char *path, size_t maxlen);
 
-struct starpu_perfmodel_arch * _starpu_arch_comb_get(int comb);
-
 void _starpu_perfmodel_realloc(struct starpu_perfmodel *model, int nb);
 
 #ifdef __cplusplus

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

@@ -185,7 +185,7 @@ int starpu_perfmodel_get_narch_combs()
 	return current_arch_comb;
 }
 
-struct starpu_perfmodel_arch *_starpu_arch_comb_get(int comb)
+struct starpu_perfmodel_arch *starpu_perfmodel_arch_comb_fetch(int comb)
 {
 	return arch_combs[comb];
 }
@@ -1868,7 +1868,7 @@ int starpu_perfmodel_list_combs(FILE *output, struct starpu_perfmodel *model)
 		struct starpu_perfmodel_arch *arch;
 		int device;
 
-		arch = _starpu_arch_comb_get(model->state->combs[comb]);
+		arch = starpu_perfmodel_arch_comb_fetch(model->state->combs[comb]);
 		fprintf(output, "\tComb %d: %d device%s\n", model->state->combs[comb], arch->ndevices, arch->ndevices>1?"s":"");
 		for(device=0 ; device<arch->ndevices ; device++)
 		{

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

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011, 2013-2016  Université de Bordeaux
+ * Copyright (C) 2011, 2013-2017  Université de Bordeaux
  * Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017  CNRS
  * Copyright (C) 2011  Télécom-SudParis
  *
@@ -176,7 +176,7 @@ int starpu_perfmodel_print_all(struct starpu_perfmodel *model, char *arch, char
 		int comb, impl;
 		for(comb = 0; comb < starpu_perfmodel_get_narch_combs(); comb++)
 		{
-			struct starpu_perfmodel_arch *arch_comb = _starpu_arch_comb_get(comb);
+			struct starpu_perfmodel_arch *arch_comb = starpu_perfmodel_arch_comb_fetch(comb);
 			int nimpls = model->state ? model->state->nimpls[comb] : 0;
 			for(impl = 0; impl < nimpls; impl++)
 				starpu_perfmodel_print(model, arch_comb, impl, parameter, footprint, output);
@@ -240,7 +240,7 @@ int starpu_perfmodel_print_all(struct starpu_perfmodel *model, char *arch, char
 			int comb;
 			for(comb = 0; comb < starpu_perfmodel_get_narch_combs(); comb++)
 			{
-				struct starpu_perfmodel_arch *arch_comb = _starpu_arch_comb_get(comb);
+				struct starpu_perfmodel_arch *arch_comb = starpu_perfmodel_arch_comb_fetch(comb);
 				if(arch_comb->ndevices == 1 && arch_comb->devices[0].type == STARPU_CUDA_WORKER)
 				{
 					perf_arch.devices[0].devid = arch_comb->devices[0].devid;

+ 3 - 3
tools/starpu_perfmodel_plot.c

@@ -1,6 +1,6 @@
 /* StarPU --- Runtime system for heterogeneous multicore architectures.
  *
- * Copyright (C) 2011-2014  Université de Bordeaux
+ * Copyright (C) 2011-2014, 2017  Université de Bordeaux
  * Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2017  CNRS
  * Copyright (C) 2011  Télécom-SudParis
  *
@@ -285,7 +285,7 @@ static void display_history_based_perf_models(FILE *gnuplot_file, struct starpu_
 			struct starpu_perfmodel_arch *arch;
 			int impl;
 
-			arch = _starpu_arch_comb_get(comb);
+			arch = starpu_perfmodel_arch_comb_fetch(comb);
 			for(impl = 0; impl < model->state->nimpls[comb]; impl++)
 			{
 				struct starpu_perfmodel_per_arch *arch_model = &model->state->per_arch[comb][impl];
@@ -382,7 +382,7 @@ static void display_all_perf_models(FILE *gnuplot_file, struct starpu_perfmodel
 			struct starpu_perfmodel_arch *arch;
 			int impl;
 
-			arch = _starpu_arch_comb_get(comb);
+			arch = starpu_perfmodel_arch_comb_fetch(comb);
 			for(impl = 0; impl < model->state->nimpls[comb]; impl++)
 			{
 				struct starpu_perfmodel_per_arch *archmodel = &model->state->per_arch[comb][impl];