Преглед изворни кода

Separate out lazy_unregister field

It is set at execution time, not submission time, so cannot use the same
bitfield.
Samuel Thibault пре 4 година
родитељ
комит
351c84044b
1 измењених фајлова са 7 додато и 3 уклоњено
  1. 7 3
      src/datawizard/coherency.h

+ 7 - 3
src/datawizard/coherency.h

@@ -210,6 +210,8 @@ struct _starpu_data_state
 	    is in its readonly_dup field. */
 	    is in its readonly_dup field. */
 	starpu_data_handle_t readonly_dup_of;
 	starpu_data_handle_t readonly_dup_of;
 
 
+	/* The following bitfields are set from the application submission thread */
+
 	/** in some case, the application may explicitly tell StarPU that a
 	/** in some case, the application may explicitly tell StarPU that a
  	 * piece of data is not likely to be used soon again */
  	 * piece of data is not likely to be used soon again */
 	unsigned is_not_important:1;
 	unsigned is_not_important:1;
@@ -224,9 +226,6 @@ struct _starpu_data_state
 	/** Can the data be pushed to the disk? */
 	/** Can the data be pushed to the disk? */
 	unsigned ooc:1;
 	unsigned ooc:1;
 
 
-	/** Whether lazy unregistration was requested throught starpu_data_unregister_submit */
-	unsigned lazy_unregister:1;
-
 	/** Whether automatic planned partitioning/unpartitioning should not be done */
 	/** Whether automatic planned partitioning/unpartitioning should not be done */
 	int partition_automatic_disabled:1;
 	int partition_automatic_disabled:1;
 
 
@@ -234,6 +233,11 @@ struct _starpu_data_state
 	unsigned removed_from_context_hash:1;
 	unsigned removed_from_context_hash:1;
 #endif
 #endif
 
 
+	/* The following field is set by StarPU at execution time */
+
+	/** Whether lazy unregistration was requested throught starpu_data_unregister_submit */
+	unsigned char lazy_unregister;
+
 	/** This lock should protect any operation to enforce
 	/** This lock should protect any operation to enforce
 	 * sequential_consistency */
 	 * sequential_consistency */
 	starpu_pthread_mutex_t sequential_consistency_mutex;
 	starpu_pthread_mutex_t sequential_consistency_mutex;