descriptor<precision, domain>::set_value¶
Sets one configuration parameter with the specified configuration value. This routine belongs to the oneapi::mkl::dft
namespace.
Description¶
This function sets one configuration parameter with the specified configuration value and throws an std::runtime_exception
in the case that it fails. Each configuration parameter is a named constant, and the configuration value must have the corresponding type, which can be a named constant or a native type. The DPC++ configuration parameters have type mkl::dft::config_param
. Each parameter mkl::dft::config_param::<PARAMETER_NAME>
has the same meaning and possible values as the C interface’s DFTI_<PARAMETER_NAME>
. Some of the options available in the C interface are not fully supported in the DPC++ interface yet. See the note below and the Intel® oneAPI Math Kernel Library Release Notes. For a full description of each parameter’s meaning and options, see Config Params.
Note
An important difference in the configuration options for DPC++ FFT interface is the use of
FWD_DISTANCE
andBWD_DISTANCE
instead ofINPUT_DISTANCE
andOUTPUT_DISTANCE
. TheFWD_DISTANCE
describes the number of elements between different batched FFTs for the forward domain whileBWD_DISTANCE
describes the number of elements between different batched FFTs for the backward domain. These configuration parameters enable a committed 1D descriptor with default strides to compute both forward and backward transforms without resetting the distance parameters.FWD_DISTANCE
andBWD_DISTANCE
must not be used in association withINPUT_DISTANCE
orOUTPUT_DISTANCE
.For
COMPLEX_STORAGE
, only theDFTI_COMPLEX_COMPLEX
format is currently supported on CPU and GPU devices.In the case of a real forward domain, the only supported values on GPU devices for
CONJUGATE_EVEN_STORAGE
andPACKED_FORMAT
are respectivelyDFTI_COMPLEX_COMPLEX
andDFTI_CCE_FORMAT
. These values are set by default and require the setting of theINPUT_STRIDE
andOUTPUT_STRIDE
parameters before calling commit.In the case of a real forward domain, arbitrary strides and batch distances are not supported for multi-dimensional transforms on GPU. Considering the last dimension of the data, every element must be separated from its nearest peer(s) (along another dimension and/or in another batch) by a constant distance. For example, to compute a batched, two-dimensional R2C FFT of size
[N2, N1]
with input strides[0, S2, 1]
(row-major layout with unit elementary stride and no offset),FWD_DISTANCE
must be equal toN2*S2
so that every element is separated from its nearest last-dimension counterpart(s) by a distanceS2
(in this example), even across batches.Transforms on GPU devices may overwrite FFT-irrelevant, padding entries in the output data.
The set_value function cannot be used to change configuration parameters mkl::dft::config_param::FORWARD_DOMAIN
, mkl::dft::config_param::PRECISION
since these are a part of the template. Likewise, mkl::dft::config_param::LENGTHS
is set with the constructor.
All calls to set_value()
must be done before calls to
commit()
. This is because the handle may have been moved to an offloaded device after commit()
.
Function calls needed to configure an FFT descriptor for a particular call to an FFT computation function are summarized in Configuring and Computing an FFT in C/C++.