-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Note that we can iterate this later on, since UFuncImpl or UFuncLoop will be its own object, and we can create new subclasses with slightly different behaviour.
We could also move most logic into UFuncImpl.__call__(), keeping everything even more open. Although there are arguments for providing get_innerloop_function(...) (which could double as setup). The Advantage here would be that it allows inner loop specialization for strided, or scalar values. Additionally, with a somewhat limited API, UFuncImpls adhering to it, could for example allow chaining more easily. (Side note: CastingImpls must provide this, but the public API could be very limited initially).
The inner loop itself (IMO) must get a new int return value to signal stopping of the iteration. Everything else could probably be set up by using the existing void * argument (e.g. passing in dtypes can happen there, or allocations be stored on something passed in to it).