Skip to content

Make sure SizeProxy does not unwrap anything

Ryan Curtin requested to merge rcurtin/bandicoot-code:sizeproxy-audit into unstable

I audited the SizeProxy class, because I wanted to make sure that it did not actually unwrap any operation.

The idea of the class is that I can make a SizeProxy<T1> s for any T1 that is a Bandicoot expression, and then we can do s.get_n_rows() and s.get_n_cols() to get the size of the result. Ideally, making a SizeProxy<T1> should never actually compute any expression.

I noticed that SizeProxy<Glue<...>> and SizeProxy<Op<...>> actually did compute something! So I simply modified things a little bit so that we can, given some glue or op type, get the number of rows and columns of its result, without actually computing its argument.

(Longer-term, I have to wonder if a cleanup/renaming might be good to do here, but, not yet.)

Edited by Ryan Curtin

Merge request reports