-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Open
Description
Working on matmul in #11133, and comparing to the linalg inner loops, I ran into a need for a working buffer much like linalg. In umath_linalg.c.src each iteration of the inner loop mallocs/frees the working memory. There seems to be no generic support for passing in a working buffer allocated once for the ufunc call.
The PyUFuncGenericFunction signature has a innerloopdata argument, but I could find no examples of its use in linalg. In the actual inner loops in umath_linalg.c.src and elsewhere it is marked as NPY_UNUSED(func)
The only place I could find a use for this argument is in unmasked_ufunc_loop_as_masked where it is used to hold a structure, not a function.