From f989be9f35e4f29efbb84f3125f8a35e71c16d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A9nes=20Tarj=C3=A1n?= Date: Fri, 1 Mar 2024 13:01:47 +0000 Subject: [PATCH] Fix copy_data for more channels in morphology workspace --- intrinsiccv/include/intrinsiccv/morphology/workspace.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/intrinsiccv/include/intrinsiccv/morphology/workspace.h b/intrinsiccv/include/intrinsiccv/morphology/workspace.h index 460fa7fe0..7ec6f579c 100644 --- a/intrinsiccv/include/intrinsiccv/morphology/workspace.h +++ b/intrinsiccv/include/intrinsiccv/morphology/workspace.h @@ -341,7 +341,9 @@ class MorphologyWorkspace final { void copy_data(Rows src_rows, Rows dst_rows, size_t length) INTRINSICCV_STREAMING_COMPATIBLE { #if INTRINSICCV_TARGET_SME2 - Rectangle rect{length, static_cast(1)}; + // 'sve2::apply_operation_by_rows' handles it as being 1-channel + // so width must be multiplied in order to copy all the data + Rectangle rect{length * src_rows.channels(), std::size_t{1}}; CopyOperation operation; sve2::apply_operation_by_rows(operation, rect, src_rows, dst_rows); #else -- GitLab