Closed kaushikcfd closed 1 year ago
I'd say this is pytato. In a sense, there are valid reasons for memory to be allocated for both of these arrays. One is tagged ImplStored
, and the other is the result, wrapped in a NamedArray
. So (I think) I understand what pytato's guts are doing here. At the same time, it's silly to allocate multiple buffers for exactly the same data, and to expend effort to copy that data over. I think trying to avoid these needless copies would be a good thing.
Consider the following snippet:
which generates the code:
Notice how the "_pt_temp" serves no purpose.
Is this the user's fault or pytato's?