diff --git a/library/include/ck/library/utility/host_tensor.hpp b/library/include/ck/library/utility/host_tensor.hpp index 75351789e2..4cb200ccc0 100644 --- a/library/include/ck/library/utility/host_tensor.hpp +++ b/library/include/ck/library/utility/host_tensor.hpp @@ -254,7 +254,7 @@ struct Tensor Tensor(const HostTensorDescriptor& desc) : mDesc(desc), mData(mDesc.GetElementSpaceSize()) {} template - Tensor CopyAsType() + Tensor CopyAsType() const { Tensor ret(mDesc); for(size_t i = 0; i < mData.size(); i++) @@ -266,11 +266,10 @@ struct Tensor Tensor(const Tensor& other) : mDesc(other.mDesc), mData(other.mData) {} - template >> - Tensor(const Tensor& other) - : mDesc(other.mDesc), mData(std::begin(other.mData), std::end(other.mData)) + Tensor(Tensor&& other) = default; + + template + Tensor(const Tensor& other) : Tensor(other.template CopyAsType()) { }