|
@@ -1,7 +1,7 @@
|
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
*
|
|
*
|
|
|
* Copyright (C) 2009, 2010 Université de Bordeaux 1
|
|
* Copyright (C) 2009, 2010 Université de Bordeaux 1
|
|
|
- * Copyright (C) 2010, 2011, 2012 Centre National de la Recherche Scientifique
|
|
|
|
|
|
|
+ * Copyright (C) 2010, 2011, 2012, 2013 Centre National de la Recherche Scientifique
|
|
|
*
|
|
*
|
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
@@ -35,8 +35,8 @@ static void wrapper_func(void *buffers[] __attribute__ ((unused)), void *_args)
|
|
|
/**
|
|
/**
|
|
|
* Execute func(arg) on the given workers.
|
|
* Execute func(arg) on the given workers.
|
|
|
*/
|
|
*/
|
|
|
-void starpu_execute_on_specific_workers(void (*func)(void*), void * arg, unsigned num_workers, unsigned * workers, const char * name) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+void starpu_execute_on_specific_workers(void (*func)(void*), void * arg, unsigned num_workers, unsigned * workers, const char * name)
|
|
|
|
|
+{
|
|
|
int ret;
|
|
int ret;
|
|
|
unsigned w;
|
|
unsigned w;
|
|
|
struct starpu_task *tasks[STARPU_NMAXWORKERS];
|
|
struct starpu_task *tasks[STARPU_NMAXWORKERS];
|
|
@@ -117,7 +117,6 @@ void starpu_execute_on_each_worker_ex(void (*func)(void *), void *arg, uint32_t
|
|
|
.cuda_funcs = {wrapper_func, NULL},
|
|
.cuda_funcs = {wrapper_func, NULL},
|
|
|
.cpu_funcs = {wrapper_func, NULL},
|
|
.cpu_funcs = {wrapper_func, NULL},
|
|
|
.opencl_funcs = {wrapper_func, NULL},
|
|
.opencl_funcs = {wrapper_func, NULL},
|
|
|
- /* XXX we do not handle Cell .. */
|
|
|
|
|
.nbuffers = 0,
|
|
.nbuffers = 0,
|
|
|
.name = (name != NULL ? name : "execute_on_all_wrapper")
|
|
.name = (name != NULL ? name : "execute_on_all_wrapper")
|
|
|
};
|
|
};
|
|
@@ -151,7 +150,7 @@ void starpu_execute_on_each_worker_ex(void (*func)(void *), void *arg, uint32_t
|
|
|
ret = _starpu_task_submit_internally(tasks[worker]);
|
|
ret = _starpu_task_submit_internally(tasks[worker]);
|
|
|
if (ret == -ENODEV)
|
|
if (ret == -ENODEV)
|
|
|
{
|
|
{
|
|
|
- /* if the worker is not able to execute this tasks, we
|
|
|
|
|
|
|
+ /* if the worker is not able to execute this task, we
|
|
|
* don't insist as this means the worker is not
|
|
* don't insist as this means the worker is not
|
|
|
* designated by the "where" bitmap */
|
|
* designated by the "where" bitmap */
|
|
|
starpu_task_destroy(tasks[worker]);
|
|
starpu_task_destroy(tasks[worker]);
|
|
@@ -170,6 +169,7 @@ void starpu_execute_on_each_worker_ex(void (*func)(void *), void *arg, uint32_t
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void starpu_execute_on_each_worker(void (*func)(void *), void *arg, uint32_t where) {
|
|
|
|
|
|
|
+void starpu_execute_on_each_worker(void (*func)(void *), void *arg, uint32_t where)
|
|
|
|
|
+{
|
|
|
starpu_execute_on_each_worker_ex(func, arg, where, NULL);
|
|
starpu_execute_on_each_worker_ex(func, arg, where, NULL);
|
|
|
}
|
|
}
|