Right now I do run-time switching between the legacy and the gemm-based implementation based on the matrix size.
This incurs a slight overhead because of the extra branch, but this is the best tradeoff I was able to come up.
I'd rather avoid introducing a new function for multiplying matrices, as there are already five ways to do that in ublas. So it is already way more confusing than it should be.
I could change the branch to a compile-time one for matrix types where compile-time size information is available, but I am unsure of how widely those matrix types are used. (I've never seen anybody using anything else than vanilla matrix.) If you (or anybody) would be interested in such a feature, then please let me know.
On Monday, 7 March 2016, 17:56, Riccardo Rossi <rrossi@cimne.upc.edu> wrote:
Hi,
just to give my two cents, some care shall be taken so that there is no overhead for very small matrices (say 3*3)
cheers
Riccardo