libcm is a C development framework with an emphasis on audio signal processing applications.
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #ifndef cmComplexTypes_h
  2. #define cmComplexTypes_h
  3. #include <complex.h>
  4. #include <fftw3.h>
  5. #if CM_FLOAT_SMP == 1
  6. #define cmCabsS cabsf
  7. #define cmCatanS catanf
  8. #define cmCrealS crealf
  9. #define cmCimagS cimagf
  10. #define cmCargS cargf
  11. #define cmFftPlanAllocS fftwf_plan_dft_r2c_1d
  12. #define cmFft1dPlanAllocS fftwf_plan_dft_1d
  13. #define cmIFftPlanAllocS fftwf_plan_dft_c2r_1d
  14. #define cmFftPlanFreeS fftwf_destroy_plan
  15. #define cmFftMallocS fftwf_malloc
  16. #define cmFftFreeMemS fftwf_free
  17. #define cmFftExecuteS fftwf_execute
  18. typedef fftwf_plan cmFftPlanS_t;
  19. #else
  20. #define cmCabsS cabs
  21. #define cmCatanS catan
  22. #define cmCrealS creal
  23. #define cmCimagS cimag
  24. #define cmCargS carg
  25. #define cmFftPlanAllocS fftw_plan_dft_r2c_1d
  26. #define cmFft1dPlanAllocS fftw_plan_dft_1d
  27. #define cmIFftPlanAllocS fftw_plan_dft_c2r_1d
  28. #define cmFftPlanFreeS fftw_destroy_plan
  29. #define cmFftMallocS fftw_malloc
  30. #define cmFftFreeMemS fftw_free
  31. #define cmFftExecuteS fftw_execute
  32. typedef fftw_plan cmFftPlanS_t;
  33. #endif
  34. //-----------------------------------------------------------------
  35. //-----------------------------------------------------------------
  36. //-----------------------------------------------------------------
  37. #if CM_FLOAT_REAL == 1
  38. #define cmCabsR cabsf
  39. #define cmCatanR catanf
  40. #define cmCrealR crealf
  41. #define cmCimagR cimagf
  42. #define cmCargR cargf
  43. #define cmFftPlanAllocR fftwf_plan_dft_r2c_1d
  44. #define cmFft1dPlanAllocR fftwf_plan_dft_1d
  45. #define cmIFftPlanAllocR fftwf_plan_dft_c2r_1d
  46. #define cmFftPlanFreeR fftwf_destroy_plan
  47. #define cmFftMallocR fftwf_malloc
  48. #define cmFftFreeMemR fftwf_free
  49. #define cmFftExecuteR fftwf_execute
  50. typedef fftwf_plan cmFftPlanR_t;
  51. #else
  52. #define cmCabsR cabs
  53. #define cmCatanR catan
  54. #define cmCrealR creal
  55. #define cmCimagR cimag
  56. #define cmCargR carg
  57. #define cmFftPlanAllocR fftw_plan_dft_r2c_1d
  58. #define cmFft1dPlanAllocR fftw_plan_dft_1d
  59. #define cmIFftPlanAllocR fftw_plan_dft_c2r_1d
  60. #define cmFftPlanFreeR fftw_destroy_plan
  61. #define cmFftMallocR fftw_malloc
  62. #define cmFftFreeMemR fftw_free
  63. #define cmFftExecuteR fftw_execute
  64. typedef fftw_plan cmFftPlanR_t;
  65. #endif
  66. #endif