cudaarithm: make the asynchronous call to NPP safe#11064
Merged
opencv-pushbot merged 2 commits intoopencv:masterfrom Mar 23, 2018
Merged
cudaarithm: make the asynchronous call to NPP safe#11064opencv-pushbot merged 2 commits intoopencv:masterfrom
opencv-pushbot merged 2 commits intoopencv:masterfrom
Conversation
alalek
reviewed
Mar 13, 2018
| { | ||
| oldStream = nppGetStream(); | ||
| nppSetStream(StreamAccessor::getStream(newStream)); | ||
| safeNppSetStream(oldStream, StreamAccessor::getStream(newStream)); |
Member
There was a problem hiding this comment.
Perhaps we should bailout if newStream equals to oldStream
fd150e4 to
c69c18d
Compare
nglee
reviewed
Mar 14, 2018
| nppSafeSetStream(oldStream, newStream); | ||
| } | ||
|
|
||
| inline ~NppStreamHandler() |
Contributor
There was a problem hiding this comment.
Maybe the destructor should also use the macro.
Contributor
Author
ef1ae71 to
6e31b2b
Compare
* Stop calling nppSetStream
c2a27b2 to
f4e5d77
Compare
Contributor
|
@tomoaki0705 That is, from here, we might want to change above code to: IMHO, the npp kernels may still be running when the |
Contributor
Author
|
Ahhh!!!! Very nice catch @nglee, |
This was referenced Oct 3, 2024
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.
resolves #11063