commit 17985b7d87fece531920085be1b2a0b0bbfdda9e
parent 1481b43e32b3cb95ccc69bb6291d92e4e0dd485d
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date: Sun, 26 Nov 2023 15:09:40 +0000
allow_copy = true by default
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/kfr/base/tensor.hpp b/include/kfr/base/tensor.hpp
@@ -511,7 +511,7 @@ public:
template <index_t dims>
KFR_MEM_INTRINSIC tensor<T, dims> reshape_may_copy(const kfr::shape<dims>& new_shape,
- bool allow_copy = false) const
+ bool allow_copy = true) const
{
if (size_of_shape(new_shape) != m_size)
{
@@ -552,7 +552,7 @@ public:
KFR_MEM_INTRINSIC tensor<T, 1> flatten() const { return reshape(kfr::shape<1>{ m_size }); }
- KFR_MEM_INTRINSIC tensor<T, 1> flatten_may_copy(bool allow_copy = false) const
+ KFR_MEM_INTRINSIC tensor<T, 1> flatten_may_copy(bool allow_copy = true) const
{
return reshape_may_copy(kfr::shape<1>{ m_size }, allow_copy);
}