Skip to content

Commit 3ee12cb

Browse files
author
Vladislav Vinogradov
committed
switched to Input/Output Array in gpu::divide
1 parent 4595e3a commit 3ee12cb

File tree

5 files changed

+271
-502
lines changed

5 files changed

+271
-502
lines changed

modules/gpuarithm/include/opencv2/gpuarithm.hpp

+7-5
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ CV_EXPORTS void subtract(InputArray src1, InputArray src2, OutputArray dst, Inpu
6060
//! computes element-wise weighted product of the two arrays (dst = scale * src1 * src2)
6161
CV_EXPORTS void multiply(InputArray src1, InputArray src2, OutputArray dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null());
6262

63-
//! computes element-wise weighted quotient of the two arrays (c = a / b)
64-
CV_EXPORTS void divide(const GpuMat& a, const GpuMat& b, GpuMat& c, double scale = 1, int dtype = -1, Stream& stream = Stream::Null());
65-
//! computes element-wise weighted quotient of matrix and scalar (c = a / s)
66-
CV_EXPORTS void divide(const GpuMat& a, const Scalar& sc, GpuMat& c, double scale = 1, int dtype = -1, Stream& stream = Stream::Null());
63+
//! computes element-wise weighted quotient of the two arrays (dst = scale * (src1 / src2))
64+
CV_EXPORTS void divide(InputArray src1, InputArray src2, OutputArray dst, double scale = 1, int dtype = -1, Stream& stream = Stream::Null());
65+
6766
//! computes element-wise weighted reciprocal of an array (dst = scale/src2)
68-
CV_EXPORTS void divide(double scale, const GpuMat& b, GpuMat& c, int dtype = -1, Stream& stream = Stream::Null());
67+
static inline void divide(double src1, InputArray src2, OutputArray dst, int dtype = -1, Stream& stream = Stream::Null())
68+
{
69+
divide(src1, src2, dst, 1.0, dtype, stream);
70+
}
6971

7072
//! computes the weighted sum of two arrays (dst = alpha*src1 + beta*src2 + gamma)
7173
CV_EXPORTS void addWeighted(const GpuMat& src1, double alpha, const GpuMat& src2, double beta, double gamma, GpuMat& dst,

modules/gpuarithm/src/cuda/div_inv.cu

-144
This file was deleted.

0 commit comments

Comments
 (0)