GAPI Fluid: SIMD for DivRC kernel.#21530
Conversation
d7e2890 to
d51236a
Compare
9e87de6 to
50443db
Compare
sivanov-work
left a comment
There was a problem hiding this comment.
@anna-khakimova
I checked out 4 files from 6 and have understood that it takes too much time then i supposed.
If this is urgent then I suggest you to find another reviewer: I'm very sorry but I have much load on this week. Furthermore we need to finish another one PR for DX11/OpenCL which had started before DivRC and got several unresolved questions.
Sorry, i cannot proceed with this PR on this week
| template<typename DST, typename SRC> | ||
| static void run_arithm_rs(Buffer &dst, const View &src, const float scalar[4], Arithm arithm, | ||
| float scale=1) | ||
| CV_ALWAYS_INLINE void run_arithm_rs(Buffer &dst, const View &src, const float scalar[], |
There was a problem hiding this comment.
is scalar size changed from 4?
There was a problem hiding this comment.
The scalar array is a pointer to scratch buffer that was filled in a special way.
| GMatDesc bufdesc = { CV_32F, 1, bufsize }; | ||
| Buffer buffer(bufdesc); | ||
| scratch = std::move(buffer); | ||
| scratch = std::move(Buffer(GMatDesc(CV_32F, 1, cv::Size(buflen, 1)))); |
There was a problem hiding this comment.
suggest to remove std::mode or swap it if available
| template<typename scalar_t> | ||
| using univ_zero_vec_type_of_t = typename univ_zero_vec_type_of<scalar_t>::type; | ||
|
|
||
| template<> struct univ_zero_vec_type_of<uchar> { using type = v_uint8; }; |
There was a problem hiding this comment.
what does it mean - univ?
| template<typename scalar_t> | ||
| using zero_vec_type_of_t = typename zero_vec_type_of<scalar_t>::type; | ||
|
|
||
| template<> struct zero_vec_type_of<uchar> { using type = v_int16; }; |
There was a problem hiding this comment.
int16 for uchar? is it not mistake?
There was a problem hiding this comment.
It's not mistake it's implementation specifics.
| } \ | ||
| } \ | ||
| default: \ | ||
| GAPI_Assert(chan <= 4); \ |
There was a problem hiding this comment.
i think there may be warning for walking through switch-cases
There was a problem hiding this comment.
There is no warnings.
50443db to
6d830cc
Compare
6d830cc to
f6bf71e
Compare
|
|
||
| // FIXIT Unstable input data for divide | ||
| initMatsRandU(type, sz, dtype, false); | ||
| //This condition need as workaround the bug in the OpenCV. |
dmatveev
left a comment
There was a problem hiding this comment.
Approved but please address Alexander's comment
* GAPI Fluid: SIMD for DivRC kernel. * Fluid: Div kernel's SIMD refactoring * SIMD for DivRC 3 channel case * Applied comments
Add SIMD for GAPI Fluid DivRC kernel.
Performance report:
FluidDivRCSIMD.xlsx