uncomplicate

ohsudo 2016-08-29T16:36:45.000003Z

@blueberry

2016-08-29T16:40:54.000005Z

Default matrix is column-oriented. If you need row-orientation, call trans, which transposes it without cost.

2016-08-29T16:42:19.000006Z

Of course, you can take cols as a sequence and call sum or asum on each col, and it might even be faster on matrices with small number of columns...

2016-08-29T16:42:26.000007Z

So, you'd need to try.

2016-08-29T16:42:30.000008Z

@adebesin

2016-08-29T16:44:55.000009Z

@adebesin In this case, probably something like:

2016-08-29T16:50:32.000010Z

(def a (sge 3 2 (range 6)))

2016-08-29T16:50:47.000011Z

(def x (sv [1 1 1]))

2016-08-29T16:51:02.000012Z

(def col-sums (sv 2))

2016-08-29T16:51:21.000013Z

(mv! (trans a) x col-sums)

2016-08-29T16:51:44.000014Z

if you want the sums of rows, do not transpose a

2016-08-29T16:52:35.000015Z

Of course, you do not have to use mv!, you con get by with mv, depending on the actual use case.

2016-08-29T16:53:29.000016Z

You also do not have to provide [1 1 1] explicitly. For large matrices, it is much fastser to use (entry! (sv 10000) 1.0)

2016-08-29T16:54:22.000018Z

There are many more subtle helpers that can help you with low-level optimizations

ohsudo 2016-08-29T16:54:52.000019Z

OK cool.. I would want it to perform well on large matrices

ohsudo 2016-08-29T16:56:06.000020Z

@blueberry are you talking at Clojure Conj? or Euro Clojure..? I heard on the defn podcast 🙂

2016-08-29T16:56:21.000021Z

EuroClojure 🙂

ohsudo 2016-08-29T16:56:37.000022Z

Cool! looking forward to it

2016-08-29T16:56:45.000023Z

I'll see, maybe I'll submit a talk to Clojure/West

2016-08-29T16:56:56.000024Z

You are coming to Bratislava?

ohsudo 2016-08-29T16:57:34.000025Z

Unfortunately not I cant get time off work at the moment.. sucks 😞

2016-08-29T16:58:29.000026Z

yep, a couple of days there would be a nice mini vacation. Bratislava is rather cute.

2016-08-29T16:58:47.000027Z

But, ok, there is ClojureTV, at least you'll be able to hear the talk

ohsudo 2016-08-29T16:59:51.000028Z

Yes I am really looking forward to it as your project is fantastic

2016-08-29T17:04:13.000029Z

Thank you very much 🙂 Please do not hesitate to write about that, share examples, etc...

ohsudo 2016-08-29T17:05:10.000030Z

I will 🙂 and good luck at EuroClojure

2016-08-29T17:05:45.000031Z

Thanks. BTW, have you tried GPU, or you are just using the CPU engine?

2016-08-29T17:06:42.000032Z

and what is your OS? Did you have any issues installing neanderthal?

ohsudo 2016-08-29T17:11:02.000033Z

Just the CPU at the minute.. no I use a Mac so generally things work. I havent tried it on Linux yet. I dont use Windows.. but lets not go there lol. I am just getting into GPU programming atm. It is really interesting.

2016-08-29T17:16:06.000034Z

OK. If you need any help with that, please ask

ohsudo 2016-08-29T17:18:27.000035Z

Cool thanks 🙂