Browse Source

Rename _starpu_get_job_model_name and _starpu_get_cl_model_name according to naming convention

Samuel Thibault 12 years ago
parent
commit
24507c2d1c
3 changed files with 15 additions and 15 deletions
  1. 3 3
      src/common/fxt.h
  2. 9 9
      src/profiling/bound.c
  3. 3 3
      src/util/misc.c

+ 3 - 3
src/common/fxt.h

@@ -202,7 +202,7 @@ do {									\
 
 #define _STARPU_TRACE_START_CODELET_BODY(job)				\
 do {									\
-        const char *model_name = _starpu_get_job_model_name((job));         \
+        const char *model_name = _starpu_job_get_model_name((job));         \
 	if (model_name)                                                 \
 	{								\
 		/* we include the symbol name */			\
@@ -262,7 +262,7 @@ do {									\
 #define _STARPU_TRACE_TASK_DONE(job)						\
 do {										\
 	unsigned exclude_from_dag = (job)->exclude_from_dag;			\
-        const char *model_name = _starpu_get_job_model_name((job));                       \
+        const char *model_name = _starpu_job_get_model_name((job));                       \
 	if (model_name)					                        \
 	{									\
 		_STARPU_FUT_DO_PROBE4STR(_STARPU_FUT_TASK_DONE, (job)->job_id, _starpu_gettid(), (long unsigned)exclude_from_dag, 1, model_name);\
@@ -275,7 +275,7 @@ do {										\
 #define _STARPU_TRACE_TAG_DONE(tag)						\
 do {										\
         struct _starpu_job *job = (tag)->job;                                  \
-        const char *model_name = _starpu_get_job_model_name((job));                       \
+        const char *model_name = _starpu_job_get_model_name((job));                       \
 	if (model_name)                                                         \
 	{									\
           _STARPU_FUT_DO_PROBE3STR(_STARPU_FUT_TAG_DONE, (tag)->id, _starpu_gettid(), 1, model_name); \

+ 9 - 9
src/profiling/bound.c

@@ -401,7 +401,7 @@ void starpu_bound_print_dot(FILE *output)
 	fprintf(output, "strict digraph bounddeps {\n");
 	for (t = tasks; t; t = t->next)
 	{
-		fprintf(output, "\"t%lu\" [label=\"%lu: %s\"]\n", t->id, t->id, _starpu_get_cl_model_name(t->cl));
+		fprintf(output, "\"t%lu\" [label=\"%lu: %s\"]\n", t->id, t->id, _starpu_codelet_get_model_name(t->cl));
 		for (i = 0; i < t->depsn; i++)
 			fprintf(output, "\"t%lu\" -> \"t%lu\"\n", t->deps[i]->id, t->id);
 	}
@@ -437,7 +437,7 @@ void starpu_bound_print_lp(FILE *output)
 			if (t1->cl->model->type != STARPU_HISTORY_BASED &&
 			    t1->cl->model->type != STARPU_NL_REGRESSION_BASED)
 				/* TODO: */
-				fprintf(stderr, "Warning: task %s uses a perf model which is neither history nor non-linear regression-based, support for such model is not implemented yet, system will not be solvable.\n", _starpu_get_cl_model_name(t1->cl));
+				fprintf(stderr, "Warning: task %s uses a perf model which is neither history nor non-linear regression-based, support for such model is not implemented yet, system will not be solvable.\n", _starpu_codelet_get_model_name(t1->cl));
 
 			struct _starpu_job j =
 			{
@@ -484,7 +484,7 @@ void starpu_bound_print_lp(FILE *output)
 		fprintf(output, "/* According to where the task is indeed executed */\n");
 		for (t1 = tasks; t1; t1 = t1->next)
 		{
-			fprintf(output, "/* %s %x */\tc%lu = s%lu", _starpu_get_cl_model_name(t1->cl), (unsigned) t1->footprint, t1->id, t1->id);
+			fprintf(output, "/* %s %x */\tc%lu = s%lu", _starpu_codelet_get_model_name(t1->cl), (unsigned) t1->footprint, t1->id, t1->id);
 			for (w = 0; w < nw; w++)
 			{
 				enum starpu_perf_archtype arch = starpu_worker_get_perf_archtype(w);
@@ -680,10 +680,10 @@ void starpu_bound_print_lp(FILE *output)
 			for (t = 0, tp = task_pools; tp; t++, tp = tp->next)
 			{
 				int got_one = 0;
-				fprintf(output, "/* task %s key %x */\n0", _starpu_get_cl_model_name(tp->cl), (unsigned) tp->footprint);
+				fprintf(output, "/* task %s key %x */\n0", _starpu_codelet_get_model_name(tp->cl), (unsigned) tp->footprint);
 				for (w = 0; w < nw; w++) {
 					if (isnan(times[w*nt+t]))
-						fprintf(stderr, "Warning: task %s has no performance measurement for worker %d.\n", _starpu_get_cl_model_name(tp->cl), w);
+						fprintf(stderr, "Warning: task %s has no performance measurement for worker %d.\n", _starpu_codelet_get_model_name(tp->cl), w);
 					else {
 						got_one = 1;
 						fprintf(output, "\t+w%dt%dn", w, t);
@@ -691,7 +691,7 @@ void starpu_bound_print_lp(FILE *output)
 				}
 				fprintf(output, " = %lu;\n", tp->n);
 				if (!got_one)
-					fprintf(stderr, "Warning: task %s has no performance measurement for any worker, system will not be solvable!\n", _starpu_get_cl_model_name(tp->cl));
+					fprintf(stderr, "Warning: task %s has no performance measurement for any worker, system will not be solvable!\n", _starpu_codelet_get_model_name(tp->cl));
 				/* Show actual values */
 				fprintf(output, "/*");
 				for (w = 0; w < nw; w++)
@@ -764,7 +764,7 @@ void starpu_bound_print_mps(FILE *output)
 		fprintf(output, "\n* And we have to have computed exactly all tasks\n");
 		for (t = 0, tp = task_pools; tp; t++, tp = tp->next)
 		{
-			fprintf(output, "* task %s key %x\n", _starpu_get_cl_model_name(tp->cl), (unsigned) tp->footprint);
+			fprintf(output, "* task %s key %x\n", _starpu_codelet_get_model_name(tp->cl), (unsigned) tp->footprint);
 			fprintf(output, " E  T%d\n", t);
 		}
 
@@ -895,7 +895,7 @@ static glp_prob *_starpu_bound_glp_resolve(int integer)
 		{
 			char name[32], title[64];
 			starpu_worker_get_name(w, name, sizeof(name));
-			snprintf(title, sizeof(title), "task %s key %x", _starpu_get_cl_model_name(tp->cl), (unsigned) tp->footprint);
+			snprintf(title, sizeof(title), "task %s key %x", _starpu_codelet_get_model_name(tp->cl), (unsigned) tp->footprint);
 			glp_set_row_name(lp, nw+t+1, title);
 			for (w = 0; w < nw; w++)
 			{
@@ -963,7 +963,7 @@ void starpu_bound_print(FILE *output, int integer __attribute__ ((unused)))
 
 		for (t = 0, tp = task_pools; tp; t++, tp = tp->next)
 		{
-			fprintf(output, "%s key %x\n", _starpu_get_cl_model_name(tp->cl), (unsigned) tp->footprint);
+			fprintf(output, "%s key %x\n", _starpu_codelet_get_model_name(tp->cl), (unsigned) tp->footprint);
 			for (w = 0; w < nw; w++)
 				if (integer)
 					fprintf(output, "\tw%dt%dn %f", w, t, glp_mip_col_val(lp, colnum(w, t)));

+ 3 - 3
src/util/misc.c

@@ -18,7 +18,7 @@
 #include <common/utils.h>
 #include <core/jobs.h>
 
-const char *_starpu_get_cl_model_name(struct starpu_codelet *cl)
+const char *_starpu_codelet_get_model_name(struct starpu_codelet *cl)
 {
 	if (!cl)
 		return NULL;
@@ -29,7 +29,7 @@ const char *_starpu_get_cl_model_name(struct starpu_codelet *cl)
 		return cl->name;
 }
 
-const char *_starpu_get_job_model_name(struct _starpu_job *j)
+const char *_starpu_job_get_model_name(struct _starpu_job *j)
 {
 	const char *ret = NULL;
 
@@ -38,7 +38,7 @@ const char *_starpu_get_job_model_name(struct _starpu_job *j)
 
 	struct starpu_task *task = j->task;
 	if (task)
-		ret = _starpu_get_cl_model_name(task->cl);
+		ret = _starpu_codelet_get_model_name(task->cl);
 
 #ifdef STARPU_USE_FXT
 	if (!ret)