diff --git a/paddle/math/BaseMatrix.h b/paddle/math/BaseMatrix.h index dbc217c30f2f2e6d35536d99115282fdb6ed5e06..ea58c861a3d6a03642291c172af76795e90fcb92 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);