diff --git a/dev/abstract/index.html b/dev/abstract/index.html index 9df5653..9e4fa5b 100644 --- a/dev/abstract/index.html +++ b/dev/abstract/index.html @@ -9,4 +9,4 @@ ... end
We next outline all of the aforementioned functions and describe their behavior:
size_in(p)
Size of the input array for an NFFT operation. The returned tuple has D
entries. Note that this will be the output array for an adjoint NFFT.
size_out(p)
Size of the output array for an NFFT operation. The returned tuple has R
entries. Note that this will be the input array for an adjoint NFFT.
mul!(fHat, p, f) -> fHat
Inplace NFFT transforming the D
dimensional array f
to the R
dimensional array fHat
. The transformation is applied along D-R+1
dimensions specified in the plan p
. Both f
and fHat
must be complex arrays of element type Complex{T}
.
mul!(f, p::Adjoint{Complex{T},<:AbstractNFFTPlan{T}}, fHat) -> f
Inplace adjoint NFFT transforming the R
dimensional array fHat
to the D
dimensional array f
. The transformation is applied along D-R+1
dimensions specified in the plan p
. Both f
and fHat
must be complex arrays of element type Complex{T}
.
nodes!(p, k)
Exchange the nodes k
in the plan p
and return the plan. The implementation of this function is optional.
The constructor for a plan also has a defined interface. It should be implemented in this way:
function MyNFFTPlan(k::Matrix{T}, N::NTuple{D,Int}; kwargs...) where {T,D}
...
-end
All parameters are put into keyword arguments that have to match as well. We describe the keyword arguments in more detail in the overview page. Using the same plan interface allows to load several NFFT libraries simultaneously and exchange the constructor dynamically by storing the constructor in a function object. This is how the unit tests of NFFT.jl
run.
Additionally, to the type-specific constructor one can provide the factory
plan_nfft(Q::Type, k::Matrix{T}, N::NTuple{D,Int}; kargs...) where {D}
where Q
is the Array type, e.g. Array
. The reason to require the array type is, that this allows for GPU implementations, which would use for instance CuArray
here.
The package AbstractNFFTs
provides a convenient constructor
plan_nfft(k::Matrix{T}, N::NTuple{D,Int}; kargs...) where {D}
defaulting to the Array
type.
Different packages implementing plan_nfft
will conflict if the same Q
is implemented. In case of NFFT.jl
and CuNFFT.jl
there is no conflict since the array type is different.
Based on the core low-level interface that an AbstractNFFTPlan
needs to provide, the package AbstractNFFT.jl
also provides high-level functions like *
, nfft
, and nfft_adjoint
, which internally use the low-level interface. Thus, the implementation of high-level function is shared among all AbstractNFFT.jl
implementations.
Settings
This document was generated with Documenter.jl on Thursday 4 July 2024. Using Julia version 1.10.4.