starpufft.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * StarPU
  3. * Copyright (C) Université Bordeaux 1, CNRS 2009 (see AUTHORS file)
  4. *
  5. * This program 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. * This program 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 <complex.h>
  18. #include <starpu.h>
  19. #define STARPUFFT_FORWARD -1
  20. #define STARPUFFT_INVERSE 1
  21. #define __STARPUFFT(name) starpufft_##name
  22. #define __STARPUFFTF(name) starpufftf_##name
  23. #define __STARPUFFTL(name) starpufftl_##name
  24. #define __STARPUFFT_INTERFACE(starpufft,real) \
  25. typedef real _Complex starpufft(complex); \
  26. \
  27. typedef struct starpufft(plan) *starpufft(plan); \
  28. \
  29. starpufft(plan) starpufft(plan_dft_1d)(int n, int sign, unsigned flags); \
  30. starpufft(plan) starpufft(plan_dft_2d)(int n, int m, int sign, unsigned flags); \
  31. starpufft(plan) starpufft(plan_dft_r2c_1d)(int n, unsigned flags); \
  32. starpufft(plan) starpufft(plan_dft_c2r_1d)(int n, unsigned flags); \
  33. \
  34. void *starpufft(malloc)(size_t n); \
  35. void starpufft(free)(void *p); \
  36. \
  37. void starpufft(execute)(starpufft(plan) p, void *in, void *out); \
  38. starpu_tag_t starpufft(start)(starpufft(plan) p, void *in, void *out); \
  39. \
  40. void starpufft(destroy_plan)(starpufft(plan) p); \
  41. \
  42. void starpufft(startstats)(void); \
  43. void starpufft(stopstats)(void); \
  44. void starpufft(showstats)(FILE *out);
  45. __STARPUFFT_INTERFACE(__STARPUFFT, double)
  46. __STARPUFFT_INTERFACE(__STARPUFFTF, float)
  47. __STARPUFFT_INTERFACE(__STARPUFFTL, long double)
  48. int starpufft_last_plan_number;