complex_interface.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2012,2013,2015,2017 CNRS
  4. * Copyright (C) 2012 Inria
  5. *
  6. * StarPU is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU Lesser General Public License as published by
  8. * the Free Software Foundation; either version 2.1 of the License, or (at
  9. * your option) any later version.
  10. *
  11. * StarPU is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. *
  15. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. */
  17. #include <starpu.h>
  18. #ifndef __COMPLEX_INTERFACE_H
  19. #define __COMPLEX_INTERFACE_H
  20. /* interface for complex numbers */
  21. struct starpu_complex_interface
  22. {
  23. double *real;
  24. double *imaginary;
  25. int nx;
  26. };
  27. void starpu_complex_data_register(starpu_data_handle_t *handle, unsigned home_node, double *real, double *imaginary, int nx);
  28. double *starpu_complex_get_real(starpu_data_handle_t handle);
  29. double *starpu_complex_get_imaginary(starpu_data_handle_t handle);
  30. int starpu_complex_get_nx(starpu_data_handle_t handle);
  31. #define STARPU_COMPLEX_GET_REAL(interface) (((struct starpu_complex_interface *)(interface))->real)
  32. #define STARPU_COMPLEX_GET_IMAGINARY(interface) (((struct starpu_complex_interface *)(interface))->imaginary)
  33. #define STARPU_COMPLEX_GET_NX(interface) (((struct starpu_complex_interface *)(interface))->nx)
  34. /* Split complex vector into smaller complex vectors */
  35. void starpu_complex_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nchunks);
  36. /* Split complex into two simple vectors */
  37. void starpu_complex_filter_canonical(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nchunks);
  38. struct starpu_data_interface_ops *starpu_complex_filter_canonical_child_ops(struct starpu_data_filter *f, unsigned child);
  39. #endif /* __COMPLEX_INTERFACE_H */