This module creates interface with VkFFT library
VkFFT is loaded at runtime via dynamic loading.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
type(vkfft_wrapper), | public, | save, target | :: | cuda_wrapper |
VkFFT Wrapper for CUDA platform |
Creates FFT plan via vkFFT Interface
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=c_int8_t), | value | :: | rank |
Rank of fft: 1 or 2 |
||
integer(kind=c_int) | :: | dims(*) |
Dimensions of transform |
|||
integer(kind=c_int), | value | :: | double_precision |
Precision of fft: DTFFT_SINGLE or DTFFT_DOUBLE |
||
integer(kind=c_int), | value | :: | how_many |
Number of transforms to create |
||
integer(kind=c_int8_t), | value | :: | r2c |
Is R2C transform required |
||
integer(kind=c_int8_t), | value | :: | c2r |
Is C2R transform required |
||
integer(kind=c_int8_t), | value | :: | dct |
Is DCT transform required |
||
integer(kind=c_int8_t), | value | :: | dst |
Is DST transform required |
||
type(dtfft_stream_t), | value | :: | stream |
CUDA stream |
||
type(c_ptr) | :: | app_handle |
vkFFT application handle |
Executes vkFFT plan
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | value | :: | app_handle |
vkFFT application handle |
||
type(c_ptr), | value | :: | in |
Input data |
||
type(c_ptr), | value | :: | out |
Output data |
||
integer(kind=c_int8_t), | value | :: | sign |
Sign of FFT |
Destroys vkFFT plan
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(c_ptr), | value | :: | app_handle |
vkFFT application handle |
VkFFT Wrapper
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
procedure(vkfft_create_interface), | public, | pointer, nopass | :: | create |
Fortran Pointer to vkFFT create function |
||
procedure(vkfft_execute_interface), | public, | pointer, nopass | :: | execute |
Fortran Pointer to vkFFT execute function |
||
procedure(vkfft_destroy_interface), | public, | pointer, nopass | :: | destroy |
Fortran Pointer to vkFFT destroy function |
||
logical, | private | :: | is_loaded | = | .false. |
Is VkFFT library loaded |
|
type(c_ptr), | private | :: | lib_handle |
Handle to the loaded library |
|||
type(c_funptr), | private | :: | vkfft_functions(3) |
Array of VkFFT functions |
Loads VkFFT library based on the platform
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(dtfft_platform_t), | intent(in) | :: | platform |
Platform to load VkFFT library for |
Loads VkFFT library
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(vkfft_wrapper), | intent(inout) | :: | wrapper |
VkFFT Wrapper |
||
character(len=*), | intent(in) | :: | suffix |
Suffix for the library name |