线性代数库的Andr​​oid线性代数、Andr、oid

2023-09-07 22:11:15 作者:终究还是放不开

有谁知道这将是一个很好的库中的Andr​​oid(SVD,QR,LU,最小二乘法,逆等)?计算线性代数

Does anyone know what will be a good library for computing linear algebra in Android (SVD, QR, LU, least-squares, inverse, etc) ?

推荐答案

传统的线性代数库在层中实现。 基本线性代数子程序(BLAS)是在底层。 线性代数包(LAPACK)是建立在BLAS之上。这两个层库中的接口规范早在20世纪90年代,和硬件厂商通常为他们的架构提供了各种定制的实现。 LAPACK提供了线性代数库操作(SVD,QR,LU,最小二乘法,逆等),你提到的。在最近几年,一些更加人性化的线性代数库出现(如犰狳,的征),这实际上传统BLAS和LAPACK库提供了一些包装。

The conventional Linear Algebra libraries are implemented in layers. Basic Linear Algebra Subprogram (BLAS) is in the bottom layer. Linear Algebra Package (LAPACK) is built on top of BLAS. The interfaces for these two layer libraries are standardized back in 1990s, and the hardware vendors will usually provide various customized implementations for their architectures. LAPACK provides the linear algebra library operations (SVD, QR, LU, least-squares, inverse, etc) you mentioned. In the most recent years, some more user-friendly linear algebra libraries emerge (e.g. Armadillo, Eigen), which actually provide some wrappers for conventional BLAS and LAPACK library.

JBLAS 只是一个java实现传统BLAS的。 JAMA 也与Java实现的LAPACK样库。这两个库实际上可以在没有Android的打靶。但由于Android编程通常涉及Java中,我们可以使他们在Android上运行。但是,我们不能指望表现出来这些实现的。我的观点是,性能是一个关键因素,因为你调用的库,而不是自己写的,和高性能通常将推动低能耗与Android操作系统的手机平台。

JBLAS is just a java implementation of traditional BLAS. JAMA is also a LAPACK-like library implemented with Java. These two libraries are acutally not targetting at Android. But since Android programming usually involves Java, we can make them work on Android. However, we cannot expect the performance out of these implementations. My argument is that performance is a key factor, since you are invoking the libraries instead of writing it yourself, and high performance will usually boost low energy cost in mobile platforms with Android OS.

虽然上面的线性代数库通常是针对在CPU(如x86架构,操作系统:Linux / Windows的/ MacOS之外),专家们正在取得进展还提​​供完整的协议栈支持在移动平台上(如ARM,操作系统:Android的)。

While the above linear algebra libraries usually target at CPU (e.g. x86 architecture, OS: Linux/Windows/MacOS), experts are now making progress to also provide full stack supports on mobile platforms (e.g. ARM, OS: Android).

我刚刚注意到,高通刚刚发布了自己的类BLAS库 Snapdragon的数学库,它可以在高通定制的ARM架构上运行。随着顶级 LAPACK 链接到它,这些线性代数运算(SVD,QR,LU,least-广场,逆等)可以在Android上实现高性能。

I just notice that Qualcomm just released its own BLAS-like library Snapdragon Math Library, which can run on Qualcomm customized ARM architecture. With the top level LAPACK linking to it, these linear algebra operations (SVD, QR, LU, least-squares, inverse, etc) can be implemented on Android with high performance.