From: Dmitry Matveev Date: Tue, 20 Nov 2018 11:00:08 +0000 (+0300) Subject: G-API: Recent inclusion has broken STANDALONE build X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1^2~416^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b13df53685dca7451a82abeac775f7747b317c1;p=platform%2Fupstream%2Fopencv.git G-API: Recent inclusion has broken STANDALONE build This MR fixes this. --- diff --git a/modules/gapi/src/api/gbackend.cpp b/modules/gapi/src/api/gbackend.cpp index 8df8b36..8144d21 100644 --- a/modules/gapi/src/api/gbackend.cpp +++ b/modules/gapi/src/api/gbackend.cpp @@ -94,8 +94,12 @@ void bindInArg(Mag& mag, const RcDesc &rc, const GRunArg &arg, bool is_umat) case GRunArg::index_of() : if (is_umat) { +#if !defined(GAPI_STANDALONE) auto& mag_umat = mag.template slot()[rc.id]; mag_umat = to_ocv(util::get(arg)).getUMat(ACCESS_READ); +#else + util::throw_error(std::logic_error("UMat is not supported in stadnalone build")); +#endif // !defined(GAPI_STANDALONE) } else { @@ -157,8 +161,12 @@ void bindOutArg(Mag& mag, const RcDesc &rc, const GRunArgP &arg, bool is_umat) case GRunArgP::index_of() : if (is_umat) { +#if !defined(GAPI_STANDALONE) auto& mag_umat = mag.template slot()[rc.id]; mag_umat = to_ocv(*(util::get(arg))).getUMat(ACCESS_RW); +#else + util::throw_error(std::logic_error("UMat is not supported in standalone build")); +#endif // !defined(GAPI_STANDALONE) } else { @@ -256,7 +264,13 @@ cv::GRunArgP getObjPtr(Mag& mag, const RcDesc &rc, bool is_umat) { case GShape::GMAT: if (is_umat) + { +#if !defined(GAPI_STANDALONE) return GRunArgP(&mag.template slot()[rc.id]); +#else + util::throw_error(std::logic_error("UMat is not supported in standalone build")); +#endif // !defined(GAPI_STANDALONE) + } else return GRunArgP(&mag.template slot()[rc.id]); case GShape::GSCALAR: return GRunArgP(&mag.template slot()[rc.id]); @@ -300,8 +314,12 @@ void writeBack(const Mag& mag, const RcDesc &rc, GRunArgP &g_arg, bool is_umat) } if (is_umat) { +#if !defined(GAPI_STANDALONE) auto& in_mag = mag.template slot().at(rc.id); GAPI_Assert((out_arg_data == (in_mag.getMat(ACCESS_RW).data)) && " data for output parameters was reallocated ?"); +#else + util::throw_error(std::logic_error("UMat is not supported in standalone build")); +#endif // !defined(GAPI_STANDALONE) } else {