Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 13344ec7 authored by hhakim's avatar hhakim
Browse files

Minor changes.

- matfaust.quickstart.quick_start() returns the quick_start matrix, useful for the quick start guide.
- Several complements in quick start documentation.

Thanks to Romain Lebarbenchon for its feedback.
parent 073c4dac
No related branches found
No related tags found
No related merge requests found
......@@ -44,21 +44,21 @@ However it's not totally excluded that FAµST works with older or newer versions
## <a name="installation_testing">3. Testing and Troubleshooting<a/>
Normally, after installing, nothing is left to do. The installation process should have seamlessly set up the Faust wrappers for Python and Matlab into your environment.
Neverthless, it could be useful to check that it really worked and set the environment manually if needed like explained below.
Nevertheless, it could be useful to check that it really worked and set the environment manually if needed like explained below.
### 3.1 Testing the Matlab Wrapper
To test whether the FAµST Matlab wrapper auto-setup succeeded at install stage, you can open a terminal and type:
matlab -nodisplay -nojvm -r "import matfaust.FaustFactory;F = FaustFactory.rand(1, 10, .5, 'dense', 'complex');disp(F);exit"
matlab -nodisplay -nojvm -r "import matfaust.FaustFactory;F = FaustFactory.rand(1, 10, .5, 'dense', 'complex'); F"
Note: if Matlab is not set in your PATH environment variable you need to replace `matlab' with its full path
(e.g. on macOS /Applications/Matlab/MATLAB_R2018b.app/bin/matlab)
It works only if you see an output similar to:
Faust size 10x10, density 0.57, nnz_sum 57, 1 factor(s):
- FACTOR 0 (complex) DENSE, size 10x10, density 0.57, nnz 57
Faust size 10x10, density 0.50, nnz_sum 50, 1 factor(s):
- FACTOR 0 (complex) DENSE, size 10x10, density 0.5, nnz 50
>> % other values are possible for density, etc. because of the random generation
Otherwise it didn't work. So here is how to setup the wrapper manually.
......@@ -137,20 +137,18 @@ OK! You can follow the [quick start usage](#usage) now.
Let's test FAµST with the quickstart script, from a matlab terminal type:
>> import matfaust.demo.quickstart.*
>> quick_start
>> A = quick_start
And then type further instructions to test a bit of the FAµST API:
Let's see what variables quickstart script has added.
>> whos
Now call some functions on FAµST object A:
And then call some functions on Faust object A to test a bit of the FAµST API:
>> rcg(A)
>> density(A)
>> get_num_factors(A)
@note if you're wondering what are these functions just consult the inline doc:
>> help A.rcg
Retrieve the product factors:
>> F1 = get_factor(A,1);
......@@ -207,7 +205,7 @@ You can also go through the Python terminal to build a FAµST product and call i
>>> F1 = A.get_factor(0)
>>> F2 = A.get_factor(1)
>>> A.shape
(1000, 2000)
(1000L, 2000L)
Note that the doxygen documentation for the Python API is also available locally after installing Faust. You can consult it from your web browser: [@CMAKE_INSTALL_PREFIX@/doc/html/namespacepyfaust.html](file://@CMAKE_INSTALL_PREFIX@/doc/html/namespacepyfaust.html).
......
......@@ -13,6 +13,7 @@ Likewise, if Matlab has not been installed in its default path, then it's most l
After installing the package, you'll need to restart your Matlab or Python session in order to take into account the new configuration of your environment.
After installing the package, you'll need to restart your Matlab or Python session in order to take into account the new configuration of your environment. Of course if you want to use only the Python wrapper you don't need to worry about setting the PATH environment for Matlab and conversely. But note that if later you change your mind and want FAµST for the both languages you'll just need to relaunch the installer.
......@@ -9,7 +9,7 @@ Alternatively, you can also proceed with the following command in a cmd.exe prom
:: with administrator being the name of an account with Administrator rights
</code></pre>
<b>WARNING:</b> For the installation process to succeed you should have Matlab and Python (relevant version) set in your PATH environment variable (you can update it in Windows parameters).
<b>WARNING:</b> For the installation process to succeed you should have Matlab or Python (relevant version) set in your PATH environment variable (you can update it in Windows parameters). Of course if you want to use only the Python wrapper you don't need to worry about setting the PATH environment for Matlab and conversely. But note that if later you change your mind and want FAµST for the both languages you'll just need to relaunch the installer.
After installing the package, you'll need to restart your Matlab or Python session in order to take into account the new configuration of your environment.
......
......@@ -22,7 +22,7 @@ It remains now to install pyfaust in this environment.
All the dependencies will be downloaded and installed by the command above.
You can launch a test python command to valid the installation:
You can launch a test python command to validate the installation:
$ python -c 'from pyfaust import version; print(version())'
......
......@@ -135,7 +135,7 @@ classdef quickstart
%==========================================================================
%> This demo shows that a Faust is handled as matlab builtin matrix, presenting functions that are overloaded by the Faust class (size, mtimes, transpose...) and ends with a little time comparison to illustrate the speed-up of using a Faust for multiplication.
%==========================================================================
function quick_start()
function A = quick_start()
import matfaust.Faust
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment