fftw3-mpi_mkl.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*******************************************************************************
  2. * Copyright 2010-2022 Intel Corporation.
  3. *
  4. * This software and the related documents are Intel copyrighted materials, and
  5. * your use of them is governed by the express license under which they were
  6. * provided to you (License). Unless the License provides otherwise, you may not
  7. * use, modify, copy, publish, distribute, disclose or transmit this software or
  8. * the related documents without Intel's prior written permission.
  9. *
  10. * This software and the related documents are provided as is, with no express
  11. * or implied warranties, other than those that are expressly stated in the
  12. * License.
  13. *******************************************************************************/
  14. /*
  15. *
  16. * Definitions for MPI FFTW3 wrappers to Intel(R) oneAPI Math Kernel Library (Intel(R) oneMKL).
  17. *
  18. ******************************************************************************
  19. */
  20. #ifndef FFTW3_MPI_MKL_H
  21. #define FFTW3_MPI_MKL_H
  22. #include "fftw3-mpi.h"
  23. #if defined(MKL_SINGLE)
  24. typedef float real_t;
  25. typedef fftwf_complex complex_t;
  26. #define MPI_PREC MPI_FLOAT
  27. #define MKL_PREC DFTI_SINGLE
  28. #define FFTW_MPI_MANGLE(name) FFTW_MPI_MANGLE_FLOAT(name)
  29. #define FFTW_MANGLE(name) FFTW_MANGLE_FLOAT(name)
  30. #else
  31. typedef double real_t;
  32. typedef fftw_complex complex_t;
  33. #define MPI_PREC MPI_DOUBLE
  34. #define MKL_PREC DFTI_DOUBLE
  35. #define FFTW_MPI_MANGLE(name) FFTW_MPI_MANGLE_DOUBLE(name)
  36. #define FFTW_MANGLE(name) FFTW_MANGLE_DOUBLE(name)
  37. #endif
  38. #include "fftw3_mkl.h"
  39. #include "mkl_cdft.h"
  40. #define WANT_FAST_INPLACE_CLUSTER_FFT 1
  41. /* if WANT_FAST_INPLACE_CLUSTER_FFT set to 1, FFTW3 MPI wrappers internally
  42. * allocate additional memory(workspace) needed for fast inplace Intel(R) oneMKL CDFT
  43. * otherwise, no additional memory is used, though the perfomance would be
  44. * worse, because of many MPI communications */
  45. #endif /* FFTW3_MPI_MKL_H */