1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Merge pull request #25936 from savuor:rv/hal_dot

HAL for dot product added #25936

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Rostislav Vasilikhin
2024-07-23 07:06:15 +02:00
committed by GitHub
parent c9b57819b1
commit 44c814e334
2 changed files with 31 additions and 1 deletions
+10 -1
View File
@@ -995,9 +995,18 @@ double Mat::dot(InputArray _mat) const
CV_INSTRUMENT_REGION();
Mat mat = _mat.getMat();
CV_Assert_N( mat.type() == type(), mat.size == size);
int cn = channels();
if (this->dims <= 2)
{
double product = 0;
CALL_HAL_RET(dotProduct, cv_hal_dotProduct, product, this->data, this->step, mat.data, mat.step,
this->cols * cn, this->rows, this->depth());
}
DotProdFunc func = getDotProdFunc(depth());
CV_Assert_N( mat.type() == type(), mat.size == size, func != 0 );
CV_Assert(func != 0 );
if( isContinuous() && mat.isContinuous() )
{