descriptor<precision, domain>::set_value¶
Sets one configuration parameter with the specified configuration value. This routine belongs to the oneapi::mkl::dft namespace.
Syntax
-
template<>
voiddescriptor<prec, dom>
::
set_value
(config_param param, ...)¶
Include Files
mkl_dfti_sycl.hpp
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. For available configuration parameters and the corresponding configuration values, see Config Params.
Note
An important addition to the configuration options for DPC++ FFT interface is mkl::dft::config_param::FWD_DISTANCE, mkl::dft::config_param::BWD_DISTANCE. The FWD_DISTANCE describes the the number of elements between different batched FFTs for forward domain while BWD_DISTANCE describes the number of elements between different batched FFTs for backward domain. It is required for all R2C or C2R transforms to use FWD_DISTANCE and BWD_DISTANCE instead of INPUT_STRIDE and OUTPUT_STRIDE, respectively.
The set_value function cannot be used to change configuration parameters mkl::dft::config_param::FORWARD_DOMAIN, mkl::dft:: config_param::PRECISION, DFTI_DIMENSION 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++.
Input Parameters
Name |
Type |
Description |
---|---|---|
param |
mkl::dft::config_param |
Configuration parameter. |
value |
Depends on the configuration parameter |
Configuration value. |
Output Parameters
Name |
Type |
Description |
---|---|---|
status |
mkl::dft::ErrCode |
Function completion status. |
Return Values
The function returns a value indicating whether the operation was successful or not, and why.
Return Value |
Description |
---|---|
mkl::dft::ErrCode::NO_ERROR |
The operation was successful. |
mkl::dft::ErrCode::BAD_DESCRIPTOR |
DFTI handle provided is invalid. |
mkl::dft::ErrCode::INCONSISTENT_CONFIGURATION/ mkl::dft::ErrCode::INVALID_CONFIGURATION |
An input value provided is invalid. |
mkl::dft::ErrCode::UNIMPLEMENTED |
Functionality requested is not implemented. |