-
-
Notifications
You must be signed in to change notification settings - Fork 56.3k
Clean up the obsolete API of Universal Intrinsic #24371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Related: opencv/opencv_contrib#3572 |
365dbd9
to
df45b85
Compare
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? |
@hanliutong I recommend to squash commits. |
squashed |
The test passed after re-running
but I can not reproduce it on my m1 mac :
my cmake config is
Do you have any ideas? What do I need to do further? |
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::nlanes
VTraits<vType>::vlanes()
vType::nlanes
(constant)VTraits<vType>::max_nlanes
vType::lane_type
VTraits<vType>::lane_type
vc += 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 expression
private
. 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.