12345678910111213141516171819 |
- #include <starpu.h>
- void cpu_output(void *buffers[], void *cl_arg)
- {
- printf("cpu function\n");
-
- uint64_t *cpu_sum = cl_arg;
-
- /* length of the vector */
- int n = STARPU_VECTOR_GET_NX(buffers[0]);
- uint32_t *window = (uint32_t *)STARPU_VECTOR_GET_PTR(buffers[0]);
-
- for (int i = 0; i < n; i++)
- {
- *cpu_sum += window[i];
- }
-
- }
|