DTolm / VkFFT

Vulkan/CUDA/HIP/OpenCL/Level Zero/Metal Fast Fourier Transform library
MIT License
1.48k stars 88 forks source link

vkFFT backend module #162

Open DejvBayer opened 4 months ago

DejvBayer commented 4 months ago

This merge request introduces vkFFT_Backend module that defines VKFFT_BACKEND_* macro for each backend ID and VKFFT_BACKEND_IS_* macro defined as (VKFFT_BACKEND == VKFFT_BACKEND_*). It makes the backend's specific sections more explicit than comparing VKFFT_BACKEND to some value.

Also a check if VKFFT_BACKEND macro is defined is added to the module.

DejvBayer commented 4 months ago

More changes:

DTolm commented 3 months ago

Hello,

The changes to VKFFT_BACKEND look cosmetic to me but if they can make the code more clear to others I am happy to add them. However, instead of adding the new file, all definitions should be made in the vkFFT.h file - it is an entry point to the whole library and library-wide definitions are stored in it. As for the CMakeLists changes, I need to look further into them and I think they are better done as a separate pr.

Best regards, Dmitrii