Pythran is a Python-to-C++ compiler for a subset of Python that includes partial numpy support. It acts a little like Numba and Cython—you annotate a function’s arguments, and then it takes over with further type annotation and code specialization. It takes advantage of vectorization possibilities and of OpenMP-based parallelization possibilities.
在一些例子中,我展示了如何从python内部使用它来优化它,但是我想知道是否有可能使用它将python代码翻译成c++。。。你知道吗
它能做到吗? 如果我想使用的函数依赖于另一个呢? 如果其他函数是从单独的模块导入的呢? 有这样一个过程的例子/教程吗?你知道吗
Jean Laroche的一篇博文正好实现了你想要做的:https://serge-sans-paille.github.io/pythran-stories/pythran-as-a-bridge-between-fast-prototyping-and-code-deployment.html
相关问题 更多 >
编程相关推荐