complex_interface.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2012, 2013 Centre National de la Recherche Scientifique
  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 <starpu.h>
  17. #ifndef __COMPLEX_INTERFACE_H
  18. #define __COMPLEX_INTERFACE_H
  19. /* interface for complex numbers */
  20. struct starpu_complex_interface
  21. {
  22. double *real;
  23. double *imaginary;
  24. int nx;
  25. };
  26. void starpu_complex_data_register(starpu_data_handle_t *handle, unsigned home_node, double *real, double *imaginary, int nx);
  27. double *starpu_complex_get_real(starpu_data_handle_t handle);
  28. double *starpu_complex_get_imaginary(starpu_data_handle_t handle);
  29. int starpu_complex_get_nx(starpu_data_handle_t handle);
  30. #define STARPU_COMPLEX_GET_REAL(interface) (((struct starpu_complex_interface *)(interface))->real)
  31. #define STARPU_COMPLEX_GET_IMAGINARY(interface) (((struct starpu_complex_interface *)(interface))->imaginary)
  32. #define STARPU_COMPLEX_GET_NX(interface) (((struct starpu_complex_interface *)(interface))->nx)
  33. #endif /* __COMPLEX_INTERFACE_H */