Visible to Intel only — GUID: GUID-28F8C8E5-5AA3-4743-A469-14F537F2DE54
Visible to Intel only — GUID: GUID-28F8C8E5-5AA3-4743-A469-14F537F2DE54
compute_forward<typename descriptor_type, typename data_type>
Computes the forward DFT. This routine belongs to the oneapi::mkl::dft namespace.
Description
The compute_forward<typename descriptor_type, typename data_type> function accepts a descriptor object followed by one or more data parameters. Given a successfully configured and committed descriptor, this function computes the forward DFT which is the transform with . This function throws an std::runtime_exception() if it fails.
The DFT descriptor must be properly configured prior to the function call. Function calls needed to configure a DFT descriptor for a particular call to a DFT computation function are summarized in Configuring and computing a DFT in DPC++.
The number of data parameters to be provided depends exclusively on the descriptor’s PLACEMENT configuration parameter. In-place (default) operations require only one data parameter while out-of-place operations take two distinct data parameters. The function’s behavior is undefined otherwise.
Successive computations using the same descriptor must be serialized to guarantee correct results. This can be done by waiting on the queue passed at commit or passing an in-order queue there. Alternatively, repeated use of the same buffer for any argument will also serialize computations using buffers, and computations using USM can be serialized using the returned event and input dependencies. These alternate methods will be more performant in most cases. Where possible, configuring a single descriptor’s NUMBER_OF_TRANSFORMS to perform multiple transforms simultaneously improves performance over successive computations in most cases.
API
Syntax
Using SYCL buffers
namespace oneapi::mkl::dft{
void compute_forward<descriptor_type,
data_type>(descriptor_type &desc, sycl::buffer<data_type,
1> &inout);
void compute_forward<descriptor_type, input_type,
output_type>(descriptor_type &desc,
sycl::buffer<input_type, 1> &in,
sycl::buffer<output_type, 1> &out);
}
Using USM pointers
namespace oneapi::mkl::dft{
sycl::event compute_forward<descriptor_type,
data_type>(descriptor_type &desc, data_type* inout, const
std::vector<sycl::event> &dependencies = {});
sycl::event compute_forward<descriptor_type, input_type,
output_type>(descriptor_type &desc, input_type* in,
output_type* out, const
std::vector<sycl::event> &dependencies = {});
}
Include Files
oneapi/mkl/dfti.hpp
Input Parameters
Name |
Supported types |
Description |
---|---|---|
inout |
|
Input/output data |
in |
|
Input data (forward-domain data) |
The parameter name inout (resp. in) corresponds to using a descriptor configured to operate INPLACE (resp. NOT_INPLACE). See descriptor’s PLACEMENT.
Whether using i. SYCL buffers or ii. device-accessible USM pointers, the length of the containing array must be large enough to fit the default (or otherwise configured) data layouts.
Output Parameters
Name |
Supported types |
Description |
---|---|---|
inout |
|
Input/output data |
out |
|
Output data (backward-domain data) |
The parameter name inout (resp. out) corresponds to using a descriptor configured to operate INPLACE (resp. NOT_INPLACE). See descriptor’s PLACEMENT.
Whether using i. SYCL buffers or ii. device-accessible USM pointers, the length of the containing array must be large enough to fit the default (or otherwise configured) data layouts.
In case of out-of-place complex transforms, the same type is to be used for the parameters in and out.