fftw3_mkl.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*******************************************************************************
  2. * Copyright 2005-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 FFTW3 wrappers to Intel(R) oneAPI Math Kernel Library (Intel(R) oneMKL).
  17. *
  18. ******************************************************************************
  19. */
  20. #ifndef FFTW3_MKL_H
  21. #define FFTW3_MKL_H
  22. #include <stdlib.h>
  23. #include "fftw3.h"
  24. #include "mkl_dfti.h"
  25. #include "mkl_trig_transforms.h"
  26. #include "mkl_service.h"
  27. typedef struct fftw_mkl_plan_s *fftw_mkl_plan;
  28. typedef struct fftw3_mkl_s fftw3_mkl_s;
  29. /* Plan holder for the wrappers */
  30. struct fftw_mkl_plan_s
  31. {
  32. DFTI_DESCRIPTOR_HANDLE desc;
  33. void *io[4];
  34. MKL_INT *ipar;
  35. double *dpar;
  36. float *spar;
  37. void (*execute) (fftw_mkl_plan p);
  38. void (*destroy) (fftw_mkl_plan p);
  39. void *mpi_plan; /* placeholder for FFTW3 MPI Intel(R) oneMKL plan */
  40. void (*execute_offload) (fftw_mkl_plan p, void *interopObj);
  41. };
  42. /* Global helper structure */
  43. struct fftw3_mkl_s
  44. {
  45. int verbose;
  46. int nthreads;
  47. double timelimit;
  48. int number_of_user_threads; /* Will be deprecated in nearest future */
  49. fftw_mkl_plan (*new_plan) (void);
  50. int default_alignment;
  51. };
  52. FFTW_EXTERN fftw3_mkl_s fftw3_mkl;
  53. #define MKL_MAXRANK 7
  54. #define MKL_ONE 1
  55. #define MKL_RODFT00 413
  56. #define BAD(status) ((status) && !DftiErrorClass((status),DFTI_NO_ERROR))
  57. #ifndef UNUSED
  58. #define UNUSED(p) (void)p
  59. #endif
  60. #endif /* FFTW3_MKL_H */