neanderthal-stick.nippy-ext

*neanderthal-factory*

dynamic

Dynamically bound factory that is used in Neanderthal vector and matrix constructors.

with-real-factory

macro

(with-real-factory factory & body)

Create a bind to use the factory during Neanderthal real vector and matrix construction.

    (clojurecuda/with-default
       (with-open [in (DataInputStream. (io/input-stream (io/file "/tmp/my_matrix.bin")))]
           (with-neanderthal-factory (cuda-double (current-context) default-stream)
               (nippy/thaw-from-in! in)))