From c7a3a7d4d98687e38f095b57d78f94d216841129 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Tue, 30 Jul 2013 13:48:46 +0400 Subject: [PATCH] switched to new device layer in min/max --- modules/cudaarithm/src/cuda/minmax_mat.cu | 267 ++++++++++++++------------ modules/cudaarithm/src/element_operations.cpp | 153 +-------------- 2 files changed, 143 insertions(+), 277 deletions(-) diff --git a/modules/cudaarithm/src/cuda/minmax_mat.cu b/modules/cudaarithm/src/cuda/minmax_mat.cu index 9af5c81..405b230 100644 --- a/modules/cudaarithm/src/cuda/minmax_mat.cu +++ b/modules/cudaarithm/src/cuda/minmax_mat.cu @@ -40,189 +40,204 @@ // //M*/ -#if !defined CUDA_DISABLER +#include "opencv2/opencv_modules.hpp" -#include "opencv2/core/cuda/common.hpp" -#include "opencv2/core/cuda/functional.hpp" -#include "opencv2/core/cuda/transform.hpp" -#include "opencv2/core/cuda/saturate_cast.hpp" -#include "opencv2/core/cuda/simd_functions.hpp" +#ifndef HAVE_OPENCV_CUDEV -#include "arithm_func_traits.hpp" +#error "opencv_cudev is required" -using namespace cv::cuda; -using namespace cv::cuda::device; +#else -////////////////////////////////////////////////////////////////////////// -// min +#include "opencv2/cudev.hpp" -namespace arithm +using namespace cv::cudev; + +void minMaxMat(const GpuMat& src1, const GpuMat& src2, GpuMat& dst, const GpuMat&, double, Stream& stream, int op); + +void minMaxScalar(const GpuMat& src, cv::Scalar value, bool, GpuMat& dst, const GpuMat&, double, Stream& stream, int op); + +/////////////////////////////////////////////////////////////////////// +/// minMaxMat + +namespace { - struct VMin4 : binary_function + template