Paddle icon indicating copy to clipboard operation
Paddle copied to clipboard

support deepSwap

Open tianbingsz opened this issue 10 years ago • 2 comments

support swap of the content of Matrix, e.g. swap two parameters like: para->getBuf(PARAMETER_SNAPSHOT_VALUE)->deepSwap(*para->getBuf(PARAMETER_VALUE)). https://github.com/PaddlePaddle/Paddle/pull/565

tianbingsz avatar Nov 22 '16 22:11 tianbingsz

I think it would be better to add a swap function that can support the exchange of data_ pointer.

hedaoyuan avatar Nov 23 '16 02:11 hedaoyuan

@tianbingsz Can we firstly focus on why we need deepcopy?

backyes avatar Nov 24 '16 09:11 backyes