I just came across eigen
, a C++ library for Matrices, Vectors and similar. It supports SSE (and others for other platforms) and does this on the fly, with lots of template magic. I currently don't need anything like this, but it's quite interesting reading its documentation: Quite amazing what's going on beneath. It has the same problem as all heavily template based libraries, it's source is incredible complicated and difficult to comprehend if you are not willing to sacrifice a lot of time for this, but still very interesting. If you are looking for a math library, probably worth a look.