Ver código fonte

Prefixing in src/datawizard/copy_driver.h

find . -type f -not -name "*svn*"|xargs sed -i s/"\bdata_request_s\b"/starpu_data_request_s/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bcopy_data_methods_s\b"/starpu_copy_data_methods_s/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bdriver_copy_data_1_to_1\b"/starpu_driver_copy_data_1_to_1/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bdriver_test_request_completion\b"/starpu_driver_test_request_completion/g
find . -type f -not -name "*svn*"|xargs sed -i s/"\bdriver_wait_request_completion\b"/starpu_driver_wait_request_completion/g
Nathalie Furmento 15 anos atrás
pai
commit
d26bb1ca08

+ 1 - 1
src/datawizard/coherency.h

@@ -68,7 +68,7 @@ typedef struct starpu_local_data_state_t {
 	   use this hint can simply ignore it.
 	 */
 	uint8_t requested;
-	struct data_request_s *request;
+	struct starpu_data_request_s *request;
 } starpu_local_data_state;
 
 struct starpu_data_requester_list_s;

+ 6 - 6
src/datawizard/copy-driver.c

@@ -73,13 +73,13 @@ void starpu_wake_all_blocked_workers(void)
 static unsigned communication_cnt = 0;
 #endif
 
-static int copy_data_1_to_1_generic(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node, struct data_request_s *req __attribute__((unused)))
+static int copy_data_1_to_1_generic(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node, struct starpu_data_request_s *req __attribute__((unused)))
 {
 	int ret = 0;
 
 	//ret = handle->ops->copy_data_1_to_1(handle, src_node, dst_node);
 
-	const struct copy_data_methods_s *copy_methods = handle->ops->copy_methods;
+	const struct starpu_copy_data_methods_s *copy_methods = handle->ops->copy_methods;
 
 	node_kind src_kind = get_node_kind(src_node);
 	node_kind dst_kind = get_node_kind(dst_node);
@@ -191,8 +191,8 @@ cudaStream_t *stream;
 	return ret;
 }
 
-int __attribute__((warn_unused_result)) driver_copy_data_1_to_1(starpu_data_handle handle, uint32_t src_node, 
-		uint32_t dst_node, unsigned donotread, struct data_request_s *req, unsigned may_alloc)
+int __attribute__((warn_unused_result)) starpu_driver_copy_data_1_to_1(starpu_data_handle handle, uint32_t src_node, 
+		uint32_t dst_node, unsigned donotread, struct starpu_data_request_s *req, unsigned may_alloc)
 {
 	if (!donotread)
 	{
@@ -250,7 +250,7 @@ nomem:
 	return ENOMEM;
 }
 
-void driver_wait_request_completion(starpu_async_channel *async_channel __attribute__ ((unused)),
+void starpu_driver_wait_request_completion(starpu_async_channel *async_channel __attribute__ ((unused)),
 					unsigned handling_node)
 {
 	node_kind kind = get_node_kind(handling_node);
@@ -280,7 +280,7 @@ void driver_wait_request_completion(starpu_async_channel *async_channel __attrib
 	}
 }
 
-unsigned driver_test_request_completion(starpu_async_channel *async_channel __attribute__ ((unused)),
+unsigned starpu_driver_test_request_completion(starpu_async_channel *async_channel __attribute__ ((unused)),
 					unsigned handling_node)
 {
 	node_kind kind = get_node_kind(handling_node);

+ 6 - 6
src/datawizard/copy-driver.h

@@ -28,7 +28,7 @@
 #include <cublas.h>
 #endif
 
-struct data_request_s;
+struct starpu_data_request_s;
 
 /* this is a structure that can be queried to see whether an asynchronous
  * transfer has terminated or not */
@@ -39,7 +39,7 @@ typedef union {
 #endif
 } starpu_async_channel;
 
-struct copy_data_methods_s {
+struct starpu_copy_data_methods_s {
 	/* src type is ram */
 	int (*ram_to_ram)(starpu_data_handle handle, uint32_t src, uint32_t dst);
 	int (*ram_to_cuda)(starpu_data_handle handle, uint32_t src, uint32_t dst);
@@ -69,9 +69,9 @@ struct copy_data_methods_s {
 void _starpu_wake_all_blocked_workers_on_node(unsigned nodeid);
 
 __attribute__((warn_unused_result))
-int driver_copy_data_1_to_1(starpu_data_handle handle, uint32_t node, 
-		uint32_t requesting_node, unsigned donotread, struct data_request_s *req, unsigned may_allloc);
+int starpu_driver_copy_data_1_to_1(starpu_data_handle handle, uint32_t node, 
+		uint32_t requesting_node, unsigned donotread, struct starpu_data_request_s *req, unsigned may_allloc);
 
-unsigned driver_test_request_completion(starpu_async_channel *async_channel, unsigned handling_node);
-void driver_wait_request_completion(starpu_async_channel *async_channel, unsigned handling_node);
+unsigned starpu_driver_test_request_completion(starpu_async_channel *async_channel, unsigned handling_node);
+void starpu_driver_wait_request_completion(starpu_async_channel *async_channel, unsigned handling_node);
 #endif // __COPY_DRIVER_H__

+ 3 - 3
src/datawizard/data_request.c

@@ -262,7 +262,7 @@ static int handle_data_request(data_request_t r, unsigned may_alloc)
 
 	/* perform the transfer */
 	/* the header of the data must be locked by the worker that submitted the request */
-	r->retval = driver_copy_data_1_to_1(handle, r->src_node, r->dst_node, !r->read, r, may_alloc);
+	r->retval = starpu_driver_copy_data_1_to_1(handle, r->src_node, r->dst_node, !r->read, r, may_alloc);
 
 	if (r->retval == ENOMEM)
 	{
@@ -371,11 +371,11 @@ static void _handle_pending_node_data_requests(uint32_t src_node, unsigned force
 		/* wait until the transfer is terminated */
 		if (force)
 		{
-			driver_wait_request_completion(&r->async_channel, src_node);
+			starpu_driver_wait_request_completion(&r->async_channel, src_node);
 			handle_data_request_completion(r);
 		}
 		else {
-			if (driver_test_request_completion(&r->async_channel, src_node))
+			if (starpu_driver_test_request_completion(&r->async_channel, src_node))
 			{
 				
 				handle_data_request_completion(r);

+ 1 - 1
src/datawizard/data_request.h

@@ -48,7 +48,7 @@ LIST_TYPE(data_request,
 	int retval;
 
 	/* in case we have a chain of request (eg. for nvidia multi-GPU) */
-	struct data_request_s *next_req[STARPU_MAXNODES];
+	struct starpu_data_request_s *next_req[STARPU_MAXNODES];
 	/* who should perform the next request ? */
 	unsigned next_req_count;
 

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

@@ -32,7 +32,7 @@ static int copy_ram_to_cuda(starpu_data_handle handle, uint32_t src_node, uint32
 static int copy_cuda_to_ram(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node);
 #endif
 
-static const struct copy_data_methods_s bcsr_copy_data_methods_s = {
+static const struct starpu_copy_data_methods_s bcsr_copy_data_methods_s = {
 	.ram_to_ram = dummy_copy_ram_to_ram,
 	.ram_to_spu = NULL,
 #ifdef STARPU_USE_CUDA

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

@@ -35,7 +35,7 @@ static int copy_ram_to_cuda_async(starpu_data_handle handle, uint32_t src_node,
 static int copy_cuda_to_ram_async(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node, cudaStream_t *stream);
 #endif
 
-static const struct copy_data_methods_s blas_copy_data_methods_s = {
+static const struct starpu_copy_data_methods_s blas_copy_data_methods_s = {
 	.ram_to_ram = dummy_copy_ram_to_ram,
 	.ram_to_spu = NULL,
 #ifdef STARPU_USE_CUDA

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

@@ -30,7 +30,7 @@ static int copy_ram_to_cuda_async(starpu_data_handle handle, uint32_t src_node,
 static int copy_cuda_to_ram_async(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node, cudaStream_t *stream);
 #endif
 
-static const struct copy_data_methods_s block_copy_data_methods_s = {
+static const struct starpu_copy_data_methods_s block_copy_data_methods_s = {
 	.ram_to_ram = dummy_copy_ram_to_ram,
 	.ram_to_spu = NULL,
 #ifdef STARPU_USE_CUDA

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

@@ -29,7 +29,7 @@ static int copy_ram_to_cuda(starpu_data_handle handle, uint32_t src_node, uint32
 static int copy_cuda_to_ram(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node);
 #endif
 
-static const struct copy_data_methods_s csr_copy_data_methods_s = {
+static const struct starpu_copy_data_methods_s csr_copy_data_methods_s = {
 	.ram_to_ram = dummy_copy_ram_to_ram,
 	.ram_to_spu = NULL,
 #ifdef STARPU_USE_CUDA

+ 1 - 1
src/datawizard/interfaces/data_interface.h

@@ -30,7 +30,7 @@ struct starpu_data_interface_ops_t {
 					uint32_t home_node, void *interface);
 	size_t (*allocate_data_on_node)(starpu_data_handle handle, uint32_t node);
 	void (*liberate_data_on_node)(void *interface, uint32_t node);
-	const struct copy_data_methods_s *copy_methods;
+	const struct starpu_copy_data_methods_s *copy_methods;
 	size_t (*get_size)(starpu_data_handle handle);
 	uint32_t (*footprint)(starpu_data_handle handle);
 	void (*display)(starpu_data_handle handle, FILE *f);

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

@@ -34,7 +34,7 @@ static int copy_ram_to_cuda_async(starpu_data_handle handle, uint32_t src_node,
 static int copy_cuda_to_ram_async(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node, cudaStream_t *stream);
 #endif
 
-static const struct copy_data_methods_s vector_copy_data_methods_s = {
+static const struct starpu_copy_data_methods_s vector_copy_data_methods_s = {
 	.ram_to_ram = dummy_copy_ram_to_ram,
 	.ram_to_spu = NULL,
 #ifdef STARPU_USE_CUDA

+ 1 - 1
src/datawizard/memalloc.c

@@ -144,7 +144,7 @@ static void transfer_subtree_to_node(starpu_data_handle handle, unsigned src_nod
 			handle->per_node[src_node].refcnt++;
 			handle->per_node[dst_node].refcnt++;
 
-			ret = driver_copy_data_1_to_1(handle, src_node, dst_node, 0, NULL, 1);
+			ret = starpu_driver_copy_data_1_to_1(handle, src_node, dst_node, 0, NULL, 1);
 			STARPU_ASSERT(ret == 0);
 
 			handle->per_node[src_node].refcnt--;