Commit 014e3f76 authored by CHAMONT David's avatar CHAMONT David
Browse files

pursue renaming and rewrite of Readme

parent f99b85a7
cmake_minimum_required(VERSION 2.8)
project (FastMatrix)
project (Fast5x5)
find_package(Boost REQUIRED)
find_package(Boost.SIMD REQUIRED)
......
# Fast5x5
A linear algebra library which focus on 5x5 operations.
# Fast5x5
## Dependencies
For the basic usage of the library:
* libboost (>= 1.62) with `program_options`
* https://github.com/NumScale/boost.simd.git -b master
A linear algebra library which focus on 5x5 operations.
For the test and benchmarking
* cmake (>= 3.4)
* eigen 3.2.10
* googletest 1.8.0
* R
---
## Using the library
FastMatrix is a template-based header-only library.
That means the only requirement is to correctly add Boost.SIMD and Boost include directory at the list of directories used by your compiler.
#### Dependencies
### Importing
Fast5x5 is a template-based header-only library, relying on Boost (>= 1.62) and
Boost.SIMD (master branch). The only usage requirement is to correctly add Boost.SIMD and
Boost include directory at the list of directories used by your compiler.
#### Importing
There is only one header to import in order to use the library:
```c++
#include "../path/to/Fast5x5/fast5x5.hpp"
```
### Creating a matrix
#### Creating a matrix
In order to create a matrix you need to create a object from the `BaseMatrix<Type, NRows, NCols>` class
where `NRows` and `NCols` are the matrix dimensions.
......@@ -44,7 +39,7 @@ double data[16] {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,160};
BaseMatrix<double, 4, 4> my_matrix(data);
```
### Getting the data back
#### Getting the data back
You can dump the matrix data with the `dump_array()` method.
The returned value is an std::array in row-major order.
......@@ -52,14 +47,14 @@ The returned value is an std::array in row-major order.
std::array<double, 4*4> data = my_matrix.dump_array();
```
### Printing values
#### Printing values
`BaseMatrix` objects are printable with the `<<` operator:
```c++
std::cout << my_matrix << std::endl;
```
### Simple example
#### Simple example
This is a simple example for matrix multiplication.
......@@ -90,12 +85,27 @@ int main (int argc, char **argv) {
}
```
---
## Testing
Testing functionalities of the library is available through a set of unit tests.
Prior running the tests you must build them with cmake.
Building them require to build Boost.SIMD first.
#### Additional dependencies
* cmake (>= 3.4)
* eigen 3.2.10
* googletest 1.8.0
* R
#### Build
For what concerns the external dependencies, if you have Docker installed
on your machine, you can move the main Fast5x5 directory and type
```docker/run.sh```.
```bash
cd /path/to/Fast5x5/
mkdir build && cd build
......@@ -103,6 +113,9 @@ export Boost_DIR=/path/to/boost/root # Only if you didn't install boost from you
cmake -D CMAKE_PREFIX_PATH=path/to/boost.simd_build_dir/ ..
make
```
#### Run
Once the tests are built you can launch them from the test directory.
```bash
test/unit_tests
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment