@ericlavigne: Hi Eric. Neanderthal currently has (only) native and GPU engines. New version 0.6.0 that is going to be released in a few days comes with a GPU engine that will work on AMD, Nvidia and Intel, and support Linux, Windows, and OS X.
Currently, neanderthal does not come with a pure Java engine. All objects are pure java, but BLAS operations won't work without ATLAS, or GPU.
Such an engine might be added in the future, since it is not too difficult to write it, but I'd prefer to spend the time adding state of the art lapack functionality or sparse matrices instead of working on yet another slow pure Java matrix implementation.
BTW, in the code you linked, there are many, many java boxing/unboxing cases - that'll make it much slower than needed for ML operations.
@ericlavigne: Neanderthal supports Fluokitten's fmap!, fmap, fold and foldmap, and offers primitive mapping and reducing without such conversion. See the guide here: http://neanderthal.uncomplicate.org/articles/fast-map-and-reduce-for-primitive-vectors.html
@blueberry Thanks for the hints. I'll write my own slow Java implementation to cover just a few operations that I need, and also start experimenting with fluokitten and primitive arrays. Looking forward to the next neanderthal version. I'm just getting started now, but I'm sure that speed will be useful in a few weeks.
@ericlavigne: If you do that, yo won't have to create much stuff. There is a pluggable engine mechanism. Just create an implementation of BLAS(Plus) interface and plug it into the existing RealBlockVector and RealGeneralMatrix
@blueberry Starting to study the code to understand how RealGeneralMatrix works. I've never worked with ByteBuffer before. I should use one of those to store the contents of a matrix? Why is this preferable to a double-array?
Because you can't control how JVM handles arrays in memory, so you can't access them directly from the native code without copying, AND you can't optimize to the size of the processor's cache.
@blueberry: I think this is a copy/paste error. https://github.com/uncomplicate/neanderthal/blob/master/src/clojure/uncomplicate/neanderthal/impl/buffer_block.clj#L72 The entryWidth method for DoubleBufferAccessor should return Double/BYTES rather than Float/BYTES.