Bläddra i källkod

Prefixing of src/common/hash.h

find . -type f -not -name "*svn*"|xargs sed -i s/"\bcrc32_be\b"/_starpu_crc32_be/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bcrc32_string\b"/_starpu_crc32_string/g
Nathalie Furmento 15 år sedan
förälder
incheckning
7408eae929

+ 2 - 2
src/common/hash.c

@@ -32,7 +32,7 @@ static inline uint32_t __attribute__ ((pure)) crc32_be_8(uint8_t inputbyte, uint
 	return crc;
 }
 
-uint32_t crc32_be(uint32_t input, uint32_t inputcrc)
+uint32_t _starpu_crc32_be(uint32_t input, uint32_t inputcrc)
 {
 	uint8_t *p = (uint8_t *)&input;
 
@@ -46,7 +46,7 @@ uint32_t crc32_be(uint32_t input, uint32_t inputcrc)
 	return crc;
 }
 
-uint32_t crc32_string(char *str, uint32_t inputcrc)
+uint32_t _starpu_crc32_string(char *str, uint32_t inputcrc)
 {
 	uint32_t hash = inputcrc;
 

+ 2 - 2
src/common/hash.h

@@ -19,7 +19,7 @@
 
 #include <stdint.h>
 
-uint32_t crc32_be(uint32_t input, uint32_t inputcrc);
-uint32_t crc32_string(char *str, uint32_t inputcrc);
+uint32_t _starpu_crc32_be(uint32_t input, uint32_t inputcrc);
+uint32_t _starpu_crc32_string(char *str, uint32_t inputcrc);
 
 #endif // __HASH_H__

+ 2 - 2
src/datawizard/footprint.c

@@ -33,7 +33,7 @@ void _starpu_compute_buffers_footprint(starpu_job_t j)
 
 		uint32_t handle_footprint = handle->ops->footprint(handle);
 
-		footprint = crc32_be(handle_footprint, footprint);
+		footprint = _starpu_crc32_be(handle_footprint, footprint);
 	}
 
 	j->footprint = footprint;
@@ -46,5 +46,5 @@ inline uint32_t _starpu_compute_data_footprint(starpu_data_handle handle)
 
 	uint32_t handle_footprint = handle->ops->footprint(handle);
 
-	return crc32_be(handle_footprint, interfaceid);
+	return _starpu_crc32_be(handle_footprint, interfaceid);
 }

+ 3 - 3
src/datawizard/interfaces/bcsr_interface.c

@@ -117,9 +117,9 @@ static uint32_t footprint_bcsr_interface_crc32(starpu_data_handle handle)
 {
 	uint32_t hash;
 
-	hash = crc32_be(starpu_get_bcsr_nnz(handle), 0);
-	hash = crc32_be(starpu_get_bcsr_c(handle), hash);
-	hash = crc32_be(starpu_get_bcsr_r(handle), hash);
+	hash = _starpu_crc32_be(starpu_get_bcsr_nnz(handle), 0);
+	hash = _starpu_crc32_be(starpu_get_bcsr_c(handle), hash);
+	hash = _starpu_crc32_be(starpu_get_bcsr_r(handle), hash);
 
 	return hash;
 }

+ 1 - 1
src/datawizard/interfaces/blas_interface.c

@@ -137,7 +137,7 @@ void starpu_register_blas_data(starpu_data_handle *handleptr, uint32_t home_node
 
 static uint32_t footprint_blas_interface_crc32(starpu_data_handle handle)
 {
-	return crc32_be(starpu_get_blas_nx(handle), starpu_get_blas_ny(handle));
+	return _starpu_crc32_be(starpu_get_blas_nx(handle), starpu_get_blas_ny(handle));
 }
 
 static void display_blas_interface(starpu_data_handle handle, FILE *f)

+ 3 - 3
src/datawizard/interfaces/block_interface.c

@@ -132,9 +132,9 @@ static uint32_t footprint_block_interface_crc32(starpu_data_handle handle)
 {
 	uint32_t hash;
 
-	hash = crc32_be(starpu_get_block_nx(handle), 0);
-	hash = crc32_be(starpu_get_block_ny(handle), hash);
-	hash = crc32_be(starpu_get_block_nz(handle), hash);
+	hash = _starpu_crc32_be(starpu_get_block_nx(handle), 0);
+	hash = _starpu_crc32_be(starpu_get_block_ny(handle), hash);
+	hash = _starpu_crc32_be(starpu_get_block_nz(handle), hash);
 
 	return hash;
 }

+ 1 - 1
src/datawizard/interfaces/csr_interface.c

@@ -108,7 +108,7 @@ void starpu_register_csr_data(starpu_data_handle *handleptr, uint32_t home_node,
 
 static uint32_t footprint_csr_interface_crc32(starpu_data_handle handle)
 {
-	return crc32_be(starpu_get_csr_nnz(handle), 0);
+	return _starpu_crc32_be(starpu_get_csr_nnz(handle), 0);
 }
 
 /* offer an access to the data parameters */

+ 1 - 1
src/datawizard/interfaces/vector_interface.c

@@ -125,7 +125,7 @@ void starpu_register_vector_data(starpu_data_handle *handleptr, uint32_t home_no
 
 static uint32_t footprint_vector_interface_crc32(starpu_data_handle handle)
 {
-	return crc32_be(starpu_get_vector_nx(handle), 0);
+	return _starpu_crc32_be(starpu_get_vector_nx(handle), 0);
 }
 
 static void display_vector_interface(starpu_data_handle handle, FILE *f)

+ 6 - 6
tools/fxt-tool-common.c

@@ -48,22 +48,22 @@ const char *get_worker_color(int workerid)
 unsigned get_colour_symbol_red(char *name)
 {
 	/* choose some colour ... that's disguting yes */
-	uint32_t hash_symbol = crc32_string(name, 0);
-	return (unsigned)crc32_string("red", hash_symbol) % 1024;
+	uint32_t hash_symbol = _starpu_crc32_string(name, 0);
+	return (unsigned)_starpu_crc32_string("red", hash_symbol) % 1024;
 }
 
 unsigned get_colour_symbol_green(char *name)
 {
 	/* choose some colour ... that's disguting yes */
-	uint32_t hash_symbol = crc32_string(name, 0);
-	return (unsigned)crc32_string("green", hash_symbol) % 1024;
+	uint32_t hash_symbol = _starpu_crc32_string(name, 0);
+	return (unsigned)_starpu_crc32_string("green", hash_symbol) % 1024;
 }
 
 unsigned get_colour_symbol_blue(char *name)
 {
 	/* choose some colour ... that's disguting yes */
-	uint32_t hash_symbol = crc32_string(name, 0);
-	return (unsigned)crc32_string("blue", hash_symbol) % 1024;
+	uint32_t hash_symbol = _starpu_crc32_string(name, 0);
+	return (unsigned)_starpu_crc32_string("blue", hash_symbol) % 1024;
 }