|
|
@ -159,8 +159,8 @@ void writeBackExec(const Mag& mag, const RcDesc &rc, GRunArgP &g_arg) |
|
|
|
// a real copy (add a pass to StreamingBackend?)
|
|
|
|
// a real copy (add a pass to StreamingBackend?)
|
|
|
|
auto& out_mat = *util::get<cv::Mat*>(g_arg); |
|
|
|
auto& out_mat = *util::get<cv::Mat*>(g_arg); |
|
|
|
const auto& rmat = mag.template slot<cv::RMat>().at(rc.id); |
|
|
|
const auto& rmat = mag.template slot<cv::RMat>().at(rc.id); |
|
|
|
auto mag_data = rmat.get<RMatAdapter>()->data(); |
|
|
|
auto* adapter = rmat.get<RMatAdapter>(); |
|
|
|
if (out_mat.data != mag_data) { |
|
|
|
if (adapter != nullptr && out_mat.data != adapter->data()) { |
|
|
|
auto view = rmat.access(RMat::Access::R); |
|
|
|
auto view = rmat.access(RMat::Access::R); |
|
|
|
asMat(view).copyTo(out_mat); |
|
|
|
asMat(view).copyTo(out_mat); |
|
|
|
} |
|
|
|
} |
|
|
|