基于C++表达式模板的并行符号微分
Compile-Time Symbolic Differentiation Using C++ Expression Templates
摘要:
模板元编程是一种流行的技术,用于实现数值计算的编译时机制。我们演示了如何表达模板可以用于编译时符号微分的代数表达式在C++计算机程序。给定正整数$N$和多变量代数函数,编译器生成函数的$N$阶偏导数的可执行代码。使用递归模板实现导数表达式的并行时间简化。详细的分析表明,目前的C++编译器技术已经足够的实际使用我们的结果,并强调了一些问题,进一步改进可能是可取的。
英文摘要:
Template metaprogramming is a popular technique for implementing compile time mechanisms for numerical computing. We demonstrate how expression templates can be used for compile time symbolic differentiation of algebraic expressions in C++ computer programs. Given a positive integer $N$ and an algebraic function of multiple variables, the compiler generates executable code for the $N$th partial derivatives of the function. Compile-time simplification of the derivative expressions is achieved using recursive templates. A detailed analysis indicates that current C++ compiler technology is already sufficient for practical use of our results, and highlights a number of issues where further improvements may be desirable.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。