cpu_func_to_cpu_funcs_test.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2011 Institut National de Recherche en Informatique et Automatique
  4. *
  5. * StarPU is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation; either version 2.1 of the License, or (at
  8. * your option) any later version.
  9. *
  10. * StarPU is distributed in the hope that it will be useful, but
  11. * WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. *
  14. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  15. */
  16. #include <stdio.h>
  17. #include <sdtdlib.h>
  18. #include "lol.h"
  19. /*
  20. * Old format
  21. */
  22. struct starpu_codelet cl1 = {
  23. .where = STARPU_CPU,
  24. .cpu_func = foo
  25. };
  26. /*
  27. * New format : it must not be changed !
  28. */
  29. struct starpu_codelet cl2 = {
  30. .cpu_funcs = {foo, NULL}
  31. };
  32. /*
  33. * Maybe we added the cpu_funcs fields, but forgot to remove the cpu_func one.
  34. */
  35. struct starpu_codelet cl3 = {
  36. .cpu_func = foo,
  37. .cpu_funcs = { foo, NULL }
  38. };
  39. /*
  40. * Old multiimplementations format, but not terminated by NULL
  41. * XXX : NULL is not added.
  42. */
  43. struct starpu_codelet cl4 = {
  44. .cpu_func = STARPU_MULTIPLE_CPU_IMPLEMENTATIONS,
  45. .cpu_funcs = { foo, bar }
  46. };
  47. /*
  48. * Old multiimplementations format, terminated by NULL
  49. */
  50. struct starpu_codelet cl5 = {
  51. .cpu_func = STARPU_MULTIPLE_CPU_IMPLEMENTATIONS,
  52. .cpu_funcs = { foo, bar, NULL }
  53. };