mirror of
https://github.com/opencv/opencv.git
synced 2026-12-03 05:33:03 -06:00
Merge pull request #30259 from SavyaSanchi-Sharma:core/umat
core: explicit UMat transfers for non OpenCL builds - #30259 ## Summary Core groundwork for moving the DNN CUDA backend from mapped `getMat()` to explicit host/device copies (related: #29807): -`fitSameSize` keeps tensor layout, the missing `_OutputArray::fit*` overloads are defined, `UMat::create` reports a failing bound allocator, and cross-allocator `copyTo` no longer maps a device destination. - OpenCL paths (`Kernel::set`, `isCLBuffer`, clFFT, `arithm_op`) now decline CUDA UMats instead of passing a CUDA pointer as `cl_mem`, which segfaulted with NVIDIA OpenCL. - Adds a private `HostDeviceBuffer` (CUDA → OpenCL → CPU fallback) for the follow-up DNN PR, with tests for all of the above. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
committed by
GitHub
parent
37040df206
commit
593b70435d
@@ -1145,9 +1145,7 @@ void Mat::fit(Size _sz, int _type)
|
||||
|
||||
void Mat::fitSameSize(InputArray m, int _type)
|
||||
{
|
||||
int _sizes[CV_MAX_DIM];
|
||||
int _dims = m.sizend(_sizes);
|
||||
fit(_dims, _sizes, _type);
|
||||
fit(m.shape(), _type);
|
||||
}
|
||||
|
||||
void Mat::addref()
|
||||
|
||||
Reference in New Issue
Block a user