Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9f60fac0 authored by Nicolas Bellot's avatar Nicolas Bellot Committed by hhakim
Browse files

doc latex construct Faust from matrix

parent 53505034
Branches
Tags
No related merge requests found
...@@ -35,7 +35,7 @@ In this script, first of all, a Faust of size 4000x5000 is loaded from a previou ...@@ -35,7 +35,7 @@ In this script, first of all, a Faust of size 4000x5000 is loaded from a previou
\newpage \newpage
\paragraph{}Secondly, a list of overloaded matlab function shows that a Faust is handled as a normal Matlab builtin matrix. \paragraph{}Secondly, a list of overloaded matlab function shows that a Faust is handled as a normal Matlab builtin matrix.
\lstinputlisting[firstline=51,lastline=78,style=customMatlab]{../../misc/demo/Quick_start/quick_start.m} \lstinputlisting[firstline=51,lastline=80,style=customMatlab]{../../misc/demo/Quick_start/quick_start.m}
\paragraph{}Finally, it performs a little time comparison between multiplication by a Faust or its full matrix equivalent. \paragraph{}Finally, it performs a little time comparison between multiplication by a Faust or its full matrix equivalent.
This is in order to illustrate the speed-up induced by the Faust. This speed-up should be around 30 (depending on your machine). This is in order to illustrate the speed-up induced by the Faust. This speed-up should be around 30 (depending on your machine).
...@@ -57,7 +57,9 @@ We generate the parameters of the factorisation from : ...@@ -57,7 +57,9 @@ We generate the parameters of the factorisation from :
\begin{itemize} \begin{itemize}
\item The dimension of A (\textbf{dim1} and \textbf{dim2}), \item The dimension of A (\textbf{dim1} and \textbf{dim2}),
\item \textbf{nb\_factor} the number of factor of the Faust, \item \textbf{nb\_factor} the number of factor of the Faust,
\item \textbf{rcg} the Rational Complexity Gain, which represents the theoretical memory gain and multiplication speed-up of the Faust compared to the initial matrix \item \textbf{rcg} the Rational Complexity Gain, which represents the theoretical memory gain and multiplication speed-up of the Faust compared to the initial matrix .
\\ \\\textbf{WARNING :} A trade-off exists between the RCG/speed-up of the Faust and the data fidelity to the input matrix.
The higher the RCG, the higher the error of the Faust relative to the input matrix
\end{itemize} \end{itemize}
\lstset{style=customBash} \lstset{style=customBash}
...@@ -66,6 +68,7 @@ Then we factorize the matrix \textbf{A} into a Faust \textbf{Faust\_A} ...@@ -66,6 +68,7 @@ Then we factorize the matrix \textbf{A} into a Faust \textbf{Faust\_A}
\lstinputlisting[firstline=58,lastline=59,style=customMatlab]{../../misc/demo/Quick_start/factorise_matrix.m} \lstinputlisting[firstline=58,lastline=59,style=customMatlab]{../../misc/demo/Quick_start/factorise_matrix.m}
And as for quickstart.m, we make some time comparison at the end. And as for quickstart.m, we make some time comparison at the end.
\newpage \newpage
\section{Construct a Faust from its factor}\label{sec:firstUseBuildFactors} \section{Construct a Faust from its factor}\label{sec:firstUseBuildFactors}
To see an example of building a Faust from its factors, you can run construct\_Faust\_from\_factors.m in the Matlab Command Window by typing : To see an example of building a Faust from its factors, you can run construct\_Faust\_from\_factors.m in the Matlab Command Window by typing :
......
...@@ -75,7 +75,9 @@ A_full=full(A); ...@@ -75,7 +75,9 @@ A_full=full(A);
col_2=A(:,2); col_2=A(:,2);
submatrix_A=A(3:5,2:3); submatrix_A=A(3:5,2:3);
submatrix_A=A(2:end,3:end-1); submatrix_A=A(2:end,3:end-1);
% Warning : A(i,j)=3 will not modify A, writing is not allowed
% Warning : A(i,j)=3; will throw an error with this message :
% 'function not implemented for Faust class'
% get the number of non-zeros coefficient % get the number of non-zeros coefficient
nz = nnz(A); nz = nnz(A);
......
%% Description generate_params %% Description generate_params
% Generates parameter of hierarchical_fact from a Matrix, the number of % Generates standard parameter of hierarchical_fact from the dimensions of the input Matrix,
% factor of the factorization and its RCG (Relative Complexity Gain) % the number of factor of the factorization and its RCG (Relative Complexity Gain)
%
% WARNING : A trade-off must be achieved between :
% - the RCG/speed-up of Faust
% - and the data fidelity/relative error to the input matrix to be factorized
% %
% For more information on the FAuST Project, please visit the website of % For more information on the FAuST Project, please visit the website of
% the project : <http://faust.gforge.inria.fr> % the project : <http://faust.gforge.inria.fr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment