compute_forward<typename descriptor_type, typename_data_type>

Computes the forward FFT. 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. With a successfully configured and committed descriptor, this function computes the forward FFT, that is, the transform with the minus sign in the exponent, \(\delta = -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.

API

Syntax

Using SYCL buffers

namespace oneapi::mkl::dft{
  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

namespace oneapi::mkl::dft{
  cl::sycl::event compute_forward<descriptor_type,
  data_type>(descriptor_type &desc, data_type* inout, const
  std::vector<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
  std::vector<cl::sycl::event> &dependencies = {});
}

Include Files

  • oneapi/mkl/dfti.hpp

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