Serialization && deserialization for compile arguments#18496
Serialization && deserialization for compile arguments#18496alalek merged 38 commits intoopencv:masterfrom
Conversation
…ort_serialization_api
…ort_serialization_api
…nto comp_args_serialization
…rgs_serialization
dmatveev
left a comment
There was a problem hiding this comment.
Looks ok in general, but can be simplified.
Please simplify
| } // namespace detail | ||
| } // namespace s11n | ||
| } // namespace gapi | ||
| } // namespace cv |
There was a problem hiding this comment.
With the test for it?
There was a problem hiding this comment.
You can put your S11N with your test.
There was a problem hiding this comment.
I can't because another test cpp-s which use GFluidOutputRois will use instantiations of primary S11N template and not my specialization, and compiler will choose instantiations from my and theirs (in other tests) on its own
There was a problem hiding this comment.
Should I add my specialization in any test cpp which uses GFluidOutputRois ?
There was a problem hiding this comment.
No, why? Only where you want to test it for the S11N.
There was a problem hiding this comment.
Created a JIRA ticket as discussed: https://jira.devtools.intel.com/browse/ADE-2179
| static void serialize(gapi::s11n::IOStream& os, const util::any& arg) | ||
| { | ||
| using decayed_type = typename std::decay<T>::type; | ||
| S11N<decayed_type>::serialize(os, util::any_cast<decayed_type>(arg)); |
There was a problem hiding this comment.
so then you call arg.get<T>() (the existing one) instead of calling any_cast directly... (2/3)
There was a problem hiding this comment.
I've left util::any here because have added 'serialize()' method into GCompileArg which passes its private arg member into this callback
There was a problem hiding this comment.
Put a cv::GCompileArg here as an argument.
dmatveev
left a comment
There was a problem hiding this comment.
Commented outside the review
|
Please take a look on build warnings
|
| } | ||
|
|
||
| private: | ||
| std::function<void(cv::gapi::s11n::IOStream&, const GCompileArg&)> serializeF; |
There was a problem hiding this comment.
- problem is here
- and in
GAPI_EXPORTS_W_SIMPLEin GCompileArg
There was a problem hiding this comment.
Can you please explain what the problem is here? (CC: @TolyaTalamanov )
|
Thanks for merge! Great |
Serialization && deserialization for compile arguments * Initial stub * Add test on serialization of a custom type * Namespaces rework * Fix isSupported in test struct * Fix clang lookup issue * Initial implementation * Drop the isSupported flag * Initial implementation * Removed internal header inclusion * Switched to public API * Implemented serialization * Adding desirialize: WIP * Fixed merge errors * Implemented * Final polishing * Addressed review comments and added debug throw * Added FluidROI test * Polishing * Polishing * Polishing * Polishing * Polishing * Updated CMakeLists.txt * Fixed comments * Addressed review comments * Removed decay from deserialize_arg * Addressed review comments * Removed extra inclusion * Fixed Win64 warning * Update gcommon.hpp * Update serialization.cpp * Update gcommon.hpp * gapi: drop GAPI_EXPORTS_W_SIMPLE from GCompileArg Co-authored-by: Smirnov Alexey <alexey.smirnov@intel.com> Co-authored-by: AsyaPronina <155jj@mail.ru>
Serialization && deserialization for compile arguments * Initial stub * Add test on serialization of a custom type * Namespaces rework * Fix isSupported in test struct * Fix clang lookup issue * Initial implementation * Drop the isSupported flag * Initial implementation * Removed internal header inclusion * Switched to public API * Implemented serialization * Adding desirialize: WIP * Fixed merge errors * Implemented * Final polishing * Addressed review comments and added debug throw * Added FluidROI test * Polishing * Polishing * Polishing * Polishing * Polishing * Updated CMakeLists.txt * Fixed comments * Addressed review comments * Removed decay from deserialize_arg * Addressed review comments * Removed extra inclusion * Fixed Win64 warning * Update gcommon.hpp * Update serialization.cpp * Update gcommon.hpp * gapi: drop GAPI_EXPORTS_W_SIMPLE from GCompileArg Co-authored-by: Smirnov Alexey <alexey.smirnov@intel.com> Co-authored-by: AsyaPronina <155jj@mail.ru>
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.