starpufft.h 1.9 KB

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