MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / deepClone

Function deepClone

extensions/include/cuMat/src/SparseMatrix.h:288–293  ·  view source on GitHub ↗

* \brief Performs a deep clone of the matrix. * Usually, when you assign matrix instances, the underlying data is shared. This method explicitly copies the internal data * of the matrix into a new matrix. The two matrices are then completely independent, i.e. if you perform an * inplace modification on this or the returned matrix, the changes are not reflected in the other. *

Source from the content-addressed store, hash-verified

286 * \return the new matrix with a deep clone of the data
287 */
288 Type deepClone(bool cloneSparsity = false) const
289 {
290 Type mat(cloneSparsity ? getSparsityPattern().deepClone() : getSparsityPattern(), batches());
291 mat.A_ = A_.deepClone();
292 return mat;
293 }
294
295private:
296 void checkInitialized() const

Callers

nothing calls this directly

Calls 2

batchesFunction · 0.70
deepCloneMethod · 0.45

Tested by

no test coverage detected