mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
Merge pull request #20572 from TolyaTalamanov:at/check-adapter-in-executor
This commit is contained in:
commit
bb5f33d13c
@ -159,8 +159,8 @@ void writeBackExec(const Mag& mag, const RcDesc &rc, GRunArgP &g_arg)
|
||||
// a real copy (add a pass to StreamingBackend?)
|
||||
auto& out_mat = *util::get<cv::Mat*>(g_arg);
|
||||
const auto& rmat = mag.template slot<cv::RMat>().at(rc.id);
|
||||
auto mag_data = rmat.get<RMatAdapter>()->data();
|
||||
if (out_mat.data != mag_data) {
|
||||
auto* adapter = rmat.get<RMatAdapter>();
|
||||
if (adapter != nullptr && out_mat.data != adapter->data()) {
|
||||
auto view = rmat.access(RMat::Access::R);
|
||||
asMat(view).copyTo(out_mat);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user