Mike (core.matrix author) has been adjusting the API according to his needs and those of other users. I don't think anyone will disagree with the statement that good APIs are shaped by usage and keeping things simple. That said, I see no reason why there shouldn't be a common API which is higher level and more convenient than BLAS/LAPACK.
On Saturday, June 20, 2015 at 1:28:09 PM UTC-4, Mars0i wrote: > > Dragan, this just occurred to me--a small comment about the slow speed > that I reported > <https://groups.google.com/forum/#!topic/numerical-clojure/WZ-CRchDyl8> > from clatrix, which you mentioned earlier. I'm not sure whether the slow > speed I experienced on 500x500 matrices itself provides evidence for > general conclusions about using the core.matrix api as an interface to > BLAS. There was still a lot of work to be done on clatrix at that > point--maybe there still is. My understanding is that clatrix supported > the core.matrix api at that stage, but it was known that it didn't do so in > an optimized way, in many respects. Optimizing remaining areas was left > for future work. > Besides the call overhead involved, there are two places where speed performance is likely to suffer when using core.matrix with a native lib: copying/duplicating matrix data and mismatch between core.matrix operations and BLAS/LAPACK operations. The first is fixed by taking the approach Dragan has with Neanderthal, use a buffer which is shared by both the native lib and JVM code. The second is hypothetical, at least I don't have enough familiarity with the BLAS/LAPACK API to quickly identify a problem. Examples of these would be helpful. > I think your general point doesn't depend on my experience with clatrix a > year ago, however. I understand you to be saying that there are some > coding strategies that provide efficient code with BLAS and LAPACK, and > that are easy to use in Neanderthal, but that are difficult or impossible > using the core.matrix api. > Again, there should be examples. I agree with Dragan that better API documentation for core.matrix should exist. That said, there's only one file you need to look at (matrix.clj, https://github.com/mikera/core.matrix/blob/develop/src/main/clojure/clojure/core/matrix.clj) and it should be straightforward for anyone interested to identify functions which would introduce inefficiencies for BLAS/LAPACK libraries. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.