Skip to content

Commit d58224a

Browse files
author
Lagrang3
committed
listed all the API methods
1 parent cc09398 commit d58224a

File tree

6 files changed

+219
-14
lines changed

6 files changed

+219
-14
lines changed

api.tex

Lines changed: 199 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,205 @@ \section{Detailed API}
4444
and \verb|halfcomplex_to_real| respectively, where the halfcomplex part is
4545
represented in an array of $n$ complex numbers, hence keeping redundant values.
4646

47+
\subsection{Complex \dft}
48+
49+
\begin{lstlisting}[language=C++]
50+
template< class Complex = std::complex<double>,
51+
class Allocator = std::allocator<Complex> >
52+
class bsl_dft;
53+
\end{lstlisting}
54+
55+
The backends \verb|gsl_dft| and \verb|fftw_dft| behave in the same way as
56+
\verb|bsl_dft|.
57+
58+
\subsubsection{Member functions}
59+
60+
\begin{lstlisting}[language=C++]
61+
template< class Complex, class Allocator >
62+
constexpr bsl_dft<Complex,Allocator>::bsl_dft(
63+
unsigned int n, const Allocator& alloc = Allocator{} );
64+
\end{lstlisting}
65+
\begin{lstlisting}[language=C++]
66+
template<class InputIt,
67+
class OutputIt>
68+
void forward(InputIt first1, InputIt last1, OutputIt d_first);
69+
\end{lstlisting}
70+
\begin{lstlisting}[language=C++]
71+
template<class InputIt,
72+
class OutputIt>
73+
void backward(InputIt first1, InputIt last1, OutputIt d_first);
74+
\end{lstlisting}
75+
\begin{lstlisting}[language=C++]
76+
constexpr std::size_t size() const;
77+
\end{lstlisting}
78+
\begin{lstlisting}[language=C++]
79+
void resize(std::size_t new_size);
80+
\end{lstlisting}
81+
82+
\subsubsection{One-time transform methods}
83+
84+
\begin{lstlisting}[language=C++]
85+
template<class InputIt,
86+
class OutputIt>
87+
void bsl_transform::forward(InputIt first1, InputIt last1, OutputIt d_first);
88+
\end{lstlisting}
89+
\begin{lstlisting}[language=C++]
90+
template<class InputIt,
91+
class OutputIt>
92+
void bsl_transform::backward(InputIt first1, InputIt last1, OutputIt d_first);
93+
\end{lstlisting}
94+
95+
\subsection{Algebraic \dft}
96+
97+
\begin{lstlisting}[language=C++]
98+
template< class T = std::complex<double>,
99+
class Allocator = std::allocator<T> >
100+
class bsl_algebraic_dft;
101+
\end{lstlisting}
102+
103+
Remark: \gsl\ and \fftw\ libraries do not have the equivalent to this type of
104+
transform.
105+
106+
\subsubsection{Member functions}
107+
108+
\begin{lstlisting}[language=C++]
109+
template< class T, class Allocator >
110+
constexpr bsl_algebraic_dft<T,Allocator>::bsl_algebraic_dft(
111+
unsigned int n, T w, const Allocator& alloc = Allocator{} );
112+
\end{lstlisting}
113+
\begin{lstlisting}[language=C++]
114+
template<class InputIt,
115+
class OutputIt>
116+
void forward(InputIt first1, InputIt last1, OutputIt d_first);
117+
\end{lstlisting}
118+
\begin{lstlisting}[language=C++]
119+
template<class InputIt,
120+
class OutputIt>
121+
void backward(InputIt first1, InputIt last1, OutputIt d_first);
122+
\end{lstlisting}
123+
\begin{lstlisting}[language=C++]
124+
constexpr std::size_t size() const;
125+
\end{lstlisting}
126+
127+
% The fact is that the algebraic_dft does have a resize method, but resizing the
128+
% DFT here must be followed with a change of the internal root of unity w. A
129+
% correct resize method here requires two arguments: the new size and the new
130+
% value of w.
131+
% \begin{lstlisting}[language=C++]
132+
% void resize(std::size_t new_size);
133+
% \end{lstlisting}
134+
135+
\subsubsection{One-time transform methods}
136+
137+
\begin{lstlisting}[language=C++]
138+
template<class InputIt,
139+
class OutputIt,
140+
class T>
141+
void bsl_algebraic_transform::forward(
142+
InputIt first1, InputIt last1, OutputIt d_first, const T w);
143+
\end{lstlisting}
144+
\begin{lstlisting}[language=C++]
145+
template<class InputIt,
146+
class OutputIt,
147+
class T>
148+
void bsl_algebraic_transform::backward(
149+
InputIt first1, InputIt last1, OutputIt d_first, const T w);
150+
\end{lstlisting}
151+
152+
\subsection{Real \dft}
153+
154+
\begin{lstlisting}[language=C++]
155+
template< class Real = double,
156+
class Allocator = std::allocator<Real> >
157+
class bsl_rdft;
158+
\end{lstlisting}
159+
160+
The backends \verb|gsl_rdft| and \verb|fftw_rdft| behave in the same way as
161+
\verb|bsl_rdft|.
162+
163+
\subsubsection{Member functions}
164+
165+
\begin{lstlisting}[language=C++]
166+
template< class Real, class Allocator >
167+
constexpr bsl_rdft<Real,Allocator>::bsl_rdft(
168+
unsigned int n, const Allocator& alloc = Allocator{} );
169+
\end{lstlisting}
170+
\begin{lstlisting}[language=C++]
171+
template<class InputIt,
172+
class OutputIt>
173+
void real_to_halfcomplex(InputIt first1, InputIt last1, OutputIt d_first);
174+
\end{lstlisting}
175+
\begin{lstlisting}[language=C++]
176+
template<class InputIt,
177+
class OutputIt>
178+
void real_to_complex(InputIt first1, InputIt last1, OutputIt d_first);
179+
\end{lstlisting}
180+
\begin{lstlisting}[language=C++]
181+
template<class InputIt,
182+
class OutputIt>
183+
void halfcomplex_to_real(InputIt first1, InputIt last1, OutputIt d_first);
184+
\end{lstlisting}
185+
\begin{lstlisting}[language=C++]
186+
template<class InputIt,
187+
class OutputIt>
188+
void complex_to_real(InputIt first1, InputIt last1, OutputIt d_first);
189+
\end{lstlisting}
190+
\begin{lstlisting}[language=C++]
191+
constexpr std::size_t size() const;
192+
\end{lstlisting}
193+
\begin{lstlisting}[language=C++]
194+
void resize(std::size_t new_size);
195+
\end{lstlisting}
196+
197+
\subsubsection{One-time transform methods}
198+
199+
\begin{lstlisting}[language=C++]
200+
template<class InputIt,
201+
class OutputIt>
202+
void bsl_real_transform::real_to_halfcomplex(
203+
InputIt first1, InputIt last1, OutputIt d_first);
204+
\end{lstlisting}
205+
\begin{lstlisting}[language=C++]
206+
template<class InputIt,
207+
class OutputIt>
208+
void bsl_real_transform::real_to_complex(
209+
InputIt first1, InputIt last1, OutputIt d_first);
210+
\end{lstlisting}
211+
\begin{lstlisting}[language=C++]
212+
template<class InputIt,
213+
class OutputIt>
214+
void bsl_real_transform::halfcomplex_to_real(
215+
InputIt first1, InputIt last1, OutputIt d_first);
216+
\end{lstlisting}
217+
\begin{lstlisting}[language=C++]
218+
template<class InputIt,
219+
class OutputIt>
220+
void bsl_real_transform::complex_to_real(
221+
InputIt first1, InputIt last1, OutputIt d_first);
222+
\end{lstlisting}
223+
224+
\subsection{Convolution}
225+
226+
\begin{lstlisting}[language=C++]
227+
template<typename InputIt1,
228+
typename InputIt2,
229+
typename OutputIt>
230+
void bsl_transform::convolution(
231+
InputIt1 first1, InputIt1 last1, InputIt2 first2, OutputIt d_first);
232+
\end{lstlisting}
233+
234+
% template<class RingType = std::complex<double>, class Allocator_t = std::allocator<RingType> >
235+
% using bsl_dft = detail::complex_dft<detail::bsl_backend,RingType,Allocator_t>;
236+
%
237+
% template<class T = double, class Allocator_t = std::allocator<T> >
238+
% using bsl_rdft = detail::real_dft<detail::bsl_rfft_backend,T,Allocator_t>;
239+
%
240+
% template<class RingType = std::complex<double>, class Allocator_t = std::allocator<RingType> >
241+
% using bsl_algebraic_dft = detail::algebraic_dft<detail::bsl_backend,RingType,Allocator_t>;
242+
%
243+
% using bsl_transform = transform< bsl_dft<> >;
244+
% using bsl_algebraic_transform = transform< bsl_algebraic_dft<> >;
245+
% using bsl_real_transform = transform< bsl_rdft<> >;
47246

48247
%proposes the design and implementation of a modern C++ template
49248
%interface for \dft\ within \boostmath\ library. The implementation will consist
@@ -161,14 +360,3 @@ \section{Detailed API}
161360
% %\item (if time permits) with multithreaded capabilities.
162361
% \end{itemize}
163362

164-
\subsection{Future outlook}
165-
Describe the pending issues and plans for improvement:
166-
\begin{itemize}
167-
\item Documentation inside boost,
168-
\item optimization of the Boost routines,
169-
\item multithreading,
170-
\item multidimentional transforms,
171-
\item to work in collaboration with boost.mpi to create distributed memory
172-
transforms to tacke the $D$-dimentional scalability problem proposing a
173-
$D-1$ domain decomposition similar to \cite{pippig_13}.
174-
\end{itemize}

future.tex

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
\section{Future outlook}
2+
Describe the pending issues and plans for improvement:
3+
\begin{itemize}
4+
\item Documentation inside boost,
5+
\item optimization of the Boost routines,
6+
\item multithreading,
7+
\item multidimentional transforms,
8+
\item to work in collaboration with Boost.MPI to create distributed memory
9+
transforms to tacke the $D$-dimentional scalability problem proposing a
10+
$D-1$ domain decomposition similar to \cite{pippig_13}.
11+
\end{itemize}

gsoc-report.tex

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@
8080
\input quickstart
8181
\input state
8282
\input api
83+
\input implementation
8384
\input benchmarks
85+
\input future
8486

8587
\bibliography{biblio}
8688

implementation.tex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
\section{Implementation}

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
VPATH=plots
22
docfiles:=gsoc-report.tex intro.tex state.tex api.tex app_ring.tex \
3-
quickstart.tex benchmarks.tex
3+
quickstart.tex benchmarks.tex future.tex
44
target:=gsoc-report.pdf
55
main:=gsoc-report.tex
66
command:=rubber

quickstart.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
\section{Quickstart}
22

3-
Our interface was designed for easy of use. The user can start performing
3+
Boost.Math.FFT provides an interface to compute Fourier Transforms for different
4+
types using C++ templates.
5+
Its design aims to be easy to use.
6+
For instance the user can start performing
47
complex FFTs by just calling one of the \texttt{std::transform}-like routines
58
\texttt{forward} or \texttt{backward} that correspond to a Discrete Fourier
6-
Transform (DFT) in $\Complex^n$ space with the root of unity
9+
Transform (\dft) in $\Complex^n$ space with the root of unity
710
$\exp(-\frac{2\pi}{n} i)$ and $\exp(\frac{2\pi}{n} i)$ respectively.
811
See listings \ref{ls:complex_dft_transform}
912
\begin{lstlisting}[language=C++,label=ls:complex_dft_transform,caption=Simple complex FFT

0 commit comments

Comments
 (0)