From 027d281c9957690bf02f2cdf9b3e74cf47b50dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A9nes=20Tarj=C3=A1n?= Date: Mon, 18 Mar 2024 18:20:08 +0000 Subject: [PATCH 1/2] Separate morphology sve2/sme2 functions --- intrinsiccv/include/intrinsiccv/config.h.in | 10 +++- .../include/intrinsiccv/containers/stack.h | 4 +- .../intrinsiccv/morphology/workspace.h | 54 ++++++------------- intrinsiccv/include/intrinsiccv/operations.h | 10 ++-- intrinsiccv/include/intrinsiccv/sve2.h | 6 ++- intrinsiccv/include/intrinsiccv/traits.h | 7 +-- intrinsiccv/include/intrinsiccv/types.h | 4 +- intrinsiccv/include/intrinsiccv/utils.h | 30 ++++++----- .../include/intrinsiccv/workspace/borders.h | 4 +- .../include/intrinsiccv/workspace/separable.h | 4 +- intrinsiccv/src/arithmetics/absdiff_sme2.cpp | 4 ++ intrinsiccv/src/arithmetics/add_sme2.cpp | 4 ++ intrinsiccv/src/arithmetics/sub_sme2.cpp | 4 ++ .../src/morphology/morphology_neon.cpp | 3 ++ intrinsiccv/src/morphology/morphology_sc.h | 53 +++++++++++++----- .../src/morphology/morphology_sme2.cpp | 8 +-- .../src/morphology/morphology_sve2.cpp | 6 ++- scripts/ci-opencv.sh | 2 +- 18 files changed, 124 insertions(+), 93 deletions(-) diff --git a/intrinsiccv/include/intrinsiccv/config.h.in b/intrinsiccv/include/intrinsiccv/config.h.in index 710049712..ee791b73c 100644 --- a/intrinsiccv/include/intrinsiccv/config.h.in +++ b/intrinsiccv/include/intrinsiccv/config.h.in @@ -17,6 +17,8 @@ #cmakedefine01 INTRINSICCV_CANNY_ALGORITHM_CONFORM_OPENCV +#cmakedefine01 INTRINSICCV_COMPILER_SUPPORTS_SME2 + // Set to '1' if compiling NEON code paths, otherwise it is set to '0'. #ifndef INTRINSICCV_TARGET_NEON #define INTRINSICCV_TARGET_NEON 0 @@ -47,10 +49,16 @@ #define INTRINSICCV_ASSUME_128BIT_SVE2 0 #define INTRINSICCV_TARGET_FN_ATTRS INTRINSICCV_ATTR_SECTION(".text.sme2") #define INTRINSICCV_LOCALLY_STREAMING __arm_locally_streaming -#define INTRINSICCV_STREAMING_COMPATIBLE __arm_streaming_compatible #else #define INTRINSICCV_LOCALLY_STREAMING +#endif + +#if ((INTRINSICCV_TARGET_SVE2 || INTRINSICCV_TARGET_SME2) && INTRINSICCV_COMPILER_SUPPORTS_SME2) +#define INTRINSICCV_STREAMING_COMPATIBLE __arm_streaming_compatible +#define INTRINSICCV_SC_NAMESPACE intrinsiccv::sve2 +#else #define INTRINSICCV_STREAMING_COMPATIBLE +#define INTRINSICCV_SC_NAMESPACE intrinsiccv #endif #ifdef __linux__ diff --git a/intrinsiccv/include/intrinsiccv/containers/stack.h b/intrinsiccv/include/intrinsiccv/containers/stack.h index 52c346434..f1aac1429 100644 --- a/intrinsiccv/include/intrinsiccv/containers/stack.h +++ b/intrinsiccv/include/intrinsiccv/containers/stack.h @@ -13,7 +13,7 @@ #include "intrinsiccv/traits.h" #include "intrinsiccv/utils.h" -namespace intrinsiccv { +namespace INTRINSICCV_SC_NAMESPACE { // A simple last-in first-out container. template @@ -171,6 +171,6 @@ class Stack final : public NonCopyable { Block *first_block_; }; // end of class Stack -} // namespace intrinsiccv +} // namespace INTRINSICCV_SC_NAMESPACE #endif // INTRINSICCV_CONTAINERS_STACK_H diff --git a/intrinsiccv/include/intrinsiccv/morphology/workspace.h b/intrinsiccv/include/intrinsiccv/morphology/workspace.h index 022e1ab72..e6c89977a 100644 --- a/intrinsiccv/include/intrinsiccv/morphology/workspace.h +++ b/intrinsiccv/include/intrinsiccv/morphology/workspace.h @@ -13,11 +13,7 @@ #include "intrinsiccv/intrinsiccv.h" #include "intrinsiccv/types.h" -#if INTRINSICCV_TARGET_SME2 -#include "intrinsiccv/sve2.h" -#endif - -namespace intrinsiccv { +namespace INTRINSICCV_SC_NAMESPACE { // Forward declarations. class MorphologyWorkspace; @@ -55,6 +51,18 @@ class MorphologyWorkspace final { } } + template + class CopyDataMemcpy { + public: + constexpr void operator()(Rows src_rows, Rows dst_rows, + size_t length) const + INTRINSICCV_STREAMING_COMPATIBLE { + std::memcpy(static_cast(&dst_rows[0]), + static_cast(&src_rows[0]), + length * sizeof(T) * dst_rows.channels()); + } + }; + // MorphologyWorkspace is only constructible with create(). MorphologyWorkspace() = delete; @@ -160,6 +168,7 @@ class MorphologyWorkspace final { O operation) INTRINSICCV_STREAMING_COMPATIBLE { using S = typename O::SourceType; using B = typename O::BufferType; + typename O::CopyData copy_data{}; if (INTRINSICCV_UNLIKELY(rect.width() == 0 || rect.height() == 0)) { return; @@ -326,39 +335,6 @@ class MorphologyWorkspace final { return height; } -#if INTRINSICCV_TARGET_SME2 - template - class CopyOperation final : public UnrollTwice { - public: - using ContextType = sve2::Context; - using VecTraits = sve2::VecTraits; - using VectorType = typename VecTraits::VectorType; - - VectorType vector_path(ContextType, - VectorType src) INTRINSICCV_STREAMING_COMPATIBLE { - return src; - } - }; // end of class CopyOperation -#endif - - template - void copy_data(Rows src_rows, Rows dst_rows, - size_t length) INTRINSICCV_STREAMING_COMPATIBLE { -#if INTRINSICCV_TARGET_SME2 - // 'sve2::apply_operation_by_rows' can only handle one channel well - // so width must be multiplied in order to copy all the data - Rectangle rect{length * dst_rows.channels(), std::size_t{1}}; - Rows src_1ch{&src_rows[0], src_rows.stride(), 1}; - Rows dst_1ch{&dst_rows[0], dst_rows.stride(), 1}; - CopyOperation operation; - sve2::apply_operation_by_rows(operation, rect, src_1ch, dst_1ch); -#else - std::memcpy(static_cast(&dst_rows[0]), - static_cast(&src_rows[0]), - length * sizeof(T) * dst_rows.channels()); -#endif - } - template void make_constant_border(Rows dst_rows, size_t dst_index, size_t count, BorderType value) INTRINSICCV_STREAMING_COMPATIBLE { @@ -417,6 +393,6 @@ class MorphologyWorkspace final { uint8_t data_[0] INTRINSICCV_ATTR_ALIGNED(sizeof(void *)); }; // end of class MorphologyWorkspace -} // namespace intrinsiccv +} // namespace INTRINSICCV_SC_NAMESPACE #endif // INTRINSICCV_MORPHOLOGY_WORKSPACE_H diff --git a/intrinsiccv/include/intrinsiccv/operations.h b/intrinsiccv/include/intrinsiccv/operations.h index 7dc888a47..1a8943ab2 100644 --- a/intrinsiccv/include/intrinsiccv/operations.h +++ b/intrinsiccv/include/intrinsiccv/operations.h @@ -11,7 +11,7 @@ #include "intrinsiccv/traits.h" #include "intrinsiccv/types.h" -namespace intrinsiccv { +namespace INTRINSICCV_SC_NAMESPACE { // Base for classes that change the behaviour or extend the interface of an // operation. @@ -110,19 +110,19 @@ class OperationBase { // Returns true if the innermost operation is unrolled twice, otherwise false. static constexpr bool is_unrolled_twice() INTRINSICCV_STREAMING_COMPATIBLE { - return intrinsiccv::is_unrolled_twice< + return ::INTRINSICCV_SC_NAMESPACE::is_unrolled_twice< concrete_operation_type_t>; } // Returns true if the innermost operation is unrolled once, otherwise false. static constexpr bool is_unrolled_once() INTRINSICCV_STREAMING_COMPATIBLE { - return intrinsiccv::is_unrolled_once< + return ::INTRINSICCV_SC_NAMESPACE::is_unrolled_once< concrete_operation_type_t>; } // Returns true if the innermost operation uses tail path, otherwise false. static constexpr bool uses_tail_path() INTRINSICCV_STREAMING_COMPATIBLE { - return intrinsiccv::uses_tail_path< + return ::INTRINSICCV_SC_NAMESPACE::uses_tail_path< concrete_operation_type_t>; } @@ -1270,6 +1270,6 @@ class RemoveContextAdapter : public OperationBase { } }; // end of class RemoveContextAdapter -} // namespace intrinsiccv +} // namespace INTRINSICCV_SC_NAMESPACE #endif // INTRINSICCV_OPERATIONS_H diff --git a/intrinsiccv/include/intrinsiccv/sve2.h b/intrinsiccv/include/intrinsiccv/sve2.h index 8193c9b38..4d43d86a2 100644 --- a/intrinsiccv/include/intrinsiccv/sve2.h +++ b/intrinsiccv/include/intrinsiccv/sve2.h @@ -517,7 +517,8 @@ class SeparableFilter { using SourceVectorType = typename SourceVecTraits::VectorType; using BufferVecTraits = typename sve2::VecTraits; using BufferVectorType = typename BufferVecTraits::VectorType; - using BorderInfoType = typename intrinsiccv::FixedBorderInfo3x3; + using BorderInfoType = + typename ::INTRINSICCV_SC_NAMESPACE::FixedBorderInfo3x3; using BorderType = FixedBorderType; using BorderOffsets = typename BorderInfoType::Offsets; @@ -653,7 +654,8 @@ class SeparableFilter { using SourceVectorType = typename SourceVecTraits::VectorType; using BufferVecTraits = typename sve2::VecTraits; using BufferVectorType = typename BufferVecTraits::VectorType; - using BorderInfoType = typename intrinsiccv::FixedBorderInfo5x5; + using BorderInfoType = + typename ::INTRINSICCV_SC_NAMESPACE::FixedBorderInfo5x5; using BorderType = FixedBorderType; using BorderOffsets = typename BorderInfoType::Offsets; diff --git a/intrinsiccv/include/intrinsiccv/traits.h b/intrinsiccv/include/intrinsiccv/traits.h index c5d92a77e..cf77cdf0b 100644 --- a/intrinsiccv/include/intrinsiccv/traits.h +++ b/intrinsiccv/include/intrinsiccv/traits.h @@ -9,7 +9,7 @@ #include "intrinsiccv/config.h" -namespace intrinsiccv { +namespace INTRINSICCV_SC_NAMESPACE { // An empty class. class Monostate {}; @@ -17,7 +17,8 @@ class Monostate {}; template class remove_streaming_compatible; -#if INTRINSICCV_TARGET_SME2 +#if ((INTRINSICCV_TARGET_SVE2 || INTRINSICCV_TARGET_SME2) && \ + INTRINSICCV_COMPILER_SUPPORTS_SME2) template class remove_streaming_compatible { @@ -191,6 +192,6 @@ class NonCopyable { NonCopyable &operator=(const NonCopyable &) = delete; }; // end of class NonCopyable -} // namespace intrinsiccv +} // namespace INTRINSICCV_SC_NAMESPACE #endif // INTRINSICCV_TYPE_TRAITS_H diff --git a/intrinsiccv/include/intrinsiccv/types.h b/intrinsiccv/include/intrinsiccv/types.h index 41510e109..5c30a4575 100644 --- a/intrinsiccv/include/intrinsiccv/types.h +++ b/intrinsiccv/include/intrinsiccv/types.h @@ -13,7 +13,7 @@ #include "intrinsiccv/ctypes.h" #include "intrinsiccv/utils.h" -namespace intrinsiccv { +namespace INTRINSICCV_SC_NAMESPACE { // Represents a point on a 2D plane. class Point final { @@ -668,6 +668,6 @@ class RowsOverUniquePtr { std::unique_ptr data_; }; -} // namespace intrinsiccv +} // namespace INTRINSICCV_SC_NAMESPACE #endif // INTRINSICCV_TYPES_H diff --git a/intrinsiccv/include/intrinsiccv/utils.h b/intrinsiccv/include/intrinsiccv/utils.h index 54765279a..0a15fd6ad 100644 --- a/intrinsiccv/include/intrinsiccv/utils.h +++ b/intrinsiccv/include/intrinsiccv/utils.h @@ -13,7 +13,7 @@ #include "intrinsiccv/config.h" #include "intrinsiccv/ctypes.h" -namespace intrinsiccv { +namespace INTRINSICCV_SC_NAMESPACE { // Saturating cast from signed to unsigned type. template check_pointer_and_stride( return INTRINSICCV_OK; } -#define CHECK_POINTER_AND_STRIDE(pointer, stride) \ - do { \ - if (intrinsiccv_error_t ptr_stride_err = \ - check_pointer_and_stride(pointer, stride)) { \ - return ptr_stride_err; \ - } \ +#define CHECK_POINTER_AND_STRIDE(pointer, stride) \ + do { \ + if (intrinsiccv_error_t ptr_stride_err = \ + ::INTRINSICCV_SC_NAMESPACE::check_pointer_and_stride(pointer, \ + stride)) { \ + return ptr_stride_err; \ + } \ } while (false) -#define MAKE_POINTER_CHECK_ALIGNMENT(ElementType, name, from) \ - if constexpr (alignof(ElementType) > 1) { \ - if (is_misaligned(reinterpret_cast(from))) { \ - return INTRINSICCV_ERROR_ALIGNMENT; \ - } \ - } \ +#define MAKE_POINTER_CHECK_ALIGNMENT(ElementType, name, from) \ + if constexpr (alignof(ElementType) > 1) { \ + if (::INTRINSICCV_SC_NAMESPACE::is_misaligned( \ + reinterpret_cast(from))) { \ + return INTRINSICCV_ERROR_ALIGNMENT; \ + } \ + } \ ElementType *name = reinterpret_cast(from) // Check whether the image size is acceptable by limiting it. @@ -434,6 +436,6 @@ std::enable_if_t check_pointer_and_stride( // Check whether the rectangle size is acceptable by limiting it. #define CHECK_RECTANGLE_SIZE(rect) CHECK_IMAGE_SIZE(rect.width, rect.height) -} // namespace intrinsiccv +} // namespace INTRINSICCV_SC_NAMESPACE #endif // INTRINSICCV_UTILS_H diff --git a/intrinsiccv/include/intrinsiccv/workspace/borders.h b/intrinsiccv/include/intrinsiccv/workspace/borders.h index 9f72b9c55..c225ec8ab 100644 --- a/intrinsiccv/include/intrinsiccv/workspace/borders.h +++ b/intrinsiccv/include/intrinsiccv/workspace/borders.h @@ -9,7 +9,7 @@ #include "intrinsiccv/intrinsiccv.h" -namespace intrinsiccv { +namespace INTRINSICCV_SC_NAMESPACE { enum class FixedBorderType { REPLICATE, @@ -278,6 +278,6 @@ using FixedBorderInfo3x3 = FixedBorderInfo; template using FixedBorderInfo5x5 = FixedBorderInfo; -} // namespace intrinsiccv +} // namespace INTRINSICCV_SC_NAMESPACE #endif // INTRINSICCV_WORKSPACE_BORDERS_H diff --git a/intrinsiccv/include/intrinsiccv/workspace/separable.h b/intrinsiccv/include/intrinsiccv/workspace/separable.h index 599e1186b..9a32c2f7d 100644 --- a/intrinsiccv/include/intrinsiccv/workspace/separable.h +++ b/intrinsiccv/include/intrinsiccv/workspace/separable.h @@ -12,7 +12,7 @@ #include "intrinsiccv/intrinsiccv.h" #include "intrinsiccv/types.h" -namespace intrinsiccv { +namespace INTRINSICCV_SC_NAMESPACE { // Forward declarations. class SeparableFilterWorkspace; @@ -215,6 +215,6 @@ class SeparableFilterWorkspace final { uint8_t data_[0] INTRINSICCV_ATTR_ALIGNED(kAlignment); }; // end of class SeparableFilterWorkspace -} // namespace intrinsiccv +} // namespace INTRINSICCV_SC_NAMESPACE #endif // INTRINSICCV_WORKSPACE_SEPARABLE_H diff --git a/intrinsiccv/src/arithmetics/absdiff_sme2.cpp b/intrinsiccv/src/arithmetics/absdiff_sme2.cpp index 29895f1a0..85f3e00ec 100644 --- a/intrinsiccv/src/arithmetics/absdiff_sme2.cpp +++ b/intrinsiccv/src/arithmetics/absdiff_sme2.cpp @@ -7,6 +7,10 @@ namespace intrinsiccv::sme2 { +using sve2::Rectangle; +using sve2::Rows; +using sve2::UnrollTwice; + template ::value, bool> = true> VectorType vector_path_impl(svbool_t pg, VectorType src_a, diff --git a/intrinsiccv/src/arithmetics/add_sme2.cpp b/intrinsiccv/src/arithmetics/add_sme2.cpp index 11cc62908..2063d5366 100644 --- a/intrinsiccv/src/arithmetics/add_sme2.cpp +++ b/intrinsiccv/src/arithmetics/add_sme2.cpp @@ -9,6 +9,10 @@ namespace intrinsiccv::sme2 { +using sve2::Rectangle; +using sve2::Rows; +using sve2::UnrollTwice; + template class SaturatingAdd final : public UnrollTwice { public: diff --git a/intrinsiccv/src/arithmetics/sub_sme2.cpp b/intrinsiccv/src/arithmetics/sub_sme2.cpp index 312b512f6..1b756d482 100644 --- a/intrinsiccv/src/arithmetics/sub_sme2.cpp +++ b/intrinsiccv/src/arithmetics/sub_sme2.cpp @@ -9,6 +9,10 @@ namespace intrinsiccv::sme2 { +using sve2::Rectangle; +using sve2::Rows; +using sve2::UnrollTwice; + template class SaturatingSub final : public UnrollTwice { public: diff --git a/intrinsiccv/src/morphology/morphology_neon.cpp b/intrinsiccv/src/morphology/morphology_neon.cpp index 98aac273b..9bc91c368 100644 --- a/intrinsiccv/src/morphology/morphology_neon.cpp +++ b/intrinsiccv/src/morphology/morphology_neon.cpp @@ -467,6 +467,7 @@ class DilateOperation final { using SourceType = ScalarType; using BufferType = ScalarType; using DestinationType = ScalarType; + using CopyData = MorphologyWorkspace::CopyDataMemcpy; explicit DilateOperation(Rectangle kernel) : kernel_{kernel} {} @@ -537,6 +538,7 @@ class ErodeOperation final { using SourceType = ScalarType; using BufferType = ScalarType; using DestinationType = ScalarType; + using CopyData = MorphologyWorkspace::CopyDataMemcpy; explicit ErodeOperation(Rectangle kernel) : kernel_{kernel} {} @@ -566,6 +568,7 @@ intrinsiccv_error_t erode(const T *src, size_t src_stride, T *dst, CHECK_IMAGE_SIZE(width, height); auto *workspace = reinterpret_cast(context); + if (workspace->type_size() != sizeof(T)) { return INTRINSICCV_ERROR_CONTEXT_MISMATCH; } diff --git a/intrinsiccv/src/morphology/morphology_sc.h b/intrinsiccv/src/morphology/morphology_sc.h index 437970404..9294f218f 100644 --- a/intrinsiccv/src/morphology/morphology_sc.h +++ b/intrinsiccv/src/morphology/morphology_sc.h @@ -15,6 +15,33 @@ namespace intrinsiccv::sve2 { +template +class CopyDataSVE2 { + class CopyOperation final : public UnrollTwice { + public: + using ContextType = sve2::Context; + using VecTraits = sve2::VecTraits; + using VectorType = typename VecTraits::VectorType; + + VectorType vector_path(ContextType, + VectorType src) INTRINSICCV_STREAMING_COMPATIBLE { + return src; + } + }; // end of class CopyOperation + + public: + void operator()(Rows src_rows, Rows dst_rows, + size_t length) const INTRINSICCV_STREAMING_COMPATIBLE { + // 'apply_operation_by_rows' can only handle one channel well + // so width must be multiplied in order to copy all the data + Rectangle rect{length * dst_rows.channels(), std::size_t{1}}; + Rows src_1ch{&src_rows[0], src_rows.stride(), 1}; + Rows dst_1ch{&dst_rows[0], dst_rows.stride(), 1}; + CopyOperation op{}; + apply_operation_by_rows(op, rect, src_1ch, dst_1ch); + } +}; + template class VerticalOp final { public: @@ -419,12 +446,13 @@ using HorizontalMin = HorizontalOp>; template using HorizontalMax = HorizontalOp>; -template +template class DilateOperation final { public: using SourceType = ScalarType; using BufferType = ScalarType; using DestinationType = ScalarType; + using CopyData = CopyDataOperation; explicit DilateOperation(Rectangle kernel) INTRINSICCV_STREAMING_COMPATIBLE : kernel_{kernel} {} @@ -432,22 +460,20 @@ class DilateOperation final { void process_horizontal(Rectangle rect, Rows src_rows, Rows dst_rows) INTRINSICCV_STREAMING_COMPATIBLE { - sve2::HorizontalMax{rect, kernel_}.process_rows(src_rows, - dst_rows); + HorizontalMax{rect, kernel_}.process_rows(src_rows, dst_rows); } void process_vertical(Rectangle rect, IndirectRows src_rows, Rows dst_rows) INTRINSICCV_STREAMING_COMPATIBLE { - sve2::VerticalMax{rect, kernel_}.process_rows(src_rows, - dst_rows); + VerticalMax{rect, kernel_}.process_rows(src_rows, dst_rows); } private: Rectangle kernel_; }; // end of class DilateOperation -template +template static intrinsiccv_error_t dilate_sc(const T *src, size_t src_stride, T *dst, size_t dst_stride, size_t width, size_t height, @@ -484,7 +510,7 @@ static intrinsiccv_error_t dilate_sc(const T *src, size_t src_stride, T *dst, Rows current_src_rows = src_rows; Rows current_dst_rows = dst_rows; for (size_t iteration = 0; iteration < workspace->iterations(); ++iteration) { - DilateOperation operation{kernel}; + DilateOperation operation{kernel}; workspace->process(rect, current_src_rows, current_dst_rows, margin, border, workspace->border_type(), operation); // Update source for the next iteration. @@ -494,12 +520,13 @@ static intrinsiccv_error_t dilate_sc(const T *src, size_t src_stride, T *dst, } // Helper structure for erode. -template +template class ErodeOperation final { public: using SourceType = ScalarType; using BufferType = ScalarType; using DestinationType = ScalarType; + using CopyData = CopyDataOperation; explicit ErodeOperation(Rectangle kernel) INTRINSICCV_STREAMING_COMPATIBLE : kernel_{kernel} {} @@ -507,22 +534,20 @@ class ErodeOperation final { void process_horizontal(Rectangle rect, Rows src_rows, Rows dst_rows) INTRINSICCV_STREAMING_COMPATIBLE { - sve2::HorizontalMin{rect, kernel_}.process_rows(src_rows, - dst_rows); + HorizontalMin{rect, kernel_}.process_rows(src_rows, dst_rows); } void process_vertical(Rectangle rect, IndirectRows src_rows, Rows dst_rows) INTRINSICCV_STREAMING_COMPATIBLE { - sve2::VerticalMin{rect, kernel_}.process_rows(src_rows, - dst_rows); + VerticalMin{rect, kernel_}.process_rows(src_rows, dst_rows); } private: Rectangle kernel_; }; // end of class ErodeOperation -template +template static intrinsiccv_error_t erode_sc(const T *src, size_t src_stride, T *dst, size_t dst_stride, size_t width, size_t height, @@ -559,7 +584,7 @@ static intrinsiccv_error_t erode_sc(const T *src, size_t src_stride, T *dst, Rows current_src_rows = src_rows; Rows current_dst_rows = dst_rows; for (size_t iteration = 0; iteration < workspace->iterations(); ++iteration) { - ErodeOperation operation{kernel}; + ErodeOperation operation{kernel}; workspace->process(rect, current_src_rows, current_dst_rows, margin, border, workspace->border_type(), operation); // Update source for the next iteration. diff --git a/intrinsiccv/src/morphology/morphology_sme2.cpp b/intrinsiccv/src/morphology/morphology_sme2.cpp index 32f9e2d7f..b1864a3af 100644 --- a/intrinsiccv/src/morphology/morphology_sme2.cpp +++ b/intrinsiccv/src/morphology/morphology_sme2.cpp @@ -10,16 +10,16 @@ template INTRINSICCV_LOCALLY_STREAMING INTRINSICCV_TARGET_FN_ATTRS intrinsiccv_error_t dilate(const T *src, size_t src_stride, T *dst, size_t dst_stride, size_t width, size_t height, intrinsiccv_morphology_context_t *context) { - return intrinsiccv::sve2::dilate_sc(src, src_stride, dst, dst_stride, - width, height, context); + return intrinsiccv::sve2::dilate_sc >( + src, src_stride, dst, dst_stride, width, height, context); } template INTRINSICCV_LOCALLY_STREAMING INTRINSICCV_TARGET_FN_ATTRS intrinsiccv_error_t erode(const T *src, size_t src_stride, T *dst, size_t dst_stride, size_t width, size_t height, intrinsiccv_morphology_context_t *context) { - return intrinsiccv::sve2::erode_sc(src, src_stride, dst, dst_stride, width, - height, context); + return intrinsiccv::sve2::erode_sc >( + src, src_stride, dst, dst_stride, width, height, context); } #define INTRINSICCV_INSTANTIATE_TEMPLATE(name, type) \ diff --git a/intrinsiccv/src/morphology/morphology_sve2.cpp b/intrinsiccv/src/morphology/morphology_sve2.cpp index b66abd956..6be0cf693 100644 --- a/intrinsiccv/src/morphology/morphology_sve2.cpp +++ b/intrinsiccv/src/morphology/morphology_sve2.cpp @@ -10,14 +10,16 @@ template INTRINSICCV_TARGET_FN_ATTRS intrinsiccv_error_t dilate(const T *src, size_t src_stride, T *dst, size_t dst_stride, size_t width, size_t height, intrinsiccv_morphology_context_t *context) { - return dilate_sc(src, src_stride, dst, dst_stride, width, height, context); + return dilate_sc >( + src, src_stride, dst, dst_stride, width, height, context); } template INTRINSICCV_TARGET_FN_ATTRS intrinsiccv_error_t erode(const T *src, size_t src_stride, T *dst, size_t dst_stride, size_t width, size_t height, intrinsiccv_morphology_context_t *context) { - return erode_sc(src, src_stride, dst, dst_stride, width, height, context); + return erode_sc >( + src, src_stride, dst, dst_stride, width, height, context); } #define INTRINSICCV_INSTANTIATE_TEMPLATE(name, type) \ diff --git a/scripts/ci-opencv.sh b/scripts/ci-opencv.sh index 3e6e9923b..993827248 100755 --- a/scripts/ci-opencv.sh +++ b/scripts/ci-opencv.sh @@ -22,7 +22,7 @@ tar xf build/opencv.tar.gz -C build rm build/opencv.tar.gz mv build/opencv-${OPENCV_VER} build/opencv patch -d build/opencv -p1 Date: Tue, 19 Mar 2024 11:44:37 +0000 Subject: [PATCH 2/2] Update to Docker image with latest LLVM --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c5b101b59..8da6ec095 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 -image: registry.gitlab.arm.com/intrinsiccv/intrinsiccv:6 +image: registry.gitlab.arm.com/intrinsiccv/intrinsiccv:7 # Only run CI for main branch & merge requests workflow: -- GitLab