Discrete Fourier Transform Functions#
oneMKL provides a DPC++ interface to
Definitions#
Let
For every
where
The domain of input (resp. output) discrete sequences for a forward (resp. backward) DFT is referred to as “forward domain”. Conversely, the domain of output (resp. input) discrete sequences for forward (resp. backward) DFT is referred to as “backward domain”.
oneMKL supports single-precision (fp32) and double-precision (fp64) floating-point arithmetic for the calculation of DFTs, using two types of forward domains:
the set of complex
-dimensional periodic sequences, referred to as “complex forward domain”;the set of real
-dimensional periodic sequences, referred to as “real forward domain”.
Similarly, we refer to DFTs of complex (resp. real) forward domain as “complex DFTs” (resp. “real DFTs”). Regardless of the type of forward domain, the backward domain’s data sequences are always complex.
The calculation of the same DFT for several, i.e.,
Finite range of indices#
In general, given the periodicity of the discrete data considered in any DFT,
ranges of indices
Elementary range of indices#
In other words, oneMKL expects and produces a set of
; , if ; , except for backward domain’s data sequences of real DFTs; , for backward domain’s data sequences of real DFTs.
Additional constraints for data in backward domain of real DFTs#
Finally, note that the conjugate symmetry relation further constrains some of
the entries (or pairs thereof) in the backward domain’s data sequences for real
DFTs. Specifically, for any of the
the imaginary part must be
for any entry of multi-index such that , e.g., entry of multi-index ;pairs of entries of multi-indices
and such that must be complex conjugates of one another, e.g., entries of multi-indices and must be complex conjugates (note that this case falls back to the above constraint if ).
Note
The behavior of oneMKL is undefined for real backward DFT if the input data does not satisfy those constraints. oneMKL considers it the user’s responsibility to guarantee that these constraints are satisfied by the input data for real backward DFTs.
Recommended usage#
The desired (batched) DFT to be computed is entirely defined by an object
desc
of the descriptor class. The desired type
of forward domain and precision are determined at desc
’s construction time
by the specialization values chosen for the self-explanatory template parameters
prec
(of type precision) and dom
(of type
domain), respectively. The transform size
desc
for every
relevant configuration setting (e.g., the number desc
, requiring a
sycl::queue
object Q
, may be invoked. The successful completion of the
latter makes desc
committed to the desired (batched) DFT as configured, for
the particular device and context encapsulated by Q
. The
compute_forward (resp. compute_backward)
function may then be called and provided with desc
to enqueue operations
relevant to the desired forward (resp. backward) DFT calculations with
user-provided, device-accessible data.
Note
Objects of the descriptor class
must be successfully committed prior to providing them to any compute function;
must be re-committed to account for any change in configuration after it was already successfully committed;
deliver best performance for DFT calculations when created, configured and committed outside applications’ hotpath(s) that use them multiple times for identically-configured (batched) DFTs. compute_forward and/or compute_backward should be the only oneMKL DFT-related routines invoked in programs’ hotpaths.
Summary table#
The table below summarizes the object and functions relevant to computing DFTs
(all defined in the oneapi::mkl::dft
namespace).
Routines and Objects |
Description |
---|---|
A class whose instances define a specific (batched) DFT(s) to be calculated. |
|
A member function of the descriptor class to set (writable) configuration parameters for an instance of that class. |
|
A member function of the descriptor class to query configuration parameters from any instance of that class. |
|
A member function of the descriptor class to commit an instance of that class to the (batched) DFT calculations it defines, on a given queue. |
|
A function requiring a successfully-committed object of the descriptor class to compute a forward (batched) DFT, as defined by that object. |
|
A function requiring a successfully-committed object of the descriptor class to compute a backward (batched) DFT, as defined by that object. |
Parent topic: oneMKL Domains