Browse Source

follow up of the previous cleanup commit

Cédric Augonnet 16 years ago
parent
commit
e8fc456195

+ 0 - 2
src/datawizard/coherency.h

@@ -132,8 +132,6 @@ struct starpu_data_state_t {
 
 void display_msi_stats(void);
 
-//void release_data(struct starpu_data_state_t *state, uint32_t write_through_mask);
-
 __attribute__((warn_unused_result))
 int fetch_data_on_node(struct starpu_data_state_t *state, uint32_t requesting_node, uint8_t read, uint8_t write, unsigned is_prefetch);
 void release_data_on_node(struct starpu_data_state_t *state, uint32_t default_wb_mask, unsigned memory_node);

+ 6 - 6
src/datawizard/hierarchy.c

@@ -336,21 +336,21 @@ void starpu_advise_if_data_is_important(starpu_data_handle handle, unsigned is_i
 
 starpu_data_handle starpu_data_state_create(size_t interfacesize)
 {
-	struct starpu_data_state_t *state =
+	starpu_data_handle handle =
 		calloc(1, sizeof(struct starpu_data_state_t));
 
-	STARPU_ASSERT(state);
+	STARPU_ASSERT(handle);
 
-	state->interface_size = interfacesize;
+	handle->interface_size = interfacesize;
 
 	unsigned node;
 	for (node = 0; node < MAXNODES; node++)
 	{
-		state->interface[node] = calloc(1, interfacesize);
-		STARPU_ASSERT(state->interface[node]);
+		handle->interface[node] = calloc(1, interfacesize);
+		STARPU_ASSERT(handle->interface[node]);
 	}
 
-	return state;
+	return handle;
 }
 
 void starpu_data_create_children(starpu_data_handle handle,

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

@@ -27,10 +27,10 @@
  * BCSR : blocked CSR, we use blocks of size (r x c)
  */
 
-static int dummy_copy_ram_to_ram(struct starpu_data_state_t *state, uint32_t src_node, uint32_t dst_node);
+static int dummy_copy_ram_to_ram(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node);
 #ifdef USE_CUDA
-static int copy_ram_to_cublas(struct starpu_data_state_t *state, uint32_t src_node, uint32_t dst_node);
-static int copy_cublas_to_ram(struct starpu_data_state_t *state, uint32_t src_node, uint32_t dst_node);
+static int copy_ram_to_cublas(starpu_data_handle handle, uint32_t src_node, uint32_t dst_node);
+static int copy_cublas_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 = {
@@ -61,20 +61,20 @@ struct data_interface_ops_t interface_bcsr_ops = {
 	.footprint = footprint_bcsr_interface_crc32
 };
 
-void starpu_register_bcsr_data(struct starpu_data_state_t **handle, uint32_t home_node,
+void starpu_register_bcsr_data(starpu_data_handle *handleptr, uint32_t home_node,
 		uint32_t nnz, uint32_t nrow, uintptr_t nzval, uint32_t *colind, uint32_t *rowptr, uint32_t firstentry,  uint32_t r, uint32_t c, size_t elemsize)
 {
-	struct starpu_data_state_t *state =
+	starpu_data_handle handle =
 		starpu_data_state_create(sizeof(starpu_bcsr_interface_t));
 
-	STARPU_ASSERT(handle);
-	*handle = state;
+	STARPU_ASSERT(handleptr);
+	*handleptr = handle;
 
 	unsigned node;
 	for (node = 0; node < MAXNODES; node++)
 	{
 		starpu_bcsr_interface_t *local_interface =
-			starpu_data_get_interface_on_node(state, node);
+			starpu_data_get_interface_on_node(handle, node);
 
 		if (node == home_node) {
 			local_interface->nzval = nzval;
@@ -95,9 +95,9 @@ void starpu_register_bcsr_data(struct starpu_data_state_t **handle, uint32_t hom
 		local_interface->elemsize = elemsize;
 	}
 
-	state->ops = &interface_bcsr_ops;
+	handle->ops = &interface_bcsr_ops;
 
-	register_new_data(state, home_node, 0);
+	register_new_data(handle, home_node, 0);
 }
 
 static inline uint32_t footprint_bcsr_interface_generic(uint32_t (*hash_func)(uint32_t input, uint32_t hstate), starpu_data_handle handle, uint32_t hstate)

+ 1 - 1
src/datawizard/memalloc.c

@@ -315,7 +315,7 @@ static unsigned try_to_find_reusable_mem_chunk(unsigned node, starpu_data_handle
 		if (mc->footprint == footprint)
 		{
 
-			data_state *old_data;
+			starpu_data_handle old_data;
 			old_data = mc->data;
 
 			if (old_data->per_node[node].allocated &&

+ 3 - 3
src/drivers/gordon/driver_gordon.c

@@ -133,15 +133,15 @@ static void starpu_to_gordon_buffers(job_t j, struct gordon_ppu_job_s *gordon_jo
 				break;
 		}
 
-		struct starpu_data_state_t *state = task->buffers[buffer].handle;
+		starpu_data_handle handle = task->buffers[buffer].handle;
 
 		gordon_job->nalloc = 0;
 		gordon_job->nin = nin;
 		gordon_job->ninout = ninout;
 		gordon_job->nout = nout;
 
-		STARPU_ASSERT(state->ops->convert_to_gordon);
-		state->ops->convert_to_gordon(&state->interface[memory_node],
+		STARPU_ASSERT(handle->ops->convert_to_gordon);
+		handle->ops->convert_to_gordon(&handle->interface[memory_node],
 				&gordon_job->buffers[gordon_buffer],
 				&gordon_job->ss[gordon_buffer]);
 	}