How many FLOPS(floating point operations) needs to be done in a matriix inverse?
13 views (last 30 days)
Show older comments
How many FLOPS needs to be done in an inverse operation of a square and non-singular matrix according to the MATLAB algorithm? Also how many needs backslash operation? inv(A)=?(how many flops). A\B=?(how many flops). assume "A" an N-by-N matrix and "B" an N-by-M matrix.
0 Comments
Answers (1)
Walter Roberson
on 18 Apr 2011
MATLAB does not impose any time constraint on these operations, so if you want to slow your computer down to one FLOP every 100000 seconds, MATLAB would be happy with that. It just might take a lot of seconds to finish.
No-one does any serious measurement in FLOPs anymore -- it is too much like measuring how fast a car can go by testing it downhill on a 60 degree slope in a fraction of an atmosphere. Best case conditions that no-one is likely to come close to because driving in fractional atmospheres is not a real-world situation.
You cannot even meaningfully measure the number of Floating Point Operations over time in modern systems, as modern systems are working simultaneously on multiple calculations. I am not referring to "multi-core" or "multi-thread", I am referring to matters such as running through several additions while a single division is taking place in another part of the chip: might as well keep all the specialized parts of the chip going simultaneously if there is work available for them.
2 Comments
Walter Roberson
on 19 Apr 2011
You cannot calculate overall performance of your parallel program in that manner. For example, you didn't even ask whether inv() or "\" are already multi-threaded for "sufficiently large" problems.
Have you done any research on parallel computation of inv() or "\" ? There are some operations that can be done faster in parallel than you can do with any serial version of the algorithm.
=====
Probably you should start by mentioning your MATLAB version, and OS, and whether you are using a 32 or 64 bit version.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!