DFT-related scoped enumeration types#
The following scoped enumeration types, defined in the oneapi::math::dft
namespace, are used for constructing and configuring descriptor
objects
consistently with the DFT(s) they are meant to define. The usage of prepended
namespace specifiers oneapi::math::dft
is omitted below for conciseness.
Scoped enumeration type |
Description |
---|---|
|
Type for the floating-point format to be used in the desired DFT
calculations (for arithmetic operations and data representation). A
template parameter |
|
Type for the kind of forward domain for the desired DFT calculations.
A template parameter |
|
Type for configuration parameters of |
|
Type for non-numeric configuration values corresponding to some of the configuration parameters. |
precision
#
Values in this scoped enumeration type represent the floating-point format to be used for the desired DFT(s). The same format is to be used for the user-provided data, the computation being carried out by oneMath and the delivered results.
Syntax
namespace oneapi::math::dft {
enum class precision {
SINGLE,
DOUBLE
};
}
|
Description |
---|---|
|
Single-precision floating-point format (FP32) is used for data representation and arithmetic operations. |
|
Double-precision floating-point format (FP64) is used for data representation and arithmetic operations. |
domain
#
Values in this scoped enumeration type represent the kind of forward domain for the desired DFT(s). As explained in the introduction, the backward domain type is always complex.
Syntax
namespace oneapi::math::dft {
enum class domain {
REAL,
COMPLEX
};
}
|
Description |
---|---|
|
The forward domain is the set of real \(d\)-dimensional sequences. |
|
The forward domain is the set of complex \(d\)-dimensional sequences. |
config_param
#
Values in this scoped enumeration type represent configuration parameters for
descriptor
objects.
namespace oneapi::math::dft {
enum class config_param {
// read-only parameters:
FORWARD_DOMAIN,
DIMENSION,
LENGTHS,
PRECISION,
COMMIT_STATUS,
WORKSPACE_EXTERNAL_BYTES,
// writable parameters:
FORWARD_SCALE,
BACKWARD_SCALE,
NUMBER_OF_TRANSFORMS,
COMPLEX_STORAGE,
PLACEMENT,
FWD_STRIDES,
BWD_STRIDES,
INPUT_STRIDES, // deprecated
OUTPUT_STRIDES, // deprecated
FWD_DISTANCE,
BWD_DISTANCE,
WORKSPACE_PLACEMENT
};
}
Configuration parameters represented by config_param::FORWARD_DOMAIN
and
config_param::PRECISION
are associated with configuration values of type
domain
and precision
respectively. Other configuration parameters are
associated with configuration values of type config_value
or of a native
type like std::int64_t
, std::vector<std::int64_t>
, float
or
double
. This is further specified in the following table.
|
Represented configuration parameter |
Type of associated configuration value
[default value]
|
---|---|---|
|
Kind of forward domain for the DFT. This parameter is read-only. |
domain |
|
Dimension \(d\) of the DFT. This parameter is read-only. |
std::int64_t [\(d\)]
|
|
Lengths \(\lbrace n_1, \ldots, n_d\rbrace\) of the DFT. This parameter is read-only and can only be set via the parameterized constructors. |
std::vector<std::int64_t> of size \(d\) or, if \(d = 1\), std::int64_t [
std::vector<int64_t>({n_1,...,n_d}) ] |
|
Floating-point format to use for the DFT data and computation. This parameter is read-only. |
precision |
|
Status flag indicating whether the object is ready for computations
after a successful call to its |
config_value (possible values are config_value::COMMITTED or config_value::UNCOMMITTED ).[
config_value::UNCOMMITTED ] |
|
\(\sigma_{\delta}\) for the forward DFT (\(\delta = -1\)). |
float (resp. double ) for single-precision (resp. double-precision) descriptors[\(1.0\)]
|
|
\(\sigma_{\delta}\) for the backward DFT (\(\delta = +1\)). |
float (resp. double ) for single-precision (resp. double-precision) descriptors[\(1.0\)]
|
|
Batch size \(M\). This is relevant (and must be set) for batched DFT(s), i.e., if \(M > 1\). |
std::int64_t [\(1\)]
|
|
Data storage type used (relevant for complex descriptors only). |
config_value (possible values are config_value::COMPLEX_COMPLEX or config_value::REAL_REAL )[
config_value::COMPLEX_COMPLEX ] |
|
Parameter specifying whether the DFT calculations should be done in-place (results overwriting the input data) or out-of-place (input and output in separate data containers having no common elements).
Note: even for out-of-place configurations, some implementations may not preserve the original input data.
|
config_value (possible values are config_value::INPLACE or config_value::NOT_INPLACE )[
config_value::INPLACE ] |
|
Offset and strides defining the layout within a given data sequence in the forward domain. |
std::vector<std::int64_t> of size \((d+1)\)[see the dedicated section]
|
|
Offset and strides defining the layout within a given data sequence in the backward domain. |
std::vector<std::int64_t> of size \((d+1)\)[see the dedicated section]
|
|
Offset and strides defining the layout within a given input data sequence. |
std::vector<std::int64_t> of size \((d+1)\)[
std::vector<std::int64_t>(d+1, 0) ] |
|
Offset and strides defining the layout within a given output data sequence. |
std::vector<std::int64_t> of size \((d+1)\)[
std::vector<std::int64_t>(d+1, 0) ] |
|
Distance in number of elements of implicitly-assumed data type between forward-domain entries \(\left(\cdot\right)^{m}_{k_1, k_2, \ldots, k_d}\) and \(\left(\cdot\right)^{m + 1}_{k_1, k_2, \ldots, k_d}\) for all \(0\leq m < M - 1\) and \(\left(k_1, k_2, \ldots, k_d\right)\) in valid range. This is relevant (and must be set) for batched DFT(s), i.e., if \(M > 1\). |
std::int64_t [\(0\)]
|
|
Distance in number of elements of implicitly-assumed data type between backward-domain entries \(\left(\cdot\right)^{m}_{k_1, k_2, \ldots, k_d}\) and \(\left(\cdot\right)^{m + 1}_{k_1, k_2, \ldots, k_d}\) for all \(0\leq m < M - 1\) and \(\left(k_1, k_2, \ldots, k_d\right)\) in valid range. This is relevant (and must be set) for batched DFT(s), i.e., if \(M > 1\). |
std::int64_t [\(0\)]
|
|
Some FFT algorithm computation steps require a scratch space for permutations or other purposes. This parameter controls whether this scratch space is automatically allocated or provided by the user. |
config_value (possible values are config_value::WORKSPACE_AUTOMATIC or config_value::WORKSPACE_EXTERNAL ).[
config_value::WORKSPACE_AUTOMATIC ] |
|
The required minimum external workspace size for use by the
|
std::int64_t [N/A]
|
config_value
#
Values in this scoped enumeration type represent possible non-numeric configuration values associated with some configuration parameters.
namespace oneapi::math::dft {
enum class config_value {
// for config_param::COMMIT_STATUS
COMMITTED,
UNCOMMITTED,
// for config_param::COMPLEX_STORAGE,
COMPLEX_COMPLEX,
REAL_REAL,
// for config_param::PLACEMENT
INPLACE,
NOT_INPLACE
// For config_param::WORKSPACE_PLACEMENT
WORKSPACE_AUTOMATIC,
WORKSPACE_EXTERNAL,
};
}
|
Description |
---|---|
COMMITTED UNCOMMITTED |
Possible configuration values associated with the configuration
parameter |
COMPLEX_COMPLEX REAL_REAL |
Possible configuration values associated with the configuration
parameter |
INPLACE NOT_INPLACE |
Possible configuration values associated with the configuration
parameter |
WORKSPACE_AUTOMATIC WORKSPACE_EXTERNAL |
Possible configuration values associated with the configuration
parameter |
Parent topic: Discrete Fourier Transform Functions