\doxysection{gko::\+matrix::\+Fft Class Reference}
\hypertarget{classgko_1_1matrix_1_1Fft}{}\label{classgko_1_1matrix_1_1Fft}\index{gko::matrix::Fft@{gko::matrix::Fft}}


This \doxylink{classgko_1_1LinOp}{Lin\+Op} implements a 1D Fourier matrix using the FFT algorithm.  




{\ttfamily \+\#include $<$ginkgo/\+core/\+matrix/\+fft.\+hpp$>$}



Inheritance diagram for gko::\+matrix::\+Fft:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1matrix_1_1Fft__inherit__graph}
\end{center}
\end{figure}


Collaboration diagram for gko::\+matrix::\+Fft:\+
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{classgko_1_1matrix_1_1Fft__coll__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_a7720d205229916182bf2ce6044b86b5c}\label{classgko_1_1matrix_1_1Fft_a7720d205229916182bf2ce6044b86b5c} 
using {\bfseries value\+\_\+type} = std::\+complex$<$double$>$
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_a3aed49020b46d862a8cfc82b1577577b}\label{classgko_1_1matrix_1_1Fft_a3aed49020b46d862a8cfc82b1577577b} 
using {\bfseries index\+\_\+type} = \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}}
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_a4b031763021843f7de2d74a9ca436644}\label{classgko_1_1matrix_1_1Fft_a4b031763021843f7de2d74a9ca436644} 
using {\bfseries transposed\+\_\+type} = Fft
\end{DoxyCompactItemize}
\doxysubsection*{Public Types inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Fft $>$}}}
\begin{DoxyCompactItemize}
\item 
using {\bfseries result\+\_\+type}
\end{DoxyCompactItemize}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Fft_a5a4172a018d9c8236d1168f3852846ab}{transpose}} () const override
\begin{DoxyCompactList}\small\item\em Returns a \doxylink{classgko_1_1LinOp}{Lin\+Op} representing the transpose of the \doxylink{classgko_1_1Transposable}{Transposable} object. \end{DoxyCompactList}\item 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Fft_a5ce1f16dd7ba8593f62e33a18ef62313}{conj\+\_\+transpose}} () const override
\begin{DoxyCompactList}\small\item\em Returns a \doxylink{classgko_1_1LinOp}{Lin\+Op} representing the conjugate transpose of the \doxylink{classgko_1_1Transposable}{Transposable} object. \end{DoxyCompactList}\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_a02431433535aad43cc12982cafefcdc2}\label{classgko_1_1matrix_1_1Fft_a02431433535aad43cc12982cafefcdc2} 
void {\bfseries write} (\doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$ std::\+complex$<$ float $>$, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}} $>$ \&data) const override
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_a2a6c353e0e5d9edbad89a9e23f8f8296}\label{classgko_1_1matrix_1_1Fft_a2a6c353e0e5d9edbad89a9e23f8f8296} 
void {\bfseries write} (\doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$ std::\+complex$<$ float $>$, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}} $>$ \&data) const override
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_abb3bb118bc1989ee773f6e090a828373}\label{classgko_1_1matrix_1_1Fft_abb3bb118bc1989ee773f6e090a828373} 
void {\bfseries write} (\doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$ std::\+complex$<$ double $>$, \doxymbox{\hyperlink{namespacegko_a16bd14c10900eb804d784908d8aab5ab}{int32}} $>$ \&data) const override
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_a6f3ee310e45d7274cf8ebaec631b332e}\label{classgko_1_1matrix_1_1Fft_a6f3ee310e45d7274cf8ebaec631b332e} 
void {\bfseries write} (\doxymbox{\hyperlink{structgko_1_1matrix__data}{matrix\+\_\+data}}$<$ std::\+complex$<$ double $>$, \doxymbox{\hyperlink{namespacegko_a913ec044df518649fa5a891f8dffae34}{int64}} $>$ \&data) const override
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_ad48a8cb302dc7df65b5d84cf8cd7029e}\label{classgko_1_1matrix_1_1Fft_ad48a8cb302dc7df65b5d84cf8cd7029e} 
\doxymbox{\hyperlink{structgko_1_1dim}{dim}}$<$ 1 $>$ {\bfseries get\+\_\+fft\+\_\+size} () const
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_abb98f69d567153bb769f7fe55a8c3078}\label{classgko_1_1matrix_1_1Fft_abb98f69d567153bb769f7fe55a8c3078} 
bool {\bfseries is\+\_\+inverse} () const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnableLinOp}{gko::\+\+Enable\+Lin\+Op$<$ Fft $>$}}}
\begin{DoxyCompactItemize}
\item 
const Fft \texorpdfstring{$\ast$}{*} {\bfseries apply} (\doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ const \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ b, \doxymbox{\hyperlink{classgko_1_1ptr__param}{ptr\+\_\+param}}$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ x) const
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions inherited from \doxymbox{\hyperlink{classgko_1_1EnablePolymorphicAssignment}{gko::\+\+Enable\+Polymorphic\+Assignment$<$ Fft $>$}}}
\begin{DoxyCompactItemize}
\item 
void {\bfseries convert\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) const override
\item 
void {\bfseries move\+\_\+to} (result\+\_\+type \texorpdfstring{$\ast$}{*}result) override
\end{DoxyCompactItemize}
\doxysubsubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static std::\+unique\+\_\+ptr$<$ Fft $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Fft_aa8ff004070669eeb719a5d34b4742428}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec)
\begin{DoxyCompactList}\small\item\em Creates an empty Fourier matrix. \end{DoxyCompactList}\item 
static std::\+unique\+\_\+ptr$<$ Fft $>$ \doxymbox{\hyperlink{classgko_1_1matrix_1_1Fft_aef493daa7e1ac0472b4b26c8f17d8ed6}{create}} (std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$ exec, \doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}} size=0, bool inverse=false)
\begin{DoxyCompactList}\small\item\em Creates an Fourier matrix with the given dimensions. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\Hypertarget{classgko_1_1matrix_1_1Fft_aaf06e0ce24b796ffd36c6ddcf56c04df}\label{classgko_1_1matrix_1_1Fft_aaf06e0ce24b796ffd36c6ddcf56c04df} 
class {\bfseries Enable\+Polymorphic\+Object$<$ Fft, Lin\+Op $>$}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This \doxylink{classgko_1_1LinOp}{Lin\+Op} implements a 1D Fourier matrix using the FFT algorithm. 

It implements forward and inverse DFT.

For a power-\/of-\/two size n with corresponding root of unity $\omega = e^{-2\pi i / n}$ for forward DFT and $\omega = e^{2 \pi i / n}$ for inverse DFT it computes

\[    x_k = \sum_{j=0}^{n-1} \omega^{jk} b_j
\]

without normalization factors.

The Reference and Open\+MP implementations support only power-\/of-\/two input sizes, as they use the Radix-\/2 algorithm by J. W. Cooley and J. W. Tukey, "{}\+An Algorithm for the Machine Calculation of Complex Fourier Series,"{} Mathematics of Computation, vol. 19, no. 90, pp. 297–301, 1965, doi:\+ 10.\+2307/\+2003354. The CUDA and HIP implementations use cu\+SPARSE/\+hip\+SPARSE with full support for non-\/power-\/of-\/two input sizes and special optimizations for products of small prime powers. 

\label{doc-func-members}
\Hypertarget{classgko_1_1matrix_1_1Fft_doc-func-members}
\doxysubsection{Member Function Documentation}
\Hypertarget{classgko_1_1matrix_1_1Fft_a5ce1f16dd7ba8593f62e33a18ef62313}\index{gko::matrix::Fft@{gko::matrix::Fft}!conj\_transpose@{conj\_transpose}}
\index{conj\_transpose@{conj\_transpose}!gko::matrix::Fft@{gko::matrix::Fft}}
\doxysubsubsection{\texorpdfstring{conj\_transpose()}{conj\_transpose()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Fft_a5ce1f16dd7ba8593f62e33a18ef62313} 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ gko::\+matrix::\+\+Fft::\+conj\+\_\+transpose (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Returns a \doxylink{classgko_1_1LinOp}{Lin\+Op} representing the conjugate transpose of the \doxylink{classgko_1_1Transposable}{Transposable} object. 

\begin{DoxyReturn}{Returns}
a pointer to the new conjugate transposed object 
\end{DoxyReturn}


Implements \doxymbox{\hyperlink{classgko_1_1Transposable_a7c230aacdb222f09ba49baf0bd9e82eb}{gko::\+\+Transposable}}.

\Hypertarget{classgko_1_1matrix_1_1Fft_aa8ff004070669eeb719a5d34b4742428}\index{gko::matrix::Fft@{gko::matrix::Fft}!create@{create}}
\index{create@{create}!gko::matrix::Fft@{gko::matrix::Fft}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Fft_aa8ff004070669eeb719a5d34b4742428} 
std::\+unique\+\_\+ptr$<$ Fft $>$ gko::\+matrix::\+\+Fft::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates an empty Fourier matrix. 


\begin{DoxyParams}{Parameters}
{\em exec} & \doxylink{classgko_1_1Executor}{Executor} associated to the matrix\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A smart pointer to the newly created matrix. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Fft_aef493daa7e1ac0472b4b26c8f17d8ed6}\index{gko::matrix::Fft@{gko::matrix::Fft}!create@{create}}
\index{create@{create}!gko::matrix::Fft@{gko::matrix::Fft}}
\doxysubsubsection{\texorpdfstring{create()}{create()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Fft_aef493daa7e1ac0472b4b26c8f17d8ed6} 
std::\+unique\+\_\+ptr$<$ Fft $>$ gko::\+matrix::\+\+Fft::\+create (\begin{DoxyParamCaption}\item[{std::\+shared\+\_\+ptr$<$ const \doxymbox{\hyperlink{classgko_1_1Executor}{Executor}} $>$}]{exec}{, }\item[{\doxymbox{\hyperlink{namespacegko_a9579c98b1d85bf4ad02d7cb5b96fc771}{size\+\_\+type}}}]{size}{ = {\ttfamily 0}, }\item[{bool}]{inverse}{ = {\ttfamily false}}\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Creates an Fourier matrix with the given dimensions. 


\begin{DoxyParams}{Parameters}
{\em size} & size of the matrix \\
\hline
{\em inverse} & true to compute an inverse DFT instead of a normal DFT\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A smart pointer to the newly created matrix. 
\end{DoxyReturn}
\Hypertarget{classgko_1_1matrix_1_1Fft_a5a4172a018d9c8236d1168f3852846ab}\index{gko::matrix::Fft@{gko::matrix::Fft}!transpose@{transpose}}
\index{transpose@{transpose}!gko::matrix::Fft@{gko::matrix::Fft}}
\doxysubsubsection{\texorpdfstring{transpose()}{transpose()}}
{\footnotesize\ttfamily \label{classgko_1_1matrix_1_1Fft_a5a4172a018d9c8236d1168f3852846ab} 
std::\+unique\+\_\+ptr$<$ \doxymbox{\hyperlink{classgko_1_1LinOp}{Lin\+Op}} $>$ gko::\+matrix::\+\+Fft::\+transpose (\begin{DoxyParamCaption}{}{}\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [override]}, {\ttfamily [virtual]}}



Returns a \doxylink{classgko_1_1LinOp}{Lin\+Op} representing the transpose of the \doxylink{classgko_1_1Transposable}{Transposable} object. 

\begin{DoxyReturn}{Returns}
a pointer to the new transposed object 
\end{DoxyReturn}


Implements \doxymbox{\hyperlink{classgko_1_1Transposable_adf04fdf2ed79b117edbef42520bfe8fa}{gko::\+\+Transposable}}.



The documentation for this class was generated from the following file:\+\begin{DoxyCompactItemize}
\item 
ginkgo/\+core/\+matrix/\+fft.\+hpp\end{DoxyCompactItemize}
