mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-06-05 20:55:59 +00:00
Allow conversion between Tensor<> specializations
This commit is contained in:
@@ -266,6 +266,9 @@ struct Tensor
|
||||
|
||||
Tensor(const Tensor& other) : mDesc(other.mDesc), mData(other.mData) {}
|
||||
|
||||
template <typename OtherT, typename = std::enable_if_t<sizeof(T) == sizeof(OtherT) && std::is_convertible_v<T, OtherT>>>
|
||||
Tensor(const Tensor<OtherT>& other) : mDesc(other.mDesc), mData(std::begin(other.mData), std::end(other.mData)) {}
|
||||
|
||||
Tensor& operator=(const Tensor& other)
|
||||
{
|
||||
mDesc = other.mDesc;
|
||||
|
||||
Reference in New Issue
Block a user