float.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 <complex.h>
  18. #include <starpu_config.h>
  19. #ifdef STARPU_HAVE_FFTW
  20. #include <fftw3.h>
  21. #endif
  22. #ifdef STARPU_USE_CUDA
  23. #include <cufft.h>
  24. #endif
  25. #undef DOUBLE
  26. #define FLOAT
  27. typedef float real;
  28. #ifdef STARPU_HAVE_FFTW
  29. typedef fftwf_complex _fftw_complex;
  30. typedef fftwf_plan _fftw_plan;
  31. #endif
  32. #ifdef STARPU_USE_CUDA
  33. typedef cuComplex _cuComplex;
  34. typedef cufftComplex _cufftComplex;
  35. #define _cufftExecC2C cufftExecC2C
  36. #define _cufftExecR2C cufftExecR2C
  37. #define _cufftExecC2R cufftExecC2R
  38. #define _CUFFT_C2C CUFFT_C2C
  39. #define _CUFFT_R2C CUFFT_R2C
  40. #define _CUFFT_C2R CUFFT_C2R
  41. #define _cuCmul(x,y) cuCmulf(x,y)
  42. #endif
  43. #define STARPUFFT(name) starpufftf_##name
  44. #define _FFTW(name) fftwf_##name
  45. #define TYPE "f"