Logo
OpenCV  2.4.13
Open Source Computer Vision
Classes | Namespaces | Macros | Functions
functional.hpp File Reference
#include <functional>
#include "saturate_cast.hpp"
#include "vec_traits.hpp"
#include "type_traits.hpp"
#include "device_functions.h"

Classes

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Namespaces

  cv
 
  cv::gpu
 
 
 

Macros

#define  OPENCV_GPU_IMPLEMENT_MINMAX(name, type, op)
 
#define  OPENCV_GPU_IMPLEMENT_UN_FUNCTOR(name, func)
 
#define  OPENCV_GPU_IMPLEMENT_BIN_FUNCTOR(name, func)
 
#define  OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(type)   template <> struct TransformFunctorTraits< type > : DefaultTransformFunctorTraits< type >
 

Functions

template<typename Predicate >
__host__ __device__ __forceinline__ unary_negate< Predicate >  cv::gpu::device::not1 (const Predicate &pred)
 
template<typename BinaryPredicate >
__host__ __device__ __forceinline__ binary_negate< BinaryPredicate >  cv::gpu::device::not2 (const BinaryPredicate &pred)
 
template<typename Op , typename T >
__host__ __device__ __forceinline__ binder1st< Op >  cv::gpu::device::bind1st (const Op &op, const T &x)
 
template<typename Op , typename T >
__host__ __device__ __forceinline__ binder2nd< Op >  cv::gpu::device::bind2nd (const Op &op, const T &x)
 

Macro Definition Documentation

#define OPENCV_GPU_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_GPU_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_GPU_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_GPU_TRANSFORM_FUNCTOR_TRAITS (   type )    template <> struct TransformFunctorTraits< type > : DefaultTransformFunctorTraits< type >

AltStyle によって変換されたページ (->オリジナル) /