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

Also propagate relaxed_coherency to memory chunk that could already be allocated

Samuel Thibault пре 14 година
родитељ
комит
fe42152165
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      src/datawizard/reduction.c

+ 4 - 0
src/datawizard/reduction.c

@@ -94,6 +94,8 @@ void _starpu_data_start_reduction_mode(starpu_data_handle_t handle)
 		replicate = &handle->per_worker[worker];
 		replicate = &handle->per_worker[worker];
 		replicate->initialized = 0;
 		replicate->initialized = 0;
 		replicate->relaxed_coherency = 2;
 		replicate->relaxed_coherency = 2;
+		if (replicate->mc)
+			replicate->mc->relaxed_coherency = 2;
 	}
 	}
 }
 }
 
 
@@ -259,6 +261,8 @@ void _starpu_data_end_reduction_mode(starpu_data_handle_t handle)
 		struct _starpu_data_replicate *replicate;
 		struct _starpu_data_replicate *replicate;
 		replicate = &handle->per_worker[worker];
 		replicate = &handle->per_worker[worker];
 		replicate->relaxed_coherency = 1;
 		replicate->relaxed_coherency = 1;
+		if (replicate->mc)
+			replicate->mc->relaxed_coherency = 1;
 	}
 	}
 }
 }