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
Copy file name to clipboardExpand all lines: README.md
+35Lines changed: 35 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,6 +252,41 @@ fpm run --example prog
252
252
with `prog` being the name of the example program (e.g., `example_sort`).
253
253
254
254
255
+
### Preprocessing macros and flags
256
+
257
+
`stdlib` uses two preprocessing steps:
258
+
259
+
-*fypp* for meta-programming (templating and feature selection)
260
+
-*C* preprocessing (activated through compiler flags like `-cpp`(GNU) or `-fpp`(Intel) or use of uppercase file suffix .F90) for conditional compilation
261
+
262
+
*fypp* preprocessing macros and flags are supported through `CMake` or the `python` script `config/fypp_deployment.py`.
263
+
*C* preprocessing macros and flags are supported through `CMake` and `fpm`.
264
+
265
+
The table below lists all *fypp* preprocessing macros and flags currently used by `stdlib`:
266
+
267
+
| Macro/flag Name | Comments |
268
+
| --- | --- |
269
+
|`MAXRANK`| Maximum array rank generated by templates. Set via CMake `-DCMAKE_MAXIMUM_RANK=<n>` (passed to fypp as `-DMAXRANK=<n>`), or via fypp deployment script `--maxrank <n>`. |
270
+
|`VERSION90`| Defines the default maximum rank generated when `MAXRANK` is not defined. If defined, the maximum rank generated is 7; otherwise it is 15. Can be passed to fypp as `-DVERSION90` (CMake sets this automatically in some configurations). |
271
+
|`WITH_CBOOL`| Enables `c_bool` logical support if available. CMake auto-detects this and passes it to fypp; can be overridden at configure time with `-DWITH_CBOOL=ON/OFF`. |
272
+
|`WITH_QP`| Enables quadruple precision code generation (`real(qp)`, `complex(qp)`). CMake auto-detects this and passes it to fypp; can be overridden at configure time with `-DWITH_QP=ON/OFF`; fypp deployment script: `--with_qp`. |
273
+
|`WITH_XDP`| Enables extended double precision code generation (`real(xdp)`, `complex(xdp)`). CMake auto-detects this and passes it to fypp; can be overridden at configure time with `-DWITH_XDP=ON/OFF`; fypp deployment script: `--with_xdp`. |
274
+
|`WITH_ILP64`| Enables generation of 64-bit integer (ILP64) size interfaces for BLAS and LAPACK (in addition to the default 32-bit interface). Set via CMake `-DWITH_ILP64=True` or via fypp deployment script `--with_ilp64`. |
275
+
|`PROJECT_VERSION_MAJOR`| Part of the version string passed into fypp templates. Set automatically by CMake from the file `VERSION`. Can be overridden by passing `-DPROJECT_VERSION_MAJOR=<n>`, or via fypp deployment script `--vmajor <n>`. |
276
+
|`PROJECT_VERSION_MINOR`| See `PROJECT_VERSION_MAJOR`. |
277
+
|`PROJECT_VERSION_PATCH`| See `PROJECT_VERSION_MAJOR`. |
278
+
279
+
280
+
The table below lists all *C preprocessing* macros and flags currently used by `stdlib`:
281
+
282
+
| Macro/flag Name | Comments |
283
+
| --- | --- |
284
+
|`STDLIB_EXTERNAL_BLAS`| Links against an external BLAS (32-bit integer interface). Set automatically by CMake when external BLAS/LAPACK are found, or manually via `add_compile_definitions(STDLIB_EXTERNAL_BLAS)`. In fpm: `preprocess.cpp.macros=["STDLIB_EXTERNAL_BLAS"]`. |
285
+
|`STDLIB_EXTERNAL_LAPACK`| Links against an external LAPACK (32-bit integer interface). Usually paired with `STDLIB_EXTERNAL_BLAS`. |
286
+
|`STDLIB_EXTERNAL_BLAS_I64`| Links against an external BLAS with ILP64 (64-bit integer) interfaces. Usually paired with `STDLIB_EXTERNAL_LAPACK_I64`. |
287
+
|`STDLIB_EXTERNAL_LAPACK_I64`| Links against an external LAPACK with ILP64 (64-bit integer) interfaces. |
0 commit comments