Skip to content

fix AVX compile error#20895

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
sergiud:avx-error-immediate
Oct 18, 2021
Merged

fix AVX compile error#20895
opencv-pushbot merged 1 commit intoopencv:3.4from
sergiud:avx-error-immediate

Conversation

@sergiud
Copy link
Copy Markdown
Contributor

@sergiud sergiud commented Oct 18, 2021

This PR fixes OpenCV compilation with enabled AVX intrinsics on some older compilers by ensuring the constant is immediate. This is also now consistent with how the remaining immediates are defined in the header.

Pull Request Readiness Checklist

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

Some older compilers do not allow to pass a `const int` as an immediate. Use an unnamed enum instead.
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 👍

@opencv-pushbot opencv-pushbot merged commit c316dbe into opencv:3.4 Oct 18, 2021
@sergiud sergiud deleted the avx-error-immediate branch October 18, 2021 19:11
@alalek alalek mentioned this pull request Oct 23, 2021
@alalek alalek mentioned this pull request Dec 30, 2021
@alalek alalek mentioned this pull request Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants