cpu_func_to_cpu_funcs_test.c 1.6 KB

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