compute_forward<typename descriptor_type, typename_data_type>¶
Computes the forward FFT. This routine belongs to the oneapi::mkl::dft namespace.
Syntax
Using SYCL buffers
void compute_forward<descriptor_type,
data_type>(descriptor_type &desc, cl::sycl::buffer<data_type,
1> &inout);
void compute_forward<descriptor_type, input_type,
output_type>(descriptor_type &desc,
cl::sycl::buffer<input_type, 1> &in,
cl::sycl::buffer<output_type, 1> &out);
Using USM pointers
cl::sycl::event compute_forward<descriptor_type,
data_type>(descriptor_type &desc, data_type* inout, const
cl::sycl::vector_class<cl::sycl::event> &dependencies = {});
cl::sycl::event compute_forward<descriptor_type, input_type,
output_type>(descriptor_type &desc, input_type* in,
output_type* out, const
cl::sycl::vector_class<cl::sycl::event> &dependencies = {});
Include Files
mkl_dfti_sycl.hpp
Description
The compute_forward<typename descriptor_type, typename_data_type> function accepts a descriptor object followed by one or more data parameters. With a successfully configured and committed descriptor, this function computes the forward FFT, that is, the transform with the minus sign in the exponent, δ = -1. This function throws an std::runtime_exception() in the case that it fails.
The FFT descriptor must be properly configured prior to the function call. 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++.
The number of the data parameters that the function requires may vary depending on the configuration of the descriptor. This variation is accommodated by variable parameters.
Input Parameters
Name |
Type |
Description |
---|---|---|
inout, in |
cl::sycl::buffer<input_type, 1> input_type* |
SYCL buffer or USM pointer containing an array of length no less than specified at mkl::dft::Descriptor<mkl::dft::Precision, mkl::dft::Domain>::init call. |
The suffix in parameter names corresponds to the value of the configuration parameter mkl::dft::ConfigParam::PLACEMENT as follows:
inout to INPLACE
in to NOT_INPLACE
Output Parameters
Name |
Type |
Description |
---|---|---|
inout, in |
cl::sycl::buffer<output_type, 1> output_type* |
SYCL buffer or USM pointer containing an array of length no less than specified during construction of the handle. |
The suffix in parameter names corresponds to the value of the configuration parameter mkl::dft::config_param as follows:
inout to INPLACE
out to NOT_INPLACE
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. |
mkl::dft::ErrCode::MEMORY_ERROR |
Internal memory allocation failed. |