You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The library also includes classes for nearest neighbor interpolation (`nearest_interp_1d`, `nearest_interp_2d`, ...). The interfaces are the same as for the linear classes.
67
69
70
+
## Compiling
71
+
72
+
A `fmp.toml` file is provided for compiling finterp with the [Fortran Package Manager](https://github.com/fortran-lang/fpm). For example, to build:
73
+
74
+
```
75
+
fpm build --profile release
76
+
```
77
+
78
+
By default, the library is built with double precision (`real64`) real values. Explicitly specifying the real kind can be done using the following processor flags:
79
+
80
+
Preprocessor flag | Kind | Number of bytes
81
+
----------------- | ----- | ---------------
82
+
`REAL32` | `real(kind=real32)` | 4
83
+
`REAL64` | `real(kind=real64)` | 8
84
+
`REAL128` | `real(kind=real128)` | 16
85
+
86
+
For example, to build a single precision version of the library, use:
87
+
88
+
```
89
+
fpm build --profile release --flag "-DREAL32"
90
+
```
91
+
92
+
To run the unit tests:
93
+
94
+
```
95
+
fpm test
96
+
```
97
+
98
+
To use `finterp` within your fpm project, add the following to your `fpm.toml` file:
finterp = { git="https://github.com/jacobwilliams/finterp.git", tag = "1.3.0" }
108
+
```
109
+
110
+
To generate the documentation using [ford](https://github.com/Fortran-FOSS-Programmers/ford), run: ```ford finterp.md```
111
+
68
112
## Documentation
69
113
70
114
The latest API documentation can be found [here](https://jacobwilliams.github.io/finterp/). This was generated from the source code using [FORD](https://github.com/Fortran-FOSS-Programmers/ford) (note that the included `build.sh` script will also generate these files).
0 commit comments