arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.03000cs.MS
收藏

Armadillo:一种高效的数值线性代数框架

Armadillo: An Efficient Framework for Numerical Linear Algebra

Data61 / CSIRO(Data61 / 澳大利亚联邦科学与工业研究组织);Griffith University(格里菲斯大学);NumFOCUS Inc.(NumFOCUS公司)

Conrad Sanderson, Ryan Curtin

AI总结:

Armadillo通过模板元编程优化线性代数表达式,提供高效的C++线性代数库,提升科学计算应用的性能与易用性。

摘要:

在科学软件解决方案的部署过程中,将研究原型适应到生产级代码是一个主要挑战。尽管像MATLAB这样的高级语言有助于快速原型设计,但它们缺乏可扩展生产应用所需的资源效率,需要转换为如C++这样的低级语言。此外,对于机器学习和信号处理应用,底层的线性代数原语通常由标准BLAS和LAPACK库提供,但这些库使用起来笨拙且难以操作,需要手动内存管理和其他繁琐操作。为了解决这一挑战,Armadillo C++线性代数库提供了一个直观的接口,用于编写线性代数表达式,这些表达式可以轻松编译成高效的生产级实现。我们描述了在Armadillo中实现的表达式优化,利用模板元编程。我们证明这些优化在各种基准线性代数表达式上带来了显著的效率提升。

英文摘要:

A major challenge in the deployment of scientific software solutions is the adaptation of research prototypes to production-grade code. While high-level languages like MATLAB are useful for rapid prototyping, they lack the resource efficiency required for scalable production applications, necessitating translation into lower level languages like C++. Further, for machine learning and signal processing applications, the underlying linear algebra primitives, generally provided by the standard BLAS and LAPACK libraries, are unwieldy and difficult to use, requiring manual memory management and other tedium. To address this challenge, the Armadillo C++ linear algebra library provides an intuitive interface for writing linear algebra expressions that are easily compiled into efficient production-grade implementations. We describe the expression optimisations we have implemented in Armadillo, exploiting template metaprogramming. We demonstrate that these optimisations result in considerable efficiency gains on a variety of benchmark linear algebra expressions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑