Operators such as ReshapeOperator or SliceOperator preserve their inputs (let's call such an operator PRE).
Currently, when composed by an out-of-place operator OUT:
y = (OUT * PRE)(x)
the following operations take place:
tmp = PRE(x)
y = OUT(tmp)
The tmp variable should be optimised out. I suggest a 'preserve_input' decorator to flag these operators.
Operators such as ReshapeOperator or SliceOperator preserve their inputs (let's call such an operator PRE). Currently, when composed by an out-of-place operator OUT:
the following operations take place:
The tmp variable should be optimised out. I suggest a 'preserve_input' decorator to flag these operators.