Skip to content

OCL: workaround#5317

Merged
opencv-pushbot merged 2 commits intoopencv:masterfrom
alalek:workaround
Sep 11, 2015
Merged

OCL: workaround#5317
opencv-pushbot merged 2 commits intoopencv:masterfrom
alalek:workaround

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented Sep 8, 2015

  • getUMat() creates new UMatData (detach from previous Mat (and clones), include their refcounters)
  • MatAllocator::deallocate() must be called with refcount = 0 and urefcount = 0
  • mat_roi.getUMat() creates UMat for original Mat without roi (there are some issues in OpenCL runtime with data alignment in case of USE_HOST_PTR).
check_regression=*UMatTest*CustomPtr*

@vpisarev vpisarev self-assigned this Sep 9, 2015
@vpisarev
Copy link
Copy Markdown
Contributor

vpisarev commented Sep 9, 2015

👍

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Sep 9, 2015

@apavlenko Andrey, could you take a look?

@apavlenko
Copy link
Copy Markdown
Contributor

Looks good for me.

What's about UMat->getMat()->getUMat() ?
It seems we should allow this for RO access only.

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Sep 9, 2015

getUMat() will create a new UMatData without "history" (and mapped Mats). It is not optimal actually, but this workaround provides the right results.

@alalek
Copy link
Copy Markdown
Member Author

alalek commented Sep 9, 2015

@apavlenko Do you mean UMat.testTempObjects_UMat test case?

@apavlenko
Copy link
Copy Markdown
Contributor

yes; since it works let's 👍 this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants