complex_interface.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2012-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 <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. /* Split complex vector into smaller complex vectors */
  34. void starpu_complex_filter_block(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nchunks);
  35. /* Split complex into two simple vectors */
  36. void starpu_complex_filter_canonical(void *father_interface, void *child_interface, struct starpu_data_filter *f, unsigned id, unsigned nchunks);
  37. struct starpu_data_interface_ops *starpu_complex_filter_canonical_child_ops(struct starpu_data_filter *f, unsigned child);
  38. #endif /* __COMPLEX_INTERFACE_H */