cutcutcodec.core.compilation.sympy_to_torch.printer
Static C compilation of atomic sympy expression.
This is enable to write a C code, compile it with gcc, and import the file as a python function.
It is slowler to initialise than the dynamic version but it is faster to evaluate. This static evaluation do not support broadcasting.
Implemented functions:
sympy.Abs
sympy.Add +
sympy.atan
sympy.cbrt
sympy.cos
sympy.exp
sympy.Max
sympy.Min
sympy.Mul *
sympy.Pow / and **
sympy.sin
sympy.sqrt
Not implemented functions:
sympy.acos
sympy.acosh
sympy.Add + and -
sympy.And
sympy.arg
sympy.asin
sympy.asinh
sympy.atan2
sympy.atanh
sympy.ceiling
sympy.cosh
sympy.Determinant
sympy.Eq
sympy.erf
sympy.floor
sympy.GreaterThan
sympy.HadamardProduct
sympy.im
sympy.LessThan
sympy.log
sympy.loggamma
sympy.MatAdd
sympy.Mod %
sympy.Ne
sympy.Not
sympy.Or
sympy.re
sympy.sign
sympy.sinh
sympy.StrictGreaterThan
sympy.StrictLessThan
sympy.tan
sympy.tanh
sympy.Trace
sympy.Tuple