Constructors and destructor

Constructors and destructor#

This page describes the constructors and destructor of the descriptor class template, which belongs to the oneapi::mkl::dft namespace and is declared in oneapi/mkl/dft.hpp (file to be included).

namespace oneapi::mkl::dft {
  template <precision prec, domain dom>
  class descriptor {
  public:
    // parameterized constructors:
    descriptor(std::int64_t length);                 // 1D DFT, only
    descriptor(std::vector<std::int64_t> lengths);
    // destructor:
    ~descriptor();
  }
}

The usage of prepended namespace specifiers oneapi::mkl::dft is omitted below for conciseness.

Parameterized constructors#

The parameterized constructors of any descriptor class allocate memory for an object’s data structures and default-configure it for the precision, forward domain, and length(s) of the transform it defines. These constructors do not trigger any significant computational work in preparation of the DFT that the object defines upon creation; all such tasks are operated when the object is committed to its DFT definition and to a given sycl::queue instance.

Input parameter#

The input parameter of either constructor is detailed in the tables below. The tables use the notations presented in the introduction when referring to parameters of the DFT operation defined by the object.

Parameterized constructor’s input parameter for a descriptor object defining a one-dimensional DFT, i.e., \(d = 1\).#

Name

Type

Description

length

std::int64_t

Value of \(n_{1}\) (length of the one-dimensional DFT)

Parameterized constructor’s input parameter for any descriptor object.#

Name

Type

Description

lengths

std::vector<std::int64_t>

Vector of size \(d\), containing \(\lbrace n_{1}, n_{2}, \ldots, n_{d} \rbrace\), in that order (lengths of DFT)

Exceptions#

The parameterized constructors may throw an std::runtime_error if

  • \(d > 3\);

  • the construction of the descriptor object fails to allocate its required resources.

Destructor#

The destructor of any descriptor class frees all resources allocated for and by objects of that class.