瀏覽代碼

rename internal type starpu_data_state_t to _starpu_data_state

Nathalie Furmento 13 年之前
父節點
當前提交
5b9b08f1dc

+ 2 - 2
include/starpu_data.h

@@ -22,8 +22,8 @@
 
 #include <starpu_config.h>
 
-struct starpu_data_state_t;
-typedef struct starpu_data_state_t * starpu_data_handle;
+struct _starpu_data_state;
+typedef struct _starpu_data_state* starpu_data_handle;
 
 #include <starpu_data_interfaces.h>
 #include <starpu_data_filters.h>

+ 9 - 9
src/datawizard/coherency.h

@@ -94,7 +94,7 @@ struct starpu_task_wrapper_list {
 	struct starpu_task_wrapper_list *next;
 };
 
-struct starpu_data_state_t {
+struct _starpu_data_state {
 	struct starpu_data_requester_list_s *req_list;
 	/* the number of requests currently in the scheduling engine (not in
 	 * the req_list anymore), i.e. the number of holders of the
@@ -115,12 +115,12 @@ struct starpu_data_state_t {
 	pthread_cond_t busy_cond;
 
 	/* In case we user filters, the handle may describe a sub-data */
-	struct starpu_data_state_t *root_handle; /* root of the tree */
-	struct starpu_data_state_t *father_handle; /* father of the node, NULL if the current node is the root */
+	struct _starpu_data_state *root_handle; /* root of the tree */
+	struct _starpu_data_state *father_handle; /* father of the node, NULL if the current node is the root */
 	unsigned sibling_index; /* indicate which child this node is from the father's perpsective (if any) */
 	unsigned depth; /* what's the depth of the tree ? */
 
-	struct starpu_data_state_t *children;
+	struct _starpu_data_state *children;
 	unsigned nchildren;
 
 	/* describe the state of the data in term of coherency */
@@ -219,18 +219,18 @@ void _starpu_display_msi_stats(void);
 
 /* This does not take a reference on the handle, the caller has to do it,
  * e.g. through _starpu_attempt_to_submit_data_request_from_apps() */
-int _starpu_fetch_data_on_node(struct starpu_data_state_t *state, struct starpu_data_replicate_s *replicate,
+int _starpu_fetch_data_on_node(struct _starpu_data_state *state, struct starpu_data_replicate_s *replicate,
 				enum starpu_access_mode mode, unsigned is_prefetch,
 				void (*callback_func)(void *), void *callback_arg);
 /* This releases a reference on the handle */
-void _starpu_release_data_on_node(struct starpu_data_state_t *state, uint32_t default_wt_mask,
+void _starpu_release_data_on_node(struct _starpu_data_state *state, uint32_t default_wt_mask,
 				struct starpu_data_replicate_s *replicate);
 
 void _starpu_update_data_state(starpu_data_handle handle,
 				struct starpu_data_replicate_s *requesting_replicate,
 				enum starpu_access_mode mode);
 
-uint32_t _starpu_get_data_refcnt(struct starpu_data_state_t *state, uint32_t node);
+uint32_t _starpu_get_data_refcnt(struct _starpu_data_state *state, uint32_t node);
 
 size_t _starpu_data_get_size(starpu_data_handle handle);
 
@@ -241,11 +241,11 @@ void _starpu_push_task_output(struct starpu_task *task, uint32_t mask);
 __attribute__((warn_unused_result))
 int _starpu_fetch_task_input(struct starpu_task *task, uint32_t mask);
 
-unsigned _starpu_is_data_present_or_requested(struct starpu_data_state_t *state, uint32_t node);
+unsigned _starpu_is_data_present_or_requested(struct _starpu_data_state *state, uint32_t node);
 unsigned starpu_data_test_if_allocated_on_node(starpu_data_handle handle, uint32_t memory_node);
 
 
-uint32_t _starpu_select_src_node(struct starpu_data_state_t *state, unsigned destination);
+uint32_t _starpu_select_src_node(struct _starpu_data_state *state, unsigned destination);
 
 starpu_data_request_t create_request_to_fetch_data(starpu_data_handle handle,
 				struct starpu_data_replicate_s *dst_replicate,

+ 2 - 2
src/datawizard/filters.c

@@ -256,7 +256,7 @@ void starpu_data_unpartition(starpu_data_handle root_handle, uint32_t gathering_
 	/* first take all the children lock (in order !) */
 	for (child = 0; child < root_handle->nchildren; child++)
 	{
-		struct starpu_data_state_t *child_handle = &root_handle->children[child];
+		struct _starpu_data_state *child_handle = &root_handle->children[child];
 
 		/* make sure the intermediate children is unpartitionned as well */
 		if (child_handle->nchildren > 0)
@@ -346,7 +346,7 @@ void starpu_data_unpartition(starpu_data_handle root_handle, uint32_t gathering_
 /* each child may have his own interface type */
 static void starpu_data_create_children(starpu_data_handle handle, unsigned nchildren, struct starpu_data_filter *f)
 {
-	handle->children = (struct starpu_data_state_t *) calloc(nchildren, sizeof(struct starpu_data_state_t));
+	handle->children = (struct _starpu_data_state *) calloc(nchildren, sizeof(struct _starpu_data_state));
 	STARPU_ASSERT(handle->children);
 
 	unsigned node;

+ 1 - 2
src/datawizard/interfaces/data_interface.c

@@ -218,8 +218,7 @@ static void _starpu_register_new_data(starpu_data_handle handle,
 
 static starpu_data_handle _starpu_data_handle_allocate(struct starpu_data_interface_ops *interface_ops)
 {
-	starpu_data_handle handle = (starpu_data_handle)
-		calloc(1, sizeof(struct starpu_data_state_t));
+	starpu_data_handle handle = (starpu_data_handle) calloc(1, sizeof(struct _starpu_data_state));
 
 	STARPU_ASSERT(handle);
 

+ 1 - 1
src/datawizard/reduction.c

@@ -30,7 +30,7 @@ void starpu_data_set_reduction_methods(starpu_data_handle handle,
 	for (child = 0; child < handle->nchildren; child++)
 	{
 		/* make sure that the flags are applied to the children as well */
-		struct starpu_data_state_t *child_handle = &handle->children[child];
+		struct _starpu_data_state *child_handle = &handle->children[child];
 		if (child_handle->nchildren > 0)
 			starpu_data_set_reduction_methods(child_handle, redux_cl, init_cl);
 	}

+ 4 - 4
src/datawizard/sort_data_handles.c

@@ -26,10 +26,10 @@
  * them in order, so that we need a total order over data. We must also not
  * lock a child before its parent. */
 
-static void find_data_path(struct starpu_data_state_t *data, unsigned path[])
+static void find_data_path(struct _starpu_data_state *data, unsigned path[])
 {
 	unsigned depth = data->depth;
-	struct starpu_data_state_t *current = data;
+	struct _starpu_data_state *current = data;
 
 	/* Compute the path from the root to the data */
 	unsigned level; /* level is the distance between the node and the current node */
@@ -64,8 +64,8 @@ static int _compar_data_paths(const unsigned pathA[], unsigned depthA,
 
 /* A comparision function between two handles makes it possible to use qsort to
  * sort a list of handles */
-static int _starpu_compar_handles(struct starpu_data_state_t *dataA,
-				struct starpu_data_state_t *dataB)
+static int _starpu_compar_handles(struct _starpu_data_state *dataA,
+				  struct _starpu_data_state *dataB)
 {
 	/* Perhaps we have the same piece of data */
 	if (dataA == dataB)

+ 2 - 2
src/datawizard/user_interactions.c

@@ -376,7 +376,7 @@ void starpu_data_advise_as_important(starpu_data_handle handle, unsigned is_impo
 	for (child = 0; child < handle->nchildren; child++)
 	{
 		/* make sure the intermediate children is advised as well */
-		struct starpu_data_state_t *child_handle = &handle->children[child];
+		struct _starpu_data_state *child_handle = &handle->children[child];
 		if (child_handle->nchildren > 0)
 			starpu_data_advise_as_important(child_handle, is_important);
 	}
@@ -396,7 +396,7 @@ void starpu_data_set_sequential_consistency_flag(starpu_data_handle handle, unsi
 	for (child = 0; child < handle->nchildren; child++)
 	{
 		/* make sure that the flags are applied to the children as well */
-		struct starpu_data_state_t *child_handle = &handle->children[child];
+		struct _starpu_data_state *child_handle = &handle->children[child];
 		if (child_handle->nchildren > 0)
 			starpu_data_set_sequential_consistency_flag(child_handle, flag);
 	}

+ 2 - 2
src/debug/structures_size.c

@@ -27,8 +27,8 @@ void _starpu_debug_display_structures_size(void)
 			(unsigned) sizeof(struct starpu_task), (unsigned) sizeof(struct starpu_task));
 	fprintf(stderr, "struct starpu_job_s\t\t%u bytes\t(%x)\n",
 			(unsigned) sizeof(struct starpu_job_s), (unsigned) sizeof(struct starpu_job_s));
-	fprintf(stderr, "struct starpu_data_state_t\t%u bytes\t(%x)\n",
-			(unsigned) sizeof(struct starpu_data_state_t), (unsigned) sizeof(struct starpu_data_state_t));
+	fprintf(stderr, "struct _starpu_data_state\t%u bytes\t(%x)\n",
+			(unsigned) sizeof(struct _starpu_data_state), (unsigned) sizeof(struct _starpu_data_state));
 	fprintf(stderr, "struct starpu_tag_s\t\t%u bytes\t(%x)\n",
 			(unsigned) sizeof(struct starpu_tag_s), (unsigned) sizeof(struct starpu_tag_s));
 	fprintf(stderr, "struct starpu_cg_s\t\t%u bytes\t(%x)\n",