|
|
@@ -1,20 +1,16 @@
|
|
|
"""
|
|
|
A module that allows the creation of a C file, in which the block's computations are inlined.
|
|
|
Additional library files will be created to allow for linking:
|
|
|
- - lsolve.c
|
|
|
- - lsolve.h
|
|
|
|
|
|
-The :code:`template.c` file is the jinja template file.
|
|
|
+- lsolve.c
|
|
|
+- lsolve.h
|
|
|
|
|
|
-Note:
|
|
|
- To compile the generated code, execute
|
|
|
|
|
|
- ```
|
|
|
- gcc <filename>.c lsolve.c -lm
|
|
|
- ```
|
|
|
+Requires `Jinja2 <https://jinja.palletsprojects.com/en/3.0.x/>`_.
|
|
|
+The :code:`template.c` file is the jinja template file.
|
|
|
|
|
|
-Requires:
|
|
|
- - `Jinja2 <https://jinja.palletsprojects.com/en/3.0.x/>`_
|
|
|
+Note:
|
|
|
+ To compile the generated code, execute :code:`gcc <filename>.c lsolve.c -lm`.
|
|
|
"""
|
|
|
from CBD.scheduling import TopologicalScheduler
|
|
|
from CBD.solver import GaussianJordanLinearSolver
|
|
|
@@ -35,7 +31,7 @@ class CBD2C:
|
|
|
:code:`itcnt * delta`.
|
|
|
|
|
|
Note:
|
|
|
- This class does *not* change the original model.
|
|
|
+ This class does **not** change the original model.
|
|
|
|
|
|
Warning:
|
|
|
This class only works if the dependency graph is fixed
|
|
|
@@ -168,11 +164,7 @@ class CBD2C:
|
|
|
Generates the C file and copies the sources for the
|
|
|
lsolve library in the same folder.
|
|
|
|
|
|
- To compile the generated code, execute
|
|
|
-
|
|
|
- ```
|
|
|
- gcc <filename>.c lsolve.c -lm
|
|
|
- ```
|
|
|
+ To compile the generated code, execute :code:`gcc <filename>.c lsolve.c -lm`.
|
|
|
|
|
|
Args:
|
|
|
fname (str): The filename of the C-code.
|