Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit aa1996e

Browse files
author
Theodoros Theodoridis
committed
Move instead of copy when possible in cuda cache
1 parent 321f07e commit aa1996e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tc/core/cuda/cuda_compilation_cache.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ void CudaCache::cacheKernel(CudaCachedEntry&& entry) {
208208
}
209209
return;
210210
}
211-
entries_.emplace_back(entry);
211+
entries_.emplace_back(std::move(entry));
212212
}
213213

214214
std::unique_ptr<CudaCacheRetrievalResult> CudaCache::retrieveKernel(
@@ -607,7 +607,7 @@ void ManualCudaCache::cacheKernel(ManualCudaCachedEntry&& entry) {
607607
retrievedEntry->values.kernelParameters = entry.values.kernelParameters;
608608
return;
609609
}
610-
entries_.emplace_back(entry);
610+
entries_.emplace_back(std::move(entry));
611611
}
612612

613613
std::unique_ptr<ManualCudaCacheRetrievalResult> ManualCudaCache::retrieveKernel(

0 commit comments

Comments
 (0)