|
@@ -1,7 +1,7 @@
|
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
|
*
|
|
|
* Copyright (C) 2010 Université de Bordeaux 1
|
|
|
- * Copyright (C) 2010, 2011 Centre National de la Recherche Scientifique
|
|
|
+ * Copyright (C) 2010, 2011, 2012 Centre National de la Recherche Scientifique
|
|
|
*
|
|
|
* 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
|
|
@@ -190,7 +190,8 @@ static struct starpu_codelet increment_cl =
|
|
|
.opencl_funcs = {increment_opencl_kernel, NULL},
|
|
|
#endif
|
|
|
.cpu_funcs = {increment_cpu_kernel, NULL},
|
|
|
- .nbuffers = 1
|
|
|
+ .nbuffers = 1,
|
|
|
+ .modes = {STARPU_REDUX}
|
|
|
};
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
@@ -217,9 +218,7 @@ int main(int argc, char **argv)
|
|
|
struct starpu_task *task = starpu_task_create();
|
|
|
|
|
|
task->cl = &increment_cl;
|
|
|
-
|
|
|
- task->buffers[0].mode = STARPU_REDUX;
|
|
|
- task->buffers[0].handle = handle;
|
|
|
+ task->handles[0] = handle;
|
|
|
|
|
|
int ret = starpu_task_submit(task);
|
|
|
if (ret == -ENODEV) goto enodev;
|