cpu_func_to_cpu_funcs_test.c 813 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include <stdio.h>
  2. #include <sdtdlib.h>
  3. #include "lol.h"
  4. /*
  5. * Old format
  6. */
  7. struct starpu_codelet cl1 = {
  8. .where = STARPU_CPU,
  9. .cpu_func = foo
  10. };
  11. /*
  12. * New format : it must not be changed !
  13. */
  14. struct starpu_codelet cl2 = {
  15. .cpu_funcs = {foo, NULL}
  16. };
  17. /*
  18. * Maybe we added the cpu_funcs fields, but forgot to remove the cpu_func one.
  19. */
  20. struct starpu_codelet cl3 = {
  21. .cpu_func = foo,
  22. .cpu_funcs = { foo, NULL }
  23. };
  24. /*
  25. * Old multiimplementations format, but not terminated by NULL
  26. * XXX : NULL is not added.
  27. */
  28. struct starpu_codelet cl4 = {
  29. .cpu_func = STARPU_MULTIPLE_CPU_IMPLEMENTATIONS,
  30. .cpu_funcs = { foo, bar }
  31. };
  32. /*
  33. * Old multiimplementations format, terminated by NULL
  34. */
  35. struct starpu_codelet cl5 = {
  36. .cpu_func = STARPU_MULTIPLE_CPU_IMPLEMENTATIONS,
  37. .cpu_funcs = { foo, bar, NULL }
  38. };