Clean up the obsolete API of Universal Intrinsic#24371
Merged
asmorkalov merged 1 commit intoopencv:4.xfrom Oct 20, 2023
Merged
Conversation
6 tasks
Contributor
Author
|
Related: opencv/opencv_contrib#3572 |
365dbd9 to
df45b85
Compare
mshabunin
reviewed
Oct 9, 2023
mshabunin
reviewed
Oct 10, 2023
mshabunin
approved these changes
Oct 11, 2023
Contributor
Author
|
Hello @asmorkalov, I found that the #24324 has been merged and I am going to resolve the conflict through rebase 4.x Should I Squash the commits into one? or just rebase and keep those commits as is? |
Contributor
|
@hanliutong I recommend to squash commits. |
Contributor
Author
|
squashed |
Contributor
Author
|
The test passed after re-running
but I can not reproduce it on my m1 mac : my cmake config is DetailsDo you have any ideas? What do I need to do further? |
Merged
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge with contrib: opencv/opencv_contrib#3572
This patch cleans up the obsolete API of Universal Intrinsic to ensure that new code will not use them.
Obsolete API of Universal Intrinsic
In order to support scalable vector backends (such as RVV), we introduced some API changes to Universal Intrinsic last year: PR #22179. These changes resulted in following obsolete APIs: they only work with fixed-length backends and are incompatible with scalable vector backend.
vType::nlanesVTraits<vType>::vlanes()vType::nlanes(constant)VTraits<vType>::max_nlanesvType::lane_typeVTraits<vType>::lane_typevc += va + vb)vc = v_add(va, vb, vc))vObj.get0()v_get(vObj)v_extract_n<vType::nlanes-1>(vObj)v_extract_highest(vObj)v_broadcast_element<vType::nlanes-1>(vObj)v_broadcast_highest(vObj)Clean up
To prevent misuse of obsolete APIs, we need to clean up these APIs on at least 1 platform so that the GitHub CI can help with prevent any new code that uses these obsolete APIs from being merged.
This is also the main content of this patch, which mainly includes two aspects:
+), these APIs have been removed. Attempts to use obsolete overloaded operators will encounter the compiler errorerror: invalid operands to binary expressionprivate. Attempts to use obsolete API will encounter the compiler errorerror: '...' is a private member of '...'Note: this patch is waiting for #24324, for testing purposes, this patch contains 419060d, which will be removed after #24324 is merged
TODO: The Universal Intrinsic documentation needs to be modified, I am woring on it.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.