> So Dawid, if there were a LinearDenseMatrix that used a strided dense > representation, what that meet your native code needs? Given our > AbstractMatrix data structure and reasonably abstract tests, it would be > pretty easy to build this.
Yes, this would be helpful. I believe it makes a lot of sense to have a strided representation even if you're using Java only -- constant multiplicative offset indexing on arrays gets compiled into efficient native instructions (don't know the corner cases though), whereas [][] will generate unnecessary code to check for NPEs and such. > I think that would make adding JNI or JNA code for some ops pretty easy via > over-rides. My experience, though, is that JNI matrices have to be pretty > big to get any win from JNI and JNA. > Big matrices or lots of computations on smaller ones (as in our decomposition routines). Staszek measured it once, but the speedup is significant for larger data sets. Like I said -- I'm not really desperate for that old native build of Atlas that we have... D.
