[Numpy-discussion] Re: Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Ilhan Polat
Ah I see. Thank you Sebastian, I was hoping to avoid all that blocking (since HW dependency leaves some performance at many tables) or recursive zooming stuff with some off-the-shelf tool but apparently I'm walking in the dusty corners again collecting spider webs :) As you said, there are quite a

[Numpy-discussion] new time for community meetings

2021-11-10 Thread Inessa Pawson
It’s that time of the year again when most of us have to adjust our clocks. For some of us the fun doesn’t stop there as we have to adjust our work schedules too. Let’s see if we can find a new time slot on Wednesday for bi-weekly NumPy community meetings that works for everyone: http://whenisgood.

[Numpy-discussion] Re: Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Sebastian Berg
On Thu, 2021-11-11 at 01:04 +0100, Ilhan Polat wrote: > Hmm not sure I understand the question but this is what I mean by naive > looping, suppose I allocate a scratch register work3, then > > for i in range(n): for j in range(n): work3[j*n+i] = work2[i*n+j] > NumPy does not end up doing anythin

[Numpy-discussion] Re: Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Ilhan Polat
Here are some actual numbers within the context of operation (nogil removed and def'd for linetracing) Line # Hits Time Per Hit % Time Line Contents == 80 # Bilinear identity to shave off some flops 81 # inv(V-U) (V+U) = inv(V-U) (V-U+2V

[Numpy-discussion] Re: Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Ilhan Polat
Hmm not sure I understand the question but this is what I mean by naive looping, suppose I allocate a scratch register work3, then for i in range(n): for j in range(n): work3[j*n+i] = work2[i*n+j] This basically doing the row to column based indexing and obviously we create a lot of cache misse

[Numpy-discussion] Re: Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Andras Deak
On Thursday, November 11, 2021, Ilhan Polat wrote: > I've asked this in Cython mailing list but probably I should also get some > feedback here too. > > I have the following function defined in Cython and using flat memory > pointers to hold n by n array data. > > > cdef some_C_layout_func(double

[Numpy-discussion] Re: Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Ilhan Polat
Indeed for matrix multiplication and many other L3 BLAS functions, we are lucky however for linear solve function ?getrs unfortunately no avail. On Thu, Nov 11, 2021 at 12:31 AM Benjamin Root wrote: > I have found that a bunch of lapack functions seem to have arguments for > stating whether or n

[Numpy-discussion] Re: Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Benjamin Root
I have found that a bunch of lapack functions seem to have arguments for stating whether or not the given arrays are C or F ordered. Then you wouldn't need to worry about handling the layout yourself. For example, I have some C++ code like so: extern "C" { /** * Forward declaration for LAPACK's

[Numpy-discussion] Conversion from C-layout to Fortran-layout in Cython

2021-11-10 Thread Ilhan Polat
I've asked this in Cython mailing list but probably I should also get some feedback here too. I have the following function defined in Cython and using flat memory pointers to hold n by n array data. cdef some_C_layout_func(double[:, :, ::1] Am) nogil: # ... cdef double * work1 = malloc(n*n*size

[Numpy-discussion] win32 wheels for Python 3.10

2021-11-10 Thread Aivar Annamaa
Has it been decided to stop publishing win32 wheels for Python 3.10? Numpy 1.21.4 currently misses win32 wheel for Python 3.10 on PyPI. Is this temporary? I'm confused, because https://www.mail-archive.com/numpy-discussion@python.org/msg05512.html says: > We will continue to offer 32 wheels on