Introduce COFFEE optimization level parameter
Need an interface to set now hard-wired COFFEE optimization: https://bitbucket.org/fenics-project/ffc/src/6b64700a5458fc3af3369c66e070d1d71eecfc57/ffc/tsfc/tsfcoptimization.py?at=master&fileviewer=file-view-default#tsfcoptimization.py-18.
Also check what #pragma coffee
is for and eventually get rid of it properly: https://bitbucket.org/fenics-project/ffc/src/6b64700a5458fc3af3369c66e070d1d71eecfc57/ffc/tsfc/tsfcgenerator.py?at=master&fileviewer=file-view-default#tsfcgenerator.py-33.
Comments (7)
-
-
- changed title to Introduce COFFEE optimization level parameter
-
reporter This might not be worth of an effort. Lot of COFFEE is being moved to TSFC and optimization interface might change. @miklos1?
-
Yes, the configuration interface will change, as the operation reduction optimisations of COFFEE are being ported by TJ (Tianjiao Sun) to operate on GEM instead.
-
reporter - removed milestone
-
reporter - changed component to tsfc-repr
-
reporter - removed responsible
- Log in to comment
It's another inspiration from C compilers in COFFEE.
#pragma
s are used to tell the compiler extra information that, e.g., helps with some optimisations.#pragma coffee
is to tell things to COFFEE. There are two COFFEE pragmas in use:#pragma coffee expression
marks the root expression, so COFFEE knows what to optimise.#pragma coffee linear loop
marks the argument loops, so COFFEE knows which are the argument indices.For some reason, @FabioLuporini decided to show the former, but hide the latter when printing the AST. It is nice to see them if one needs to debug the COFFEE code generation in C++, otherwise neither means anything to the C compiler.