Paddle
Paddle copied to clipboard
support deepSwap
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
I think it would be better to add a swap function that can support the exchange of data_ pointer.
@tianbingsz Can we firstly focus on why we need deepcopy?