From 5de5453d15eddc4a3eb2e57f1aaf83e571ab55e0 Mon Sep 17 00:00:00 2001 From: xutianbing Date: Mon, 28 Nov 2016 16:25:56 -0800 Subject: [PATCH] add code comments for deepSwap --- paddle/math/BaseMatrix.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/paddle/math/BaseMatrix.h b/paddle/math/BaseMatrix.h index dbc217c30..ea58c861a 100644 --- a/paddle/math/BaseMatrix.h +++ b/paddle/math/BaseMatrix.h @@ -458,6 +458,10 @@ public: /** * @code * swap(this, b) + * example: swap two Matrices + * MatrixPtr cpuA = std::make_shared(height, width); + * MatrixPtr cpuB = std::make_shared(height, width); + * cpuA->deepSwap(*cpuB); * @endcode */ void deepSwap(BaseMatrixT& b); -- GitLab