From 67606e51bc3747337274053a963d9f65ff476c0d Mon Sep 17 00:00:00 2001 From: Eduard Valeyev Date: Wed, 24 Jul 2024 13:58:59 -0400 Subject: [PATCH] fixup DeviceTensor's move ctor/assignment to avoid use of copying btas::Tensor ops --- examples/spmm/spmm_cuda.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/spmm/spmm_cuda.cc b/examples/spmm/spmm_cuda.cc index c9555fd44..2df91d147 100644 --- a/examples/spmm/spmm_cuda.cc +++ b/examples/spmm/spmm_cuda.cc @@ -191,7 +191,7 @@ struct DeviceTensor : public ttg::TTValue> DeviceTensor(DeviceTensor&& x) noexcept : ttvalue_type(std::move(x)) - , tensor_type(std::move(x)) + , tensor_type(static_cast(x)) /* Grrrr, moving a Tensor does not guarantee to move the pointer */ , b((this->size() == 0 || this->data() == x.b.host_ptr()) ? std::move(x.b) @@ -237,7 +237,7 @@ struct DeviceTensor : public ttg::TTValue> /// move assignment operator DeviceTensor& operator=(DeviceTensor&& x) noexcept { ttvalue_type::operator=(std::move(x)); - tensor_type::operator=(std::move(x)); + tensor_type::operator=(static_cast(x)); if (this->size() == 0 || this->data() == x.b.host_ptr()){ b = std::move(x.b); } else {