瀏覽代碼

perfmodel: rename (and turn private) struct starpu_model_list to struct _starpu_perfmodel_list

Nathalie Furmento 12 年之前
父節點
當前提交
93e216dc6e
共有 4 個文件被更改,包括 11 次插入10 次删除
  1. 0 6
      include/starpu_perfmodel.h
  2. 6 0
      src/core/perfmodel/perfmodel.h
  3. 4 4
      src/core/perfmodel/perfmodel_history.c
  4. 1 0
      tools/dev/rename.sed

+ 0 - 6
include/starpu_perfmodel.h

@@ -114,12 +114,6 @@ struct starpu_history_list
 	struct starpu_history_entry *entry;
 };
 
-struct starpu_model_list
-{
-	struct starpu_model_list *next;
-	struct starpu_perfmodel *model;
-};
-
 struct starpu_regression_model
 {
 	/* sum of ln(measured) */

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

@@ -26,6 +26,12 @@
 #include <pthread.h>
 #include <stdio.h>
 
+struct _starpu_perfmodel_list
+{
+	struct _starpu_perfmodel_list *next;
+	struct starpu_perfmodel *model;
+};
+
 struct starpu_buffer_descr;
 struct _starpu_job;
 enum starpu_perf_archtype;

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

@@ -51,7 +51,7 @@ struct starpu_history_table
 	((reg_model)->minx < (9*(reg_model)->maxx)/10 && (reg_model)->nsample >= _STARPU_CALIBRATION_MINIMUM)
 
 static pthread_rwlock_t registered_models_rwlock;
-static struct starpu_model_list *registered_models = NULL;
+static struct _starpu_perfmodel_list *registered_models = NULL;
 
 /*
  * History based model
@@ -603,7 +603,7 @@ int _starpu_register_model(struct starpu_perfmodel *model)
 	}
 
 	/* add the model to a linked list */
-	struct starpu_model_list *node = (struct starpu_model_list *) malloc(sizeof(struct starpu_model_list));
+	struct _starpu_perfmodel_list *node = (struct _starpu_perfmodel_list *) malloc(sizeof(struct _starpu_perfmodel_list));
 
 	node->model = model;
 	//model->debug_modelid = debug_modelid++;
@@ -673,7 +673,7 @@ static void _starpu_dump_registered_models(void)
 {
 	_STARPU_PTHREAD_RWLOCK_WRLOCK(&registered_models_rwlock);
 
-	struct starpu_model_list *node;
+	struct _starpu_perfmodel_list *node;
 	node = registered_models;
 
 	_STARPU_DEBUG("DUMP MODELS !\n");
@@ -701,7 +701,7 @@ void _starpu_deinitialize_registered_performance_models(void)
 
 	_STARPU_PTHREAD_RWLOCK_WRLOCK(&registered_models_rwlock);
 
-	struct starpu_model_list *node, *pnode;
+	struct _starpu_perfmodel_list *node, *pnode;
 	node = registered_models;
 
 	_STARPU_DEBUG("FREE MODELS !\n");

+ 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_model_list\b/struct _starpu_perfmodel_list/g
 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