VkFFTCUDA.VkFFTPlanType
VkFFTPlan{T}(app::Ptr{Cvoid}, config::Ptr{Cvoid}, direction::Int32, dims::NTuple{N, Int} where N, region, buffer_size::AbstractArray{Int}, type::DataType, is_inplace::Bool)

A struct that holds the plan for a VkFFT operation.

Fields

  • app::Ptr{Cvoid}: The equivalent of an FFTW plan but for VkFFT
  • config::Ptr{Cvoid}: A struct that holds the VkFFFT configuration
  • direction::Int32: -1 for forward, 1 for inverse
  • dims::NTuple{N, Int} where N: The size of the input array
  • region: The dimensions on which to perform the FFT
  • buffer_size::AbstractArray{Int}: The size of the buffer VkFFT will use (in bytes)
  • is_inplace::Bool: Whether the plan is in-place (for optimization)
VkFFTCUDA._delete_planMethod
_delete_plan(plan::VkFFTPlan)

Deletes a VkFFT plan.

Wrapper for the VkFFT C functions deleteapp and deleteconfig.

VkFFTCUDA._fftMethod
_fft(app::Ptr{Cvoid}, x::CuPtr{Cvoid}, y::CuPtr{Cvoid}, direction::Int32)

Wrapper for the VkFFT C function fft.

VkFFTCUDA._get_tuned_paramsMethod
_get_tuned_params(x::CuArray{T}, region, forward::Bool, inplace::Bool; num_ffts::Int=1000)

Tunes the parameters for a VkFFT plan.

Arguments

  • x::CuArray{T}: The input array
  • region: The dimensions on which to perform the FFT
  • forward::Bool: Whether to perform a forward FFT
  • inplace::Bool: Whether to perform the FFT in-place
  • num_ffts::Int=1000: The number of FFTs to run to determine the best parameters

Returns

  • A tuple of the best parameters
VkFFTCUDA._make_planMethod
_make_plan(x::CuArray{T}, region, forward::Bool, inplace::Bool; coalesced_memory::Int=0, aim_threads::Int=0, num_shared_banks::Int=0)

Creates a VkFFT plan for the given input array.

Arguments

  • x::CuArray{T}: The input array
  • region: The dimensions on which to perform the FFT
  • forward::Bool: Whether to perform a forward FFT
  • inplace::Bool: Whether to perform the FFT in-place
  • coalesced_memory::Int=0: The number of coalesced memory banks to use (0 for automatic)
  • aim_threads::Int=0: The number of threads to aim for (0 for automatic)
  • num_shared_banks::Int=0: The number of shared memory banks to use (0 for automatic)

Returns

  • A VkFFTPlan
VkFFTCUDA._make_tuned_planMethod
_make_tuned_plan(x::CuArray{T}, region, forward::Bool, inplace::Bool; tune::Bool=false)

Creates a tuned VkFFT plan for the given input array.

Arguments

  • x::CuArray{T}: The input array
  • region: The dimensions on which to perform the FFT
  • forward::Bool: Whether to perform a forward FFT
  • inplace::Bool: Whether to perform the FFT in-place
  • tune::Bool=false: Whether to tune the parameters

Returns

  • A VkFFTPlan
VkFFTCUDA._new_appMethod
_new_app(config::Ptr{Cvoid}, res_ptr::Ref{Culonglong})

Wrapper for the VkFFT C function new_app.

VkFFTCUDA._new_configMethod
_new_config(fft_dim::Int64, buffer_dim::Int64, dims::AbstractArray{Int64}, omit_dims::AbstractArray{Int64}, num_batches::Int64, coalesced_memory::Int64, aim_threads::Int64, num_shared_banks::Int64, forward::Bool, double_precision::Bool, inplace::Bool)

Wrapper for the VkFFT C function new_config.

VkFFTCUDA._vkffterr2stringMethod
_vkffterr2string(err::UInt64)

Converts a VkFFT error code to a string.

Arguments

  • err::UInt64: The error code

Returns

  • A string representation of the error code