Преглед на файлове

Rename starpu_drop_comments into _starpu_drop_comments and move it out of the
public headers.

Cédric Augonnet преди 15 години
родител
ревизия
0a062a6947
променени са 5 файла, в които са добавени 16 реда и са изтрити 16 реда
  1. 0 3
      include/starpu_util.h
  2. 3 0
      src/common/utils.h
  3. 8 8
      src/core/perfmodel/perfmodel_bus.c
  4. 4 4
      src/core/perfmodel/perfmodel_history.c
  5. 1 1
      src/util/file.c

+ 0 - 3
include/starpu_util.h

@@ -225,9 +225,6 @@ void starpu_create_sync_task(starpu_tag_t sync_tag, unsigned ndeps, starpu_tag_t
 cudaStream_t *starpu_cuda_get_local_stream(void);
 #endif
 
-/* If FILE is currently on a comment line, eat it.  */
-void starpu_drop_comments(FILE *f);
-
 #ifdef __cplusplus
 }
 #endif

+ 3 - 0
src/common/utils.h

@@ -26,6 +26,9 @@
 int _starpu_mkpath(const char *s, mode_t mode);
 int _starpu_check_mutex_deadlock(pthread_mutex_t *mutex);
 
+/* If FILE is currently on a comment line, eat it.  */
+void _starpu_drop_comments(FILE *f);
+
 #define PTHREAD_MUTEX_INIT(mutex, attr) { int ret = pthread_mutex_init((mutex), (attr)); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_mutex_init: %s\n", strerror(ret)); STARPU_ABORT(); }}
 #define PTHREAD_MUTEX_DESTROY(mutex) { int ret = pthread_mutex_destroy(mutex); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_mutex_destroy: %s\n", strerror(ret)); STARPU_ABORT(); }}
 #define PTHREAD_MUTEX_LOCK(mutex) { int ret = pthread_mutex_lock(mutex); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_mutex_lock : %s", strerror(ret)); STARPU_ABORT(); }}

+ 8 - 8
src/core/perfmodel/perfmodel_bus.c

@@ -490,7 +490,7 @@ static void load_bus_affinity_file_content(void)
 
 		int dummy;
 
-		starpu_drop_comments(f);
+		_starpu_drop_comments(f);
 		ret = fscanf(f, "%d\t", &dummy);
 		STARPU_ASSERT(ret == 1);
 
@@ -515,7 +515,7 @@ static void load_bus_affinity_file_content(void)
 
 		int dummy;
 
-		starpu_drop_comments(f);
+		_starpu_drop_comments(f);
 		ret = fscanf(f, "%d\t", &dummy);
 		STARPU_ASSERT(ret == 1);
 
@@ -655,7 +655,7 @@ static void load_bus_latency_file_content(void)
 
 	for (src = 0; src < STARPU_MAXNODES; src++)
 	{
-		starpu_drop_comments(f);
+		_starpu_drop_comments(f);
 		for (dst = 0; dst < STARPU_MAXNODES; dst++)
 		{
 			double latency;
@@ -779,7 +779,7 @@ static void load_bus_bandwidth_file_content(void)
 
 	for (src = 0; src < STARPU_MAXNODES; src++)
 	{
-		starpu_drop_comments(f);
+		_starpu_drop_comments(f);
 		for (dst = 0; dst < STARPU_MAXNODES; dst++)
 		{
 			double bandwidth;
@@ -918,16 +918,16 @@ static void check_bus_config_file()
                 // Loading configuration from file
                 f = fopen(path, "r");
                 STARPU_ASSERT(f);
-                starpu_drop_comments(f);
+                _starpu_drop_comments(f);
                 ret = fscanf(f, "%d\t", &read_cpus);
 		STARPU_ASSERT(ret == 1);
-                starpu_drop_comments(f);
+                _starpu_drop_comments(f);
 		ret = fscanf(f, "%d\t", &read_cuda);
 		STARPU_ASSERT(ret == 1);
-                starpu_drop_comments(f);
+                _starpu_drop_comments(f);
 		ret = fscanf(f, "%d\t", &read_opencl);
 		STARPU_ASSERT(ret == 1);
-                starpu_drop_comments(f);
+                _starpu_drop_comments(f);
                 fclose(f);
 
                 // Loading current configuration

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

@@ -61,7 +61,7 @@ static void scan_reg_model(FILE *f, struct starpu_regression_model_t *reg_model)
 {
 	int res;
 
-	starpu_drop_comments(f);
+	_starpu_drop_comments(f);
 
 	res = fscanf(f, "%le\t%le\t%le\t%le\t%le\t%le\t%u\n", &reg_model->sumlnx, &reg_model->sumlnx2, &reg_model->sumlny, &reg_model->sumlnxlny, &reg_model->alpha, &reg_model->beta, &reg_model->nsample);
 	STARPU_ASSERT(res == 7);
@@ -77,7 +77,7 @@ static void scan_history_entry(FILE *f, struct starpu_history_entry_t *entry)
 {
 	int res;
 
-	starpu_drop_comments(f);
+	_starpu_drop_comments(f);
 
 	res = fscanf(f, "%x\t%zu\t%le\t%le\t%le\t%le\t%u\n", &entry->footprint, &entry->size, &entry->mean, &entry->deviation, &entry->sum, &entry->sum2, &entry->nsample);
 	STARPU_ASSERT(res == 7);
@@ -87,14 +87,14 @@ static void parse_per_arch_model_file(FILE *f, struct starpu_per_arch_perfmodel_
 {
 	unsigned nentries;
 
-	starpu_drop_comments(f);
+	_starpu_drop_comments(f);
 
 	int res = fscanf(f, "%u\n", &nentries);
 	STARPU_ASSERT(res == 1);
 
 	scan_reg_model(f, &per_arch_model->regression);
 
-	starpu_drop_comments(f);
+	_starpu_drop_comments(f);
 
 	res = fscanf(f, "%le\t%le\t%le\n", 
 		&per_arch_model->regression.a,

+ 1 - 1
src/util/file.c

@@ -16,7 +16,7 @@
 
 #include <starpu.h>
 
-void starpu_drop_comments(FILE *f)
+void _starpu_drop_comments(FILE *f)
 {
 	while(1) {
 		int c = getc(f);