Make broadcast settings visible on users of with_container_arithmetic - #45
Make broadcast settings visible on users of with_container_arithmetic#45inducer wants to merge 4 commits into
Conversation
Is it worth moving the Besides that, no particular feeling of impending doom on my side 🤷 |
Uh oh!
There was an error while loading. Please reload this page.
I'd be all for that, especially since it'd help avoid use of private attributes across package boundaries. @majosm? (Added you to the repo just in case.) |
Co-authored-by: Alex Fikl <alexfikl@gmail.com>
inducer
commented
Jun 24, 2021
Thanks for taking a look! |
Uh oh!
There was an error while loading. Please reload this page.
majosm
commented
Jun 24, 2021
Just wondering: how come the specifications in |
inducer
commented
Jun 24, 2021
I could very well see it being useful. I just have commitment anxiety about the interface... it seems kind of janky and poorly defined. |
majosm
commented
Jun 25, 2021
@inducer Where should I stick |
inducer
commented
Jun 25, 2021
|
majosm
commented
Jun 25, 2021
inducer
commented
Jun 26, 2021
Closing in favor of #46. |
This is to support use cases like illinois-ceesd/mirgecom#331, where the information that
with_container_arithmetichas about the desired broadcast behavior of a type would also be useful to have. To make it available, this just shoves it into some (undocumented, for now) class attributes. In the linked use case, this would help (e.g.) avoid the need for hardcodingDOFArray. Instead, it could check whethernp.ndarrayis intype(obj)._outer_bcast_namesand then follow that behavior.I also have a distinct feeling that this might also be a bad idea. @alexfikl, got a gut feeling on this one?
cc @majosm