Skip to content

Commit

Permalink
copy ctor -> std::move
Browse files Browse the repository at this point in the history
  • Loading branch information
multiphaseCFD committed May 2, 2024
1 parent e606691 commit dc55714
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ class MPSCutn final : public CutnBase<Precision, MPSCutn<Precision>> {
localSiteExtents = std::vector<std::size_t>(
{maxBondDim_, BaseType::getQubitDims()[i], maxBondDim_});
}
sitesExtents_.push_back(localSiteExtents);
sitesModes_.push_back(localSiteModes);
sitesExtents_.push_back(std::move(localSiteExtents));
sitesModes_.push_back(std::move(localSiteModes));
}

for (std::size_t i = 0; i < BaseType::getNumQubits(); i++) {
Expand All @@ -259,7 +259,7 @@ class MPSCutn final : public CutnBase<Precision, MPSCutn<Precision>> {
return static_cast<int64_t>(x);
});

sitesExtents_int64_.push_back(siteExtents_int64);
sitesExtents_int64_.push_back(std::move(siteExtents_int64));
sitesExtentsPtr_int64_.push_back(sitesExtents_int64_.back().data());

// construct mps tensors reprensentation
Expand Down

0 comments on commit dc55714

Please sign in to comment.