Fill out README

This commit is contained in:
Joel FALCOU 2025-08-14 10:05:37 +02:00
parent 79eb0b00d4
commit 93d2a48d69
3 changed files with 61 additions and 15 deletions

View file

@ -34,7 +34,6 @@ set(ROTGEN_MAX_SIZE "" CACHE STRING "Max matrix number of elements for rotgen (i
include(${ROTGEN_SOURCE_DIR}/cmake/options.cmake)
handle_option(ROTGEN_COMPILE_DEFS)
message(STATUS "[ROGEN] - Compiling with ${ROTGEN_COMPILE_DEFS}")
##======================================================================================================================
## Sources & Public Headers lists

View file

@ -1,24 +1,71 @@
# Rotgen - EIGEN QoL Wrapper
# ROTGEN - Runtime Overlay for EIGEN
Rotgen is a C++20 library that wraps EIGEN and adds some *Quality of Life* options :
**ROTGEN** is a C++20 library that wraps EIGEN and adds some *Quality of Life* options :
+ Limitation of compile-time by forcing the library to use precompiled code and dynamic settings.
+ Limitation of compile-time by de-activating the Expression Tempalte layer.
+ Limitation of unrolling by forcing containers to fall back to dynamic storage above a given size.
+ Limitation of compile-time by de-activating the Expression Template layer.
+ Limitation of unrolling by forcing containers to fall back to dynamic storage above a given static size.
+ Free function versions of some member function from Eigen to promote a more generic programming approach.
Rotgen depends on Eigen v3.4.0.
**ROTGEN** depends on [Eigen v3.4.0](https://eigen.tuxfamily.org/index.php?title=Main_Page).
## Installation
TODO
After cloning this repository, you can setup **ROTGEN** via CMake using the following options:
## Roadmap
TODO
+ `-DROTGEN_FORCE_DYNAMIC=ON` that will precompile the wrapped Eigen functions and types into a shared library - `librotgen`.
+ `-DROTGEN_MAX_SIZE=n` that will limit the total static size of any container to `n`. So, for example, if the library is setup with `-DROTGEN_MAX_SIZE=9`, `rotgen::matrix<float,3,4>` will use a dynamic size Eigen container under the hood while `rotgen::matrix<flaot,2,3>` will still be using static sizes. In this mode, all Eigen expression templates systems are disabled, elmading to all operations ot generate intermediate data.
+ `-DROTGEN_ENABLE_EXPRESSION_TEMPLATES=ON` will re-enable Eigen expression templates systems when paired with `ROTGEN_MAX_SIZE`. If used without `ROTGEN_MAX_SIZE`, `ROTGEN_MAX_SIZE` willbe set to 0, thus forcing all containers to be allocated dynamically.
At configuration time, **ROTGEN** wil display a summary of options used and how they'll affect compialtion flags. For example, the command `cmake . -DROTGEN_MAX_SIZE=16 -DROTGEN_ENABLE_EXPRESSION_TEMPLATES` will output:
```bash
-- ==================== Rotgen Configuration Summary ====================
-- Configuration mode: STATIC
-- Expression Templates: ON
-- Preprocessor flags: -DROTGEN_MAX_SIZE=16 -DROTGEN_ENABLE_EXPRESSION_TEMPLATES
-- ======================================================================
-- Configuring done (0.0s)
-- Generating done (0.0s)
```
While the command `cmake -DROTGEN_FORCE_DYNAMIC=ON` will output:
```bash
-- ==================== Rotgen Configuration Summary ====================
-- Configuration mode: DYNAMIC
-- Reason : No static size options were provided
-- Preprocessor flags: -DROTGEN_FORCE_DYNAMIC
-- ======================================================================
-- Configuring done (0.0s)
-- Generating done (0.1s)
```
Once setup, you can run:
+ `make rotgen` to compile the rotgen library. This is required in all above scenarios.
+ `make install` to install the library binary and headers. Use [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html) to select where you want it to be installed.
+ `make rotgen-test` to run our unit test suite.
## Suppported Features
### Types
The following containers are provided
+ `rotgen::matrix`, which wraps `Eigen::Matrix`.
+ `rotgen::block`, which wraps `Eigen::Block`.
+ `rotgen::map`, which wraps `Eigen::Map`.
+ `rotgen::ref`, which wraps `Eigen::Ref`.
Supported scalar types are `float` and `double`.
### Operations
+ Arithmetic operations on containers/scalars.
+ Block extractions.
+ Data generation interface (i.e `matrix::Zero`, etc...)
## Project status
+ 07/2025 - Beta version in progress.
+ 08/2025 - Version 0.0.1beta
## License
Rotgen is licensed under the Boost Software License
**ROTGEN** is licensed under the Boost Software License
```
Permission is hereby granted, free of charge, to any person obtaining a copy

View file

@ -17,7 +17,7 @@ target_link_libraries(rotgen_test INTERFACE rotgen Eigen3::Eigen)
##======================================================================================================================
## Unit Tests registration
##======================================================================================================================
rotgen_glob_unit(PATTERN "unit/*.cpp" INTERFACE rotgen_test)
rotgen_glob_unit(PATTERN "unit/matrix/*.cpp" INTERFACE rotgen_test)
rotgen_glob_unit(PATTERN "unit/block/*.cpp" INTERFACE rotgen_test)
rotgen_glob_unit(PATTERN "unit/map/*.cpp" INTERFACE rotgen_test)
rotgen_glob_unit(QUIET PATTERN "unit/*.cpp" INTERFACE rotgen_test)
rotgen_glob_unit(QUIET PATTERN "unit/matrix/*.cpp" INTERFACE rotgen_test)
rotgen_glob_unit(QUIET PATTERN "unit/block/*.cpp" INTERFACE rotgen_test)
rotgen_glob_unit(QUIET PATTERN "unit/map/*.cpp" INTERFACE rotgen_test)