OpenCV  4.1.0
Open Source Computer Vision
Macros
modules/core/include/opencv2/core/cuda/functional.hpp File Reference
#include <functional>
#include "saturate_cast.hpp"
#include "vec_traits.hpp"
#include "type_traits.hpp"

Macros

#define OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR(name, func)
 
#define OPENCV_CUDA_IMPLEMENT_MINMAX(name, type, op)
 
#define OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR(name, func)
 
#define OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS(type)   template <> struct TransformFunctorTraits< type > : DefaultTransformFunctorTraits< type >
 

Detailed Description

Deprecated:
Use Device layer instead.

Macro Definition Documentation

#define OPENCV_CUDA_IMPLEMENT_BIN_FUNCTOR (   name,
  func 
)
Value:
template <typename T> struct name ## _func : binary_function<T, T, float> \
{ \
__device__ __forceinline__ float operator ()(typename TypeTraits<T>::ParameterType v1, typename TypeTraits<T>::ParameterType v2) const \
{ \
return func ## f(v1, v2); \
} \
__host__ __device__ __forceinline__ name ## _func() {} \
__host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \
}; \
template <> struct name ## _func<double> : binary_function<double, double, double> \
{ \
__device__ __forceinline__ double operator ()(double v1, double v2) const \
{ \
return func(v1, v2); \
} \
__host__ __device__ __forceinline__ name ## _func() {} \
__host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \
};
#define OPENCV_CUDA_IMPLEMENT_MINMAX (   name,
  type,
  op 
)
Value:
template <> struct name<type> : binary_function<type, type, type> \
{ \
__device__ __forceinline__ type operator()(type lhs, type rhs) const {return op(lhs, rhs);} \
__host__ __device__ __forceinline__ name() {}\
__host__ __device__ __forceinline__ name(const name&) {}\
};
#define OPENCV_CUDA_IMPLEMENT_UN_FUNCTOR (   name,
  func 
)
Value:
template <typename T> struct name ## _func : unary_function<T, float> \
{ \
__device__ __forceinline__ float operator ()(typename TypeTraits<T>::ParameterType v) const \
{ \
return func ## f(v); \
} \
__host__ __device__ __forceinline__ name ## _func() {} \
__host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \
}; \
template <> struct name ## _func<double> : unary_function<double, double> \
{ \
__device__ __forceinline__ double operator ()(double v) const \
{ \
return func(v); \
} \
__host__ __device__ __forceinline__ name ## _func() {} \
__host__ __device__ __forceinline__ name ## _func(const name ## _func&) {} \
};
#define OPENCV_CUDA_TRANSFORM_FUNCTOR_TRAITS (   type)    template <> struct TransformFunctorTraits< type > : DefaultTransformFunctorTraits< type >