123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #include <mocks.h>
- #include <my-lib.h>
- int
- main (int argc, char *argv[])
- {
- #pragma starpu initialize
-
- static const signed char x[] __attribute__ ((aligned (8))) =
- { 0, 1, 2, 3, 4, 5 };
- float y[sizeof x];
- static const char forty_two = 42;
- static const int sizeof_x = sizeof x;
- struct insert_task_argument expected_pointer_task[] =
- {
- { STARPU_VALUE, &forty_two, sizeof forty_two },
- { STARPU_R, x },
- { STARPU_RW, y },
- { STARPU_VALUE, &sizeof_x, sizeof sizeof_x },
- { 0, 0, 0 }
- };
- expected_insert_task_arguments = expected_pointer_task;
- expected_register_arguments.pointer = (void *) x;
- expected_register_arguments.elements = sizeof x / sizeof x[0];
- expected_register_arguments.element_size = sizeof x[0];
- #pragma starpu register x
- expected_register_arguments.pointer = y;
- expected_register_arguments.elements = sizeof y / sizeof y[0];
- expected_register_arguments.element_size = sizeof y[0];
- #pragma starpu register y
-
- my_task (42, x, y, sizeof x);
- assert (tasks_submitted == 1);
- #pragma starpu shutdown
- return EXIT_SUCCESS;
- }
|