|
@@ -529,12 +529,12 @@ When we want to switch to the vertical slice view, all we need to do is bring
|
|
|
coherency between them by running an empty task on the home node of the data:
|
|
|
|
|
|
\code{.c}
|
|
|
-void empty(void *buffers[], void *cl_arg)
|
|
|
-{ }
|
|
|
struct starpu_codelet cl_switch =
|
|
|
{
|
|
|
- .cpu_funcs = {empty},
|
|
|
- .nbuffers = STARPU_VARIABLE_NBUFFERS,
|
|
|
+ .where = STARPU_NOWHERE,
|
|
|
+ .nbuffers = 3,
|
|
|
+ .specific_nodes = 1,
|
|
|
+ .nodes = { STARPU_MAIN_RAM, STARPU_MAIN_RAM, STARPU_MAIN_RAM },
|
|
|
};
|
|
|
|
|
|
ret = starpu_task_insert(&cl_switch, STARPU_RW, handle,
|
|
@@ -552,6 +552,11 @@ Again, we prefer to make sure that we don't accidentally access the matrix throu
|
|
|
starpu_data_invalidate_submit(handle);
|
|
|
\endcode
|
|
|
|
|
|
+Note: when enabling a set of handles in this way, the set must not have any
|
|
|
+overlapping, i.e. the handles of the set must not have any part of data in
|
|
|
+common, otherwise StarPU will not properly handle concurrent accesses between
|
|
|
+them.
|
|
|
+
|
|
|
And now we can start using vertical slices, etc.
|
|
|
|
|
|
\section DataPointers Handles data buffer pointers
|