commit 7f1050b3d7633aeea6bc71b41fc7a9b748ccf0d8
parent 1d8ffd0fd2318bf1f6715989f60e6673b845ab59
Author: d.levin256@gmail.com <d.levin256@gmail.com>
Date: Wed, 9 Nov 2022 08:56:24 +0000
Fix expression_handle for large N
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/kfr/base/handle.hpp b/include/kfr/base/handle.hpp
@@ -236,8 +236,9 @@ KFR_INTRINSIC vec<T, N> get_elements(const expression_handle<T, NDims>& self, co
if constexpr (N > expression_vtable<T, NDims>::Nmax)
{
constexpr size_t Nhalf = N / 2;
- return concat(get_elements(self, index, axis_params_v<Axis, Nhalf>),
- get_elements(self, index.add_at(Axis, Nhalf), axis_params_v<Axis, Nhalf>));
+ return concat(
+ get_elements(self, index, axis_params_v<Axis, Nhalf>),
+ get_elements(self, index.add_at(Nhalf, cval<index_t, Axis>), axis_params_v<Axis, Nhalf>));
}
else
{