Open inducer opened 2 hours ago
I would argue for:
num_reference_derivative
function for the corresponding NumReferenceDerivative
class that does this vectorization. Similarly for the other overloaded classes.@componentwise
decorator (or something like that) that automatically does that (a la for_each_kernel
in loopy).I don't know if being explicit with componentwise(Something, operand, **kwargs)
in a lot of places is worth it..
D'oh! Yes, you're right of course. That sounds like a good plan. Let's deprecate the __new__
thing and have a vectorizing function.
Suppose
x
is a numpy object array of densities.Now:
S(x)
returns a vector of single-layer potentials.A possible future:
componentwise(S, x)
returns a vector of single-layer potentials.Context/motivation: https://github.com/inducer/pytential/pull/245#discussion_r1844481562
cc @alexfikl