-
-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Currently, ffcx generates both a header file (.h) and a translation unit file (.c) for a UFL input file. The proposal would be to support a header only mode, which would result in only one header file (.h) containing the definitions. This could be enabled by a flag passed to ffcx', such as --header-only.
This has several advantages
- Allows compile-time inlining of the kernel in C/C++ programs (this is especially useful for low-complexity/low-order kernels).
- C/C++ based testing: to run a test case that depends on a UFL form, it is currently necessary to 1) call
ffcx, 2) compileout.c, 3) includeout.hand 4) link each test that depends on it againstout.c. Especially the linking part requires manual configuration and dependency maintenance. In a headers-only mode, steps 2) and 4) do not exist and the configuration can be done once (i.e. callffcxon all forms to generate headers before compiling test cases, which then include the headers they depend on). - The development process of
ffcxbecomes easier since only one file needs to be monitored and tracked to see effective changes. - Opens the door to experimenting with other compile-time tricks in kernels in the future.
Metadata
Metadata
Assignees
Labels
No labels