[Numpy-discussion] Calling C code that assumes SIMD aligned data.

2016-05-05 Thread Øystein Schønning-Johansen
Hi! I've written a little code of numpy code that does a neural network feedforward calculation: def feedforward(self,x): for activation, w, b in zip( self.activations, self.weights, self.biases ): x = activation( np.dot(w, x) + b) This works fine when my activation funct

Re: [Numpy-discussion] Calling C code that assumes SIMD aligned data.

2016-05-05 Thread Francesc Alted
2016-05-05 11:38 GMT+02:00 Øystein Schønning-Johansen : > Hi! > > I've written a little code of numpy code that does a neural network > feedforward calculation: > > def feedforward(self,x): > for activation, w, b in zip( self.activations, self.weights, > self.biases ): > x

Re: [Numpy-discussion] Calling C code that assumes SIMD aligned data.

2016-05-05 Thread Øystein Schønning-Johansen
Thanks for your answer, Francesc. Knowing that there is no numpy solution saves the work of searching for this. I've not tried the solution described at SO, but it looks like a real performance killer. I'll rather try to override malloc with glibs malloc_hooks or LD_PRELOAD tricks. Do you think tha

Re: [Numpy-discussion] Calling C code that assumes SIMD aligned data.

2016-05-05 Thread Charles R Harris
On Thu, May 5, 2016 at 2:10 PM, Øystein Schønning-Johansen < oyste...@gmail.com> wrote: > Thanks for your answer, Francesc. Knowing that there is no numpy solution > saves the work of searching for this. I've not tried the solution described > at SO, but it looks like a real performance killer. I'