starpufft-double.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2009, 2012 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 <starpu_config.h>
  18. #if defined(STARPU_HAVE_FFTW) && !defined(__CUDACC__)
  19. #include <complex.h>
  20. #include <fftw3.h>
  21. #endif
  22. #ifdef STARPU_USE_CUDA
  23. #include <cufft.h>
  24. #endif
  25. #undef FLOAT
  26. #define DOUBLE
  27. typedef double real;
  28. #if defined(STARPU_HAVE_FFTW) && !defined(__CUDACC__)
  29. typedef fftw_complex _fftw_complex;
  30. typedef fftw_plan _fftw_plan;
  31. #endif
  32. #ifdef STARPU_USE_CUDA
  33. typedef cuDoubleComplex _cuComplex;
  34. typedef cufftDoubleComplex _cufftComplex;
  35. #define _cufftExecC2C cufftExecZ2Z
  36. #define _cufftExecR2C cufftExecD2Z
  37. #define _cufftExecC2R cufftExecZ2D
  38. #define _CUFFT_C2C CUFFT_Z2Z
  39. #define _CUFFT_R2C CUFFT_D2Z
  40. #define _CUFFT_C2R CUFFT_Z2D
  41. #define _cuCmul(x,y) cuCmul(x,y)
  42. #endif
  43. #define STARPUFFT(name) starpufft_##name
  44. #define _FFTW(name) fftw_##name
  45. #ifdef STARPU_USE_CUDA
  46. void STARPUFFT(report_error)(const char *func, const char *file, int line, cufftResult status);
  47. #endif /* !STARPU_USE_CUDA */
  48. #define TYPE ""