Dramatically faster Matlab with QLA (beta)
Filed under: Algorithms, Linear Algebra, Numerical Analysis

We recently released the beta version of QLA: The Quick Linear Algebra Library.
QLA provides fast linear algebra in MATLAB, requiring only a regular CPU. For a minuscule sacrifice in accuracy, you get a mammoth increase in speed.
* How fast? Speedups over built-in MATLAB functions range from 10x to 1,000x+ on benchmarks.
* How easy? Just add a ‘q’ in front of your normal function calls – e.g., ‘qsvd(A)’ instead of ’svd(A)’.
* Includes SVD, linear systems, least squares, PCA, and more.
QLA is currently in free public beta. Download and find more details here:
http://massiveanalytics.com
You can also join the QLA discussion here:
http://www.accelereyes.com/forums/viewforum.php?f=15
Enjoy!
Michael Holmes / Massive Analytics
John Melonakos / AccelerEyes
Popularity: 1% [?]
Linear Systems Solver (for small Systems)
SolverNxN is designed to solve many small linear system in a vectorized way in order to improve time perfomaces. It is in practice a faster alternative to the matlab commands:
for k = 1:number_of_systems</span></span>
x=A\b;
end
The Matlab looping speed can visibly slow down this process so most of the time is spent in the for loop and not to solve the system. This is particulary true when A is a small matrix. In this case SolverNxN can be a useful tool.
The speed improvement is more visibile the greater number are the systems and the smaller is their dimension.
The algorithm works assembling all the small elementary systems into a sparse matrix so the \ command is called just one time.
VERY IMPORTANT:
Because of algorithm structure is very important that no system is singular. One singular system can ruin the whole solution. So use this routine only if you are sure all the systems are solvable.
Let’s say we want to solve Nsyst m x m linear systems.
The function call is:
x=SolverNxN(Amxn,b);
INPUTS:
- Amxn: is a matrix of dimensions [m ,(m x Nsyst)], so it is just an horizontal concatenation of the small elementary systems.
- b: is a [(m x Nsyst),1] vector formed by the vertical concatenation of the elematry system vectors.
OUTPUT:
- x: is a [(m x Nsyst),1] vector formed by the vertical concatenation of the elematry system solutions.
Here it is an example:
It is inlcuded a Test for speed comparison, here it is some results:
Program started We are going to solve 1000000 3x3 systems Looping took: 19.6869 s Solver NxN took: 3.1457 s
Residue is 0.0000 Solution is correct!
For question,suggestion,bugs report: giaccariluigi@msn.com
It is brand new so please report problems to my e-mail
Author: Giaccari Luigi
Created: 12/02/2009
Last Update: 12/02/2009
Download Now
| for i=1:number_of_systems | |
| x=A\b; | |
| end | |
Popularity: 6% [?]


















































