Merge pull request #25793 from MaximMilashchenko:hal_rvv

Fixed build error hal_rvv_071 #25793

Fixed bug with enabling vector header when vector extension is disabled (RVV=OFF) in hal_rvv_071
This commit is contained in:
Maxim Milashchenko 2024-06-28 09:00:16 +03:00 committed by GitHub
parent 284a79446a
commit 786726719f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -5,8 +5,6 @@
#ifndef OPENCV_HAL_RVV_HPP_INCLUDED
#define OPENCV_HAL_RVV_HPP_INCLUDED
#include <riscv_vector.h>
#include "opencv2/core/hal/interface.h"
#ifndef CV_HAL_RVV_071_ENABLED

View File

@ -5,6 +5,8 @@
#ifndef OPENCV_HAL_RVV_071_HPP_INCLUDED
#define OPENCV_HAL_RVV_071_HPP_INCLUDED
#include <riscv_vector.h>
#include <limits>
namespace cv { namespace cv_hal_rvv {

View File

@ -1037,9 +1037,13 @@ foreach(hal ${OpenCV_HAL})
message(STATUS "NDSRVP: Andes GNU Toolchain DSP extension is not open, disabling ndsrvp...")
endif()
elseif(hal STREQUAL "halrvv")
if(";${CPU_BASELINE_FINAL};" MATCHES ";RVV;")
add_subdirectory(3rdparty/hal_rvv/)
ocv_hal_register(RVV_HAL_LIBRARIES RVV_HAL_HEADERS RVV_HAL_INCLUDE_DIRS)
list(APPEND OpenCV_USED_HAL "HAL RVV (ver ${RVV_HAL_VERSION})")
else()
message(STATUS "HAL RVV: RVV is not available, disabling halrvv...")
endif()
elseif(hal STREQUAL "openvx")
add_subdirectory(3rdparty/openvx)
ocv_hal_register(OPENVX_HAL_LIBRARIES OPENVX_HAL_HEADERS OPENVX_HAL_INCLUDE_DIRS)