Skip to content

hfloat, float16_t, float collision in 5.x after v_exp and v_log merge #25922

@asmorkalov

Description

@asmorkalov

System Information

OS: MacOS ARM, Android or Linux aarch64.
Appeared in #25915

Detailed description

  1. vx_setall_f16 does not work with regular float constants. e.g. vx_setall_f16(-10.7421875f) leads to compiler error:
/Users/opencv-cn/GHA-OCV-3/_work/opencv/opencv/opencv/modules/core/include/opencv2/core/hal/intrin_math.hpp:45:40: error: no matching function for call to 'vx_setall_f16'
        const v_float16 _vexp_lo_f16 = vx_setall_f16(-10.7421875f);
                                       ^~~~~~~~~~~~~
/Users/opencv-cn/GHA-OCV-3/_work/opencv/opencv/opencv/modules/core/include/opencv2/core/hal/intrin.hpp:573:22: note: candidate function not viable: no known conversion from 'float' to 'cv::hfloat' for 1st argument
  1. __test_exp((float16_t) 10, (float16_t) 1e-2, (float16_t) 1e2, flt16_min) cannot be build due to float16_t conflict with cv::hfloat.

Steps to reproduce

Remove disabler at test_intrin_utils.hpp:1954
Build for Mac M1

Issue submission checklist

  • I report the issue, it's not a question
  • I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
  • I updated to the latest OpenCV version and the issue is still there
  • There is reproducer code and related data files (videos, images, onnx, etc)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions