3 ms·
On the other hand, it's not necessarily about LAPACK specifically or the 2x2 matrix. On embedded systems image size actually matters because you have to distrib
by jschwartzi 7y ago
On the other hand, it's not necessarily about LAPACK specifically or the 2x2 matrix. On embedded systems image size actually matters because you have to distribute the image to the embedded system and in many cases your systems have like 4k of flash. So if LAPACK costs you 2k of flash just to invert a 2x2 matrix and you can come up with a solution for inverting 2x2 matrices easily with 200 bytes of code because you have your Linear Algebra textbook handy, why would you include LAPACK?
In fact even if LAPACK does all linear algebra operations correctly 100% of the time, it also introduces a new paradigm, meaning I have to learn how to do things the LAPACK way which may not be intuitive for the class of problem I have. Or LAPACK may do things correctly for the general case at the cost of CPU time whereas my problem needs to be calculated in real-time, in which case including LAPACK is a net-negative for me.
I think the two schools of programmer divide pretty cleanly into people who assume infinite resources and no CPU time constraints and people who have to make trade-offs between resources and time constraints. Serious embedded programmers will almost never want to just include LAPACK and be done with it unless their problem domain involves a ton of linear algebra. Whereas I've yet to meet a web developer who wouldn't just pull in 400 megabytes of libraries doing god knows what to invert a 2x2 matrix with a function call. There are web developers out there who have to optimize pretty close to what the system is capable of, but most web developers don't really care that much about that because they have infinite computing resources(just spin up more instances!) but they need to release their website "like, yesterday."
So it's not about camps per se. As is everything in engineering, it's about trading a resource you have in abundance for a resource that is scarce. For embedded programmers, the real-time requirements and storage capabilities of the MCU are king and they'll gladly spend all the time in the world rolling their own 2x2 matrix inverter. And for web developers, their development time is king so it's better to just cobble together something working using LAPACK and move on because they can just reserve a bigger, faster server.