cpu_func_to_cpu_funcs_test.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2011-2021 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
  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. {
  24. .where = STARPU_CPU,
  25. .cpu_func = foo
  26. };
  27. /*
  28. * New format : it must not be changed !
  29. */
  30. struct starpu_codelet cl2 =
  31. {
  32. .cpu_funcs = {foo}
  33. };
  34. /*
  35. * Maybe we added the cpu_funcs fields, but forgot to remove the cpu_func one.
  36. */
  37. struct starpu_codelet cl3 =
  38. {
  39. .cpu_func = foo,
  40. .cpu_funcs = { foo }
  41. };
  42. /*
  43. * Old multiimplementations format, but not terminated by NULL
  44. * XXX : NULL is not added.
  45. */
  46. struct starpu_codelet cl4 =
  47. {
  48. .cpu_func = STARPU_MULTIPLE_CPU_IMPLEMENTATIONS,
  49. .cpu_funcs = { foo, bar }
  50. };
  51. /*
  52. * Old multiimplementations format, terminated by NULL
  53. */
  54. struct starpu_codelet cl5 =
  55. {
  56. .cpu_func = STARPU_MULTIPLE_CPU_IMPLEMENTATIONS,
  57. .cpu_funcs = { foo, bar }
  58. };