Fix v_pack_store alignment issue on Windows 32-bit.

This commit is contained in:
Alexander Smorkalov 2023-08-08 14:10:29 +03:00
parent 5f5fb11c66
commit 2311c14582

View File

@ -721,14 +721,13 @@ namespace CV__SIMD_NAMESPACE {
//! @}
#ifndef OPENCV_HAL_HAVE_LOAD_STORE_BFLOAT16
inline v_float32 vx_load_expand(const bfloat16_t* ptr)
{
v_uint32 v = vx_load_expand((const ushort*)ptr);
return v_reinterpret_as_f32(v_shl<16>(v));
}
inline void v_pack_store(const bfloat16_t* ptr, v_float32 v)
inline void v_pack_store(const bfloat16_t* ptr, const v_float32& v)
{
v_int32 iv = v_shr<16>(v_reinterpret_as_s32(v));
v_pack_store((short*)ptr, iv);