test_interfaces.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #ifndef TEST_INTERFACES_H
  17. #define TEST_INTERFACES_H
  18. struct test_config
  19. {
  20. /* A pointer to a registered handle */
  21. starpu_data_handle_t *handle;
  22. /* A pointer to a registered handle, that will be used to test
  23. * RAM to RAM copy. The values it points to should be different from
  24. * the ones pointed to by the previous handle. */
  25. starpu_data_handle_t *dummy_handle;
  26. /* StarPU codelets. The following functions should :
  27. * 1) Check that the values are correct
  28. * 2) Negate every element
  29. */
  30. starpu_cpu_func_t cpu_func;
  31. #ifdef STARPU_USE_CUDA
  32. starpu_cuda_func_t cuda_func;
  33. #endif
  34. #ifdef STARPU_USE_OPENCL
  35. starpu_opencl_func_t opencl_func;
  36. #endif
  37. /* The previous codelets must update this field at the end of their
  38. * execution. copy_failed must be 1 if the copy failed, 0 otherwise. */
  39. int copy_failed;
  40. /* A human-readable name for the test */
  41. const char *name;
  42. };
  43. typedef struct data_interface_test_summary data_interface_test_summary;
  44. void data_interface_test_summary_print(FILE *, data_interface_test_summary *);
  45. int data_interface_test_summary_success(data_interface_test_summary *);
  46. data_interface_test_summary *run_tests(struct test_config*);
  47. #endif /* !TEST_INTERFACES_H */