Skip to content

Commit

Permalink
Add description of macros in README
Browse files Browse the repository at this point in the history
  • Loading branch information
12ff54e committed Apr 8, 2024
1 parent ffe8295 commit fa1fcaa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0)
project(
BSplineInterpolation
VERSION 1.3.0
VERSION 1.3.1
HOMEPAGE_URL "https://github.com/12ff54e/BSplineInterpolation.git"
LANGUAGES CXX)
include(CTest)
Expand Down
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,18 @@ InterpolationFunction<double, 2> func(
```
Note: this project follows [Semantic Version 2.0.0](https://semver.org/) so the interface will be compatible within one major version.
### Modify Library's Behavior
You can control the bahavior of this library by defining the following macros:
- `INTP_TRACE`, `INTP_DEBUG`: Defines levels of logging, with decreasing verbosity.
- `INTP_MULTITHREAD`: Multi-threading in solving control points.
- `INTP_ENABLE_ASSERTION`: Add assertion to ensure data to be interplolated is valid.
- `INTP_PERIODIC_NO_DUMMY_POINT`: Whether to accept dummy point when interpolating periodic data. If this macro is defined, number of data point is one less than the specified dimension, since the last point is implicitly set as the same of the first one.
- `INTP_STACK_ALLOCATOR`: Use stack allocator in some small dynamic memory allocation scenario.
By default all of the above macros is not defined.
### Matlab Interface
Check matlab/Example.m for instructions. Please notice that matlab/bspline.mexw64 is compiled for windows platform, you may need to compile your own MEX file from bspline.cpp (basically a wrapper) on other platforms.
Expand All @@ -53,7 +65,7 @@ Check matlab/Example.m for instructions. Please notice that matlab/bspline.mexw6
## Known Issues
- No
- Not found yet
## Future Plan
Expand Down
4 changes: 4 additions & 0 deletions src/include/Interpolation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#include <cmath> // ceil
#include <initializer_list>

#ifdef INTP_TRACE
#define INTP_DEBUG
#endif

#include "InterpolationTemplate.hpp"

namespace intp {
Expand Down

0 comments on commit fa1fcaa

Please sign in to comment.