瀏覽代碼

rename xxx_disable_asynchronous_copy to xxx_asynchronous_copy_disabled

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

+ 2 - 2
doc/chapters/basic-api.texi

@@ -115,10 +115,10 @@ not support concurrent calls to parallel code. In such case, setting this flag
 makes StarPU only start one parallel task at a time.
 This can also be specified with the @code{STARPU_SINGLE_COMBINED_WORKER} environment variable.
 
-@item @code{int disable_asynchronous_copy} (default = 0)
+@item @code{int asynchronous_copy_disabled} (default = 0)
 This flag should be set to 1 to disable asynchronous copies between
 CPUs and accelerators. This can also be specified with the
-@code{STARPU_DISABLE_ASYNCHRONOUS_COPY} environment variable.
+@code{STARPU_ASYNCHRONOUS_COPY_DISABLED} environment variable.
 The AMD implementation of OpenCL is known to
 fail when copying data asynchronously. When using this implementation,
 it is therefore necessary to disable asynchronous data transfers.

+ 2 - 2
include/starpu.h

@@ -82,7 +82,7 @@ struct starpu_conf
 	int single_combined_worker;
 
         /* indicate if the asynchronous copies should be disabled */
-	int disable_asynchronous_copy;
+	int asynchronous_copy_disabled;
 };
 
 /* Initialize a starpu_conf structure with default values. */
@@ -107,7 +107,7 @@ unsigned starpu_cuda_worker_get_count(void);
 unsigned starpu_spu_worker_get_count(void);
 unsigned starpu_opencl_worker_get_count(void);
 
-int starpu_disable_asynchronous_copy();
+int starpu_asynchronous_copy_disabled();
 
 /* Return the identifier of the thread in case this is associated to a worker.
  * This will return -1 if this function is called directly from the application

+ 9 - 9
src/core/workers.c

@@ -368,7 +368,7 @@ int starpu_conf_init(struct starpu_conf *conf)
 
 	conf->single_combined_worker = starpu_get_env_number("STARPU_SINGLE_COMBINED_WORKER");
 
-	conf->disable_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_COPY");
+	conf->asynchronous_copy_disabled = starpu_get_env_number("STARPU_ASYNCHRONOUS_COPY_DISABLED");
 
 	return 0;
 }
@@ -448,16 +448,16 @@ int starpu_init(struct starpu_conf *user_conf)
 
 	if (user_conf)
 	{
-	     int disable_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_COPY");
-	     if (disable_asynchronous_copy == 1)
-		  config.disable_asynchronous_copy = 1;
+	     int asynchronous_copy_disabled = starpu_get_env_number("STARPU_ASYNCHRONOUS_COPY_DISABLED");
+	     if (asynchronous_copy_disabled == 1)
+		  config.asynchronous_copy_disabled = 1;
 	     else
-		  config.disable_asynchronous_copy = (user_conf->disable_asynchronous_copy == 1);
+		  config.asynchronous_copy_disabled = (user_conf->asynchronous_copy_disabled == 1);
 	}
 	else
 	{
-	     int disable_asynchronous_copy = starpu_get_env_number("STARPU_DISABLE_ASYNCHRONOUS_COPY");
-	     config.disable_asynchronous_copy = (disable_asynchronous_copy == 1);
+	     int asynchronous_copy_disabled = starpu_get_env_number("STARPU_ASYNCHRONOUS_COPY_DISABLED");
+	     config.asynchronous_copy_disabled = (asynchronous_copy_disabled == 1);
 	}
 
 	ret = _starpu_build_topology(&config);
@@ -705,9 +705,9 @@ unsigned starpu_spu_worker_get_count(void)
 	return config.topology.ngordon_spus;
 }
 
-int starpu_disable_asynchronous_copy()
+int starpu_asynchronous_copy_disabled()
 {
-	return config.disable_asynchronous_copy;
+	return config.asynchronous_copy_disabled;
 }
 
 /* When analyzing performance, it is useful to see what is the processing unit

+ 1 - 1
src/core/workers.h

@@ -159,7 +159,7 @@ struct _starpu_machine_config
 	unsigned running;
 
         /* indicate if the asynchronous copies should be disabled */
-        int disable_asynchronous_copy;
+        int asynchronous_copy_disabled;
 };
 
 /* Has starpu_shutdown already been called ? */

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

@@ -288,8 +288,8 @@ void starpu_data_register(starpu_data_handle_t *handleptr, uint32_t home_node,
 	*handleptr = handle;
 	handle->mf_node = home_node;
 
-	int disable_asynchronous_copy = starpu_disable_asynchronous_copy();
-	if (STARPU_UNLIKELY(disable_asynchronous_copy))
+	int asynchronous_copy_disabled = starpu_asynchronous_copy_disabled();
+	if (STARPU_UNLIKELY(asynchronous_copy_disabled))
 	{
 #ifdef STARPU_USE_CUDA
 	     if (ops->copy_methods->ram_to_cuda_async)

+ 1 - 1
tests/datawizard/interfaces/test_interfaces.c

@@ -589,7 +589,7 @@ out:
 static void
 run_async(void)
 {
-	int async = starpu_disable_asynchronous_copy();
+	int async = starpu_asynchronous_copy_disabled();
 	if (async == 1) {
 		FPRINTF(stderr, "Asynchronous copies have been disabled\n");
 		return;

+ 1 - 1
tests/datawizard/readonly.c

@@ -45,7 +45,7 @@ int main(int argc, char **argv)
      if (ret == -ENODEV) return STARPU_TEST_SKIPPED;
      STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
 
-     int copy = starpu_disable_asynchronous_copy();
+     int copy = starpu_asynchronous_copy_disabled();
      FPRINTF(stderr, "copy %d\n", copy);
 
      starpu_variable_data_register(&handle, 0, (uintptr_t)&var, sizeof(var));