chromium/third_party/eigen3/src/unsupported/Eigen/CXX11/src/Tensor/TensorFFT.h

// This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2015 Jianwei Cui <[email protected]>
//
// This Source Code Form is subject to the terms of the Mozilla
// Public License v. 2.0. If a copy of the MPL was not distributed
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

#ifndef EIGEN_CXX11_TENSOR_TENSOR_FFT_H
#define EIGEN_CXX11_TENSOR_TENSOR_FFT_H

// IWYU pragma: private
#include "./InternalHeaderCheck.h"

namespace Eigen {

/** \class TensorFFT
 * \ingroup CXX11_Tensor_Module
 *
 * \brief Tensor FFT class.
 *
 * TODO:
 * Vectorize the Cooley Tukey and the Bluestein algorithm
 * Add support for multithreaded evaluation
 * Improve the performance on GPU
 */

template <bool NeedUprade>
struct MakeComplex {};

template <>
struct MakeComplex<true> {};

template <>
struct MakeComplex<false> {};

template <int ResultType>
struct PartOf {};

template <>
struct PartOf<RealPart> {};

template <>
struct PartOf<ImagPart> {};

namespace internal {
traits<TensorFFTOp<FFT, XprType, FFTResultType, FFTDir>>;

eval<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>, Eigen::Dense>;

nested<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>, 1, typename eval<TensorFFTOp<FFT, XprType, FFTResultType, FFTDirection>>::type>;

}  // end namespace internal

template <typename FFT, typename XprType, int FFTResultType, int FFTDir>
class TensorFFTOp : public TensorBase<TensorFFTOp<FFT, XprType, FFTResultType, FFTDir>, ReadOnlyAccessors> {};

// Eval as rvalue
TensorEvaluator<const TensorFFTOp<FFT, ArgType, FFTResultType, FFTDir>, Device>;

}  // end namespace Eigen

#endif  // EIGEN_CXX11_TENSOR_TENSOR_FFT_H