starpufft-float.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* StarPU --- Runtime system for heterogeneous multicore architectures.
  2. *
  3. * Copyright (C) 2010,2012,2014,2015,2017 CNRS
  4. * Copyright (C) 2009,2011,2012,2014 Université de Bordeaux
  5. * Copyright (C) 2012 Inria
  6. *
  7. * StarPU is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU Lesser General Public License as published by
  9. * the Free Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * StarPU is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. *
  16. * See the GNU Lesser General Public License in COPYING.LGPL for more details.
  17. */
  18. #include <starpu_config.h>
  19. #if defined(STARPU_HAVE_FFTW) && !defined(__CUDACC__)
  20. #include <complex.h>
  21. #include <fftw3.h>
  22. #endif
  23. #ifdef STARPU_USE_CUDA
  24. #include <cufft.h>
  25. #endif
  26. #undef DOUBLE
  27. #define FLOAT
  28. typedef float real;
  29. #if defined(STARPU_HAVE_FFTW) && !defined(__CUDACC__)
  30. typedef fftwf_complex _fftw_complex;
  31. typedef fftwf_plan _fftw_plan;
  32. #endif
  33. #ifdef STARPU_USE_CUDA
  34. typedef cuComplex _cuComplex;
  35. typedef cufftComplex _cufftComplex;
  36. #define _cufftExecC2C cufftExecC2C
  37. #define _cufftExecR2C cufftExecR2C
  38. #define _cufftExecC2R cufftExecC2R
  39. #define _CUFFT_C2C CUFFT_C2C
  40. #define _CUFFT_R2C CUFFT_R2C
  41. #define _CUFFT_C2R CUFFT_C2R
  42. #define _cuCmul(x,y) cuCmulf(x,y)
  43. #endif
  44. #define STARPUFFT(name) starpufftf_##name
  45. #define _FFTW(name) fftwf_##name
  46. #ifdef STARPU_USE_CUDA
  47. void STARPUFFT(report_error)(const char *func, const char *file, int line, cufftResult status);
  48. #endif /* !STARPU_USE_CUDA */
  49. #define TYPE "f"