04 Tutorial: advanced topics

    xiaoxiao2023-10-02  160

    Tutorial: advanced topics

    This tutorial goes into more detail about the internals of computations and transformations, describing how to write them.

    Mako basics

    Reikna uses Mako extensively as a templating engine for transformations and computations. For the purpose of this tutorial you only need to know several things about the synthax:

    Most of Mako synthax is plain Python, with the set of global variables specified externally by the code doing the template rendering${expr} evaluates Python expression expr, calls str() on the result and puts it into the texta pair of <% and %> executes Python code inside, which may introduce some local variablesa pair of <
    转载请注明原文地址: https://yun.8miu.com/read-107132.html
    最新回复(0)