From ec55b6f6db97f02e97138d6365f836e8eb8419c4 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 21 Nov 2019 18:59:41 +0300 Subject: [PATCH] core: fix MSA build --- .../core/include/opencv2/core/hal/intrin_msa.hpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/modules/core/include/opencv2/core/hal/intrin_msa.hpp b/modules/core/include/opencv2/core/hal/intrin_msa.hpp index ca2cba725d..0db137b032 100755 --- a/modules/core/include/opencv2/core/hal/intrin_msa.hpp +++ b/modules/core/include/opencv2/core/hal/intrin_msa.hpp @@ -1789,10 +1789,20 @@ inline typename _Tp::lane_type v_extract_n(const _Tp& a) return v_rotate_right(a).get0(); } -template -inline _Tp v_broadcast_element(const _Tp& a) +template +inline v_uint32x4 v_broadcast_element(const v_uint32x4& a) { - return _Tp::all(v_extract_n(a)); + return v_setall_u32(v_extract_n(a)); +} +template +inline v_int32x4 v_broadcast_element(const v_int32x4& a) +{ + return v_setall_s32(v_extract_n(a)); +} +template +inline v_float32x4 v_broadcast_element(const v_float32x4& a) +{ + return v_setall_f32(v_extract_n(a)); } ////// FP16 suport ///////