DFTDescriptor#

class numpy::DFTDescriptor#

numpy C++ class.

Example#

#include <numpy/np_ndarray.h>
using namespace numpy;

// Use DFTDescriptor
DFTDescriptor obj;
// ... operations ...

Constructors#

Signature

Location

Example

DFTDescriptor(const DFTDescriptor &)

NP_MKL_FFT.H:88

noexcept DFTDescriptor(DFTDescriptor &&other)

NP_MKL_FFT.H:91

Operators#

Signature

Return Type

Location

Example

DFTDescriptor & operator=(const DFTDescriptor &)

DFTDescriptor &

NP_MKL_FFT.H:89

DFTDescriptor & noexcept operator=(DFTDescriptor &&other)

DFTDescriptor & noexcept

NP_MKL_FFT.H:95

Construction#

Signature

Return Type

Location

Example

void create_1d(DFTI_CONFIG_VALUEprecision, DFTI_CONFIG_VALUEdomain, MKL_LONGlength)

void

NP_MKL_FFT.H:115

void create_nd(DFTI_CONFIG_VALUEprecision, DFTI_CONFIG_VALUEdomain, const std::vector<MKL_LONG>&dimensions)

void

NP_MKL_FFT.H:128

Indexing / Selection#

Signature

Return Type

Location

Example

DFTI_DESCRIPTOR_HANDLE get()

DFTI_DESCRIPTOR_HANDLE

NP_MKL_FFT.H:227

View

Type Checking#

Signature

Return Type

Location

Example

bool is_valid()

bool

NP_MKL_FFT.H:222

Other Methods#

Signature

Return Type

Location

Example

void commit()

void

NP_MKL_FFT.H:157

void compute_backward(void \*inout)

void

NP_MKL_FFT.H:190

void compute_backward(void \*input, void \*output)

void

NP_MKL_FFT.H:201

void compute_forward(void \*inout)

void

NP_MKL_FFT.H:168

void compute_forward(void \*input, void \*output)

void

NP_MKL_FFT.H:179

void reset()

void

NP_MKL_FFT.H:212

View

void set_value(DFTI_CONFIG_PARAMparam, Tvalue)

void

NP_MKL_FFT.H:145

Code Examples#

The following examples are extracted from the test suite.

get (np_test_1_all.cpp:28526)
28516      std::cout << " -> tests passed" << std::endl;
28517    }
28518
28519    void np_test_indexing_mask_indices() {
28520      std::cout << "========= mask_indices: triangular mask indices =======================";
28521
28522      // Get upper triangular indices for 3x3 matrix
28523      auto triu_idx = numpy::mask_indices(3, "triu", 0);
28524
28525      // Should return tuple of 2 arrays
28526      bool passed = (std::get<0>(triu_idx).getSize() > 0);
28527      passed = passed && (std::get<1>(triu_idx).getSize() > 0);
28528      passed = passed && (std::get<0>(triu_idx).getSize() == std::get<1>(triu_idx).getSize());
28529
28530      // Get lower triangular indices
28531      auto tril_idx = numpy::mask_indices(3, "tril", 0);
28532      passed = passed && (std::get<0>(tril_idx).getSize() > 0);
28533      passed = passed && (std::get<1>(tril_idx).getSize() > 0);
28534
28535      if (!passed) {
28536        std::cout << "  [FAIL] : in np_test_indexing_mask_indices() : Mask indices incorrect";
reset (np_test_2_all.cpp:22610)
22600      // Count iterations
22601      size_t outer_count = 0;
22602      size_t total_inner_count = 0;
22603      for (; !outer.is_finished(); ++outer) {
22604        size_t inner_count = 0;
22605        for (; !inner.is_finished(); ++inner) {
22606          inner_count++;
22607          total_inner_count++;
22608        }
22609        outer_count++;
22610        inner.reset();
22611      }
22612
22613      if (outer_count != 3 || total_inner_count != 12) {
22614        std::cout << "  [FAIL] : Iteration counts incorrect";
22615        throw std::runtime_error("np_test_nested_iters_basic failed");
22616      }
22617
22618      std::cout << " -> tests passed" << std::endl;
22619    }