The C code printer should be a simple structure-recursive algorithm and not contain any transformation logic, nor should infer or compute any additional information from the AST.
Code printing is currently implemented in emission.py
. The printer should be kept minimial.
The CPrinter
class is implemented as a visitor over the AST nodes and calls an instance of pymbolic's CCodeMapper to print expressions.
An extension of the printer for specific vector instruction sets, etc., should not be necessary: instead, all intrinsics, function calls, etc. should be modelled using pymbolic's FunctionSymbol
and Call
nodes.
Linked Items
Linked Items
Link items together to show that they're related or that one is blocking others. Learn more.