1793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/*M/////////////////////////////////////////////////////////////////////////////////////// 2793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 3793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 5793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// By downloading, copying, installing or using the software you agree to this license. 6793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// If you do not agree to this license, do not download, install, 7793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// copy or use the software. 8793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 9793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 10793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// License Agreement 11793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// For Open Source Computer Vision Library 12793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 13793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// Third party copyrights are property of their respective owners. 16793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 17793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// Redistribution and use in source and binary forms, with or without modification, 18793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// are permitted provided that the following conditions are met: 19793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 20793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// * Redistribution's of source code must retain the above copyright notice, 21793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// this list of conditions and the following disclaimer. 22793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 23793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// * Redistribution's in binary form must reproduce the above copyright notice, 24793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// this list of conditions and the following disclaimer in the documentation 25793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// and/or other materials provided with the distribution. 26793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 27793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// * The name of the copyright holders may not be used to endorse or promote products 28793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// derived from this software without specific prior written permission. 29793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 30793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// This software is provided by the copyright holders and contributors "as is" and 31793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// any express or implied warranties, including, but not limited to, the implied 32793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// warranties of merchantability and fitness for a particular purpose are disclaimed. 33793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// In no event shall the Intel Corporation or contributors be liable for any direct, 34793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// indirect, incidental, special, exemplary, or consequential damages 35793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// (including, but not limited to, procurement of substitute goods or services; 36793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// loss of use, data, or profits; or business interruption) however caused 37793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// and on any theory of liability, whether in contract, strict liability, 38793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// or tort (including negligence or otherwise) arising in any way out of 39793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// the use of this software, even if advised of the possibility of such damage. 40793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// 41793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//M*/ 42793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 43793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#ifndef __OPENCV_CUDA_VECMATH_HPP__ 44793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define __OPENCV_CUDA_VECMATH_HPP__ 45793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 46793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#include "vec_traits.hpp" 47793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#include "saturate_cast.hpp" 48793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 49793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler/** @file 50793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler * @deprecated Use @ref cudev instead. 51793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler */ 52793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 53793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//! @cond IGNORED 54793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 55793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslernamespace cv { namespace cuda { namespace device 56793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler{ 57793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 58793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// saturate_cast 59793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 60793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslernamespace vec_math_detail 61793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler{ 62793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <int cn, typename VecD> struct SatCastHelper; 63793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecD> struct SatCastHelper<1, VecD> 64793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 65793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecS> static __device__ __forceinline__ VecD cast(const VecS& v) 66793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 67793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler typedef typename VecTraits<VecD>::elem_type D; 68793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<VecD>::make(saturate_cast<D>(v.x)); 69793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 70793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler }; 71793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecD> struct SatCastHelper<2, VecD> 72793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 73793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecS> static __device__ __forceinline__ VecD cast(const VecS& v) 74793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 75793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler typedef typename VecTraits<VecD>::elem_type D; 76793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y)); 77793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 78793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler }; 79793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecD> struct SatCastHelper<3, VecD> 80793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 81793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecS> static __device__ __forceinline__ VecD cast(const VecS& v) 82793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 83793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler typedef typename VecTraits<VecD>::elem_type D; 84793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y), saturate_cast<D>(v.z)); 85793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 86793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler }; 87793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecD> struct SatCastHelper<4, VecD> 88793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 89793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecS> static __device__ __forceinline__ VecD cast(const VecS& v) 90793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 91793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler typedef typename VecTraits<VecD>::elem_type D; 92793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<VecD>::make(saturate_cast<D>(v.x), saturate_cast<D>(v.y), saturate_cast<D>(v.z), saturate_cast<D>(v.w)); 93793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 94793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler }; 95793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 96793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler template <typename VecD, typename VecS> static __device__ __forceinline__ VecD saturate_cast_helper(const VecS& v) 97793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { 98793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return SatCastHelper<VecTraits<VecD>::cn, VecD>::cast(v); 99793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 100793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler} 101793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 102793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uchar1& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 103793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const char1& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 104793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const ushort1& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 105793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const short1& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 106793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uint1& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 107793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const int1& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 108793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const float1& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 109793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const double1& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 110793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 111793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uchar2& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 112793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const char2& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 113793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const ushort2& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 114793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const short2& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 115793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uint2& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 116793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const int2& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 117793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const float2& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 118793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const double2& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 119793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 120793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uchar3& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 121793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const char3& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 122793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const ushort3& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 123793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const short3& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 124793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uint3& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 125793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const int3& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 126793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const float3& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 127793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const double3& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 128793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 129793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uchar4& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 130793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const char4& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 131793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const ushort4& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 132793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const short4& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 133793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const uint4& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 134793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const int4& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 135793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const float4& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 136793ee12c6df9cad3806238d32528c49a3ff9331dNoah Preslertemplate<typename T> static __device__ __forceinline__ T saturate_cast(const double4& v) {return vec_math_detail::saturate_cast_helper<T>(v);} 137793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 138793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// unary operators 139793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 140793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define CV_CUDEV_IMPLEMENT_VEC_UNARY_OP(op, input_type, output_type) \ 141793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 1 operator op(const input_type ## 1 & a) \ 142793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 143793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 1>::make(op (a.x)); \ 144793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 145793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 2 operator op(const input_type ## 2 & a) \ 146793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 147793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 2>::make(op (a.x), op (a.y)); \ 148793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 149793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 3 operator op(const input_type ## 3 & a) \ 150793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 151793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 3>::make(op (a.x), op (a.y), op (a.z)); \ 152793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 153793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 4 operator op(const input_type ## 4 & a) \ 154793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 155793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 4>::make(op (a.x), op (a.y), op (a.z), op (a.w)); \ 156793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 157793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 158793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, char, char) 159793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, short, short) 160793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, int, int) 161793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, float, float) 162793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(-, double, double) 163793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 164793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, uchar, uchar) 165793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, char, uchar) 166793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, ushort, uchar) 167793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, short, uchar) 168793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, int, uchar) 169793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, uint, uchar) 170793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, float, uchar) 171793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(!, double, uchar) 172793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 173793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, uchar, uchar) 174793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, char, char) 175793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, ushort, ushort) 176793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, short, short) 177793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, int, int) 178793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_OP(~, uint, uint) 179793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 180793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#undef CV_CUDEV_IMPLEMENT_VEC_UNARY_OP 181793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 182793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// unary functions 183793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 184793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define CV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(func_name, func, input_type, output_type) \ 185793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 1 func_name(const input_type ## 1 & a) \ 186793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 187793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 1>::make(func (a.x)); \ 188793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 189793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 2 func_name(const input_type ## 2 & a) \ 190793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 191793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 2>::make(func (a.x), func (a.y)); \ 192793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 193793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 3 func_name(const input_type ## 3 & a) \ 194793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 195793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 3>::make(func (a.x), func (a.y), func (a.z)); \ 196793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 197793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 4 func_name(const input_type ## 4 & a) \ 198793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 199793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 4>::make(func (a.x), func (a.y), func (a.z), func (a.w)); \ 200793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 201793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 202793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, /*::abs*/, uchar, uchar) 203793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::abs, char, char) 204793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, /*::abs*/, ushort, ushort) 205793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::abs, short, short) 206793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::abs, int, int) 207793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, /*::abs*/, uint, uint) 208793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::fabsf, float, float) 209793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(abs, ::fabs, double, double) 210793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 211793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, uchar, float) 212793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, char, float) 213793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, ushort, float) 214793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, short, float) 215793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, int, float) 216793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, uint, float) 217793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrtf, float, float) 218793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sqrt, ::sqrt, double, double) 219793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 220793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, uchar, float) 221793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, char, float) 222793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, ushort, float) 223793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, short, float) 224793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, int, float) 225793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, uint, float) 226793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::expf, float, float) 227793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp, ::exp, double, double) 228793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 229793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, uchar, float) 230793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, char, float) 231793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, ushort, float) 232793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, short, float) 233793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, int, float) 234793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, uint, float) 235793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2f, float, float) 236793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp2, ::exp2, double, double) 237793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 238793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, uchar, float) 239793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, char, float) 240793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, ushort, float) 241793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, short, float) 242793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, int, float) 243793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, uint, float) 244793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10f, float, float) 245793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(exp10, ::exp10, double, double) 246793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 247793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, uchar, float) 248793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, char, float) 249793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, ushort, float) 250793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, short, float) 251793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, int, float) 252793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, uint, float) 253793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::logf, float, float) 254793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log, ::log, double, double) 255793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 256793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, uchar, float) 257793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, char, float) 258793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, ushort, float) 259793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, short, float) 260793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, int, float) 261793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, uint, float) 262793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2f, float, float) 263793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log2, ::log2, double, double) 264793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 265793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, uchar, float) 266793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, char, float) 267793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, ushort, float) 268793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, short, float) 269793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, int, float) 270793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, uint, float) 271793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10f, float, float) 272793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(log10, ::log10, double, double) 273793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 274793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, uchar, float) 275793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, char, float) 276793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, ushort, float) 277793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, short, float) 278793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, int, float) 279793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, uint, float) 280793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sinf, float, float) 281793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sin, ::sin, double, double) 282793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 283793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, uchar, float) 284793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, char, float) 285793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, ushort, float) 286793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, short, float) 287793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, int, float) 288793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, uint, float) 289793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cosf, float, float) 290793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cos, ::cos, double, double) 291793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 292793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, uchar, float) 293793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, char, float) 294793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, ushort, float) 295793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, short, float) 296793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, int, float) 297793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, uint, float) 298793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tanf, float, float) 299793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tan, ::tan, double, double) 300793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 301793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, uchar, float) 302793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, char, float) 303793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, ushort, float) 304793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, short, float) 305793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, int, float) 306793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, uint, float) 307793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asinf, float, float) 308793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asin, ::asin, double, double) 309793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 310793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, uchar, float) 311793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, char, float) 312793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, ushort, float) 313793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, short, float) 314793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, int, float) 315793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, uint, float) 316793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acosf, float, float) 317793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acos, ::acos, double, double) 318793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 319793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, uchar, float) 320793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, char, float) 321793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, ushort, float) 322793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, short, float) 323793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, int, float) 324793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, uint, float) 325793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atanf, float, float) 326793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atan, ::atan, double, double) 327793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 328793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, uchar, float) 329793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, char, float) 330793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, ushort, float) 331793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, short, float) 332793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, int, float) 333793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, uint, float) 334793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinhf, float, float) 335793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(sinh, ::sinh, double, double) 336793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 337793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, uchar, float) 338793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, char, float) 339793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, ushort, float) 340793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, short, float) 341793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, int, float) 342793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, uint, float) 343793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::coshf, float, float) 344793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(cosh, ::cosh, double, double) 345793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 346793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, uchar, float) 347793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, char, float) 348793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, ushort, float) 349793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, short, float) 350793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, int, float) 351793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, uint, float) 352793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanhf, float, float) 353793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(tanh, ::tanh, double, double) 354793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 355793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, uchar, float) 356793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, char, float) 357793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, ushort, float) 358793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, short, float) 359793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, int, float) 360793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, uint, float) 361793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinhf, float, float) 362793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(asinh, ::asinh, double, double) 363793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 364793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, uchar, float) 365793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, char, float) 366793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, ushort, float) 367793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, short, float) 368793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, int, float) 369793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, uint, float) 370793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acoshf, float, float) 371793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(acosh, ::acosh, double, double) 372793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 373793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, uchar, float) 374793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, char, float) 375793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, ushort, float) 376793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, short, float) 377793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, int, float) 378793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, uint, float) 379793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanhf, float, float) 380793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC(atanh, ::atanh, double, double) 381793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 382793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#undef CV_CUDEV_IMPLEMENT_VEC_UNARY_FUNC 383793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 384793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// binary operators (vec & vec) 385793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 386793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define CV_CUDEV_IMPLEMENT_VEC_BINARY_OP(op, input_type, output_type) \ 387793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 1 operator op(const input_type ## 1 & a, const input_type ## 1 & b) \ 388793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 389793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 1>::make(a.x op b.x); \ 390793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 391793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 2 operator op(const input_type ## 2 & a, const input_type ## 2 & b) \ 392793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 393793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 2>::make(a.x op b.x, a.y op b.y); \ 394793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 395793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 3 operator op(const input_type ## 3 & a, const input_type ## 3 & b) \ 396793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 397793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 3>::make(a.x op b.x, a.y op b.y, a.z op b.z); \ 398793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 399793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 4 operator op(const input_type ## 4 & a, const input_type ## 4 & b) \ 400793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 401793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 4>::make(a.x op b.x, a.y op b.y, a.z op b.z, a.w op b.w); \ 402793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 403793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 404793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, uchar, int) 405793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, char, int) 406793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, ushort, int) 407793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, short, int) 408793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, int, int) 409793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, uint, uint) 410793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, float, float) 411793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(+, double, double) 412793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 413793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, uchar, int) 414793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, char, int) 415793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, ushort, int) 416793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, short, int) 417793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, int, int) 418793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, uint, uint) 419793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, float, float) 420793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(-, double, double) 421793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 422793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, uchar, int) 423793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, char, int) 424793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, ushort, int) 425793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, short, int) 426793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, int, int) 427793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, uint, uint) 428793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, float, float) 429793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(*, double, double) 430793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 431793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, uchar, int) 432793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, char, int) 433793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, ushort, int) 434793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, short, int) 435793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, int, int) 436793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, uint, uint) 437793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, float, float) 438793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(/, double, double) 439793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 440793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, uchar, uchar) 441793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, char, uchar) 442793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, ushort, uchar) 443793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, short, uchar) 444793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, int, uchar) 445793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, uint, uchar) 446793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, float, uchar) 447793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(==, double, uchar) 448793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 449793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, uchar, uchar) 450793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, char, uchar) 451793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, ushort, uchar) 452793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, short, uchar) 453793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, int, uchar) 454793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, uint, uchar) 455793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, float, uchar) 456793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(!=, double, uchar) 457793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 458793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, uchar, uchar) 459793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, char, uchar) 460793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, ushort, uchar) 461793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, short, uchar) 462793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, int, uchar) 463793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, uint, uchar) 464793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, float, uchar) 465793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>, double, uchar) 466793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 467793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, uchar, uchar) 468793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, char, uchar) 469793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, ushort, uchar) 470793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, short, uchar) 471793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, int, uchar) 472793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, uint, uchar) 473793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, float, uchar) 474793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<, double, uchar) 475793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 476793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, uchar, uchar) 477793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, char, uchar) 478793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, ushort, uchar) 479793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, short, uchar) 480793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, int, uchar) 481793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, uint, uchar) 482793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, float, uchar) 483793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(>=, double, uchar) 484793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 485793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, uchar, uchar) 486793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, char, uchar) 487793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, ushort, uchar) 488793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, short, uchar) 489793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, int, uchar) 490793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, uint, uchar) 491793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, float, uchar) 492793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(<=, double, uchar) 493793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 494793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, uchar, uchar) 495793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, char, uchar) 496793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, ushort, uchar) 497793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, short, uchar) 498793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, int, uchar) 499793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, uint, uchar) 500793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, float, uchar) 501793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&&, double, uchar) 502793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 503793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, uchar, uchar) 504793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, char, uchar) 505793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, ushort, uchar) 506793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, short, uchar) 507793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, int, uchar) 508793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, uint, uchar) 509793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, float, uchar) 510793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(||, double, uchar) 511793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 512793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, uchar, uchar) 513793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, char, char) 514793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, ushort, ushort) 515793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, short, short) 516793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, int, int) 517793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(&, uint, uint) 518793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 519793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, uchar, uchar) 520793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, char, char) 521793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, ushort, ushort) 522793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, short, short) 523793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, int, int) 524793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(|, uint, uint) 525793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 526793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, uchar, uchar) 527793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, char, char) 528793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, ushort, ushort) 529793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, short, short) 530793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, int, int) 531793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_OP(^, uint, uint) 532793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 533793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#undef CV_CUDEV_IMPLEMENT_VEC_BINARY_OP 534793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 535793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// binary operators (vec & scalar) 536793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 537793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define CV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(op, input_type, scalar_type, output_type) \ 538793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 1 operator op(const input_type ## 1 & a, scalar_type s) \ 539793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 540793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 1>::make(a.x op s); \ 541793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 542793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 1 operator op(scalar_type s, const input_type ## 1 & b) \ 543793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 544793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 1>::make(s op b.x); \ 545793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 546793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 2 operator op(const input_type ## 2 & a, scalar_type s) \ 547793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 548793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 2>::make(a.x op s, a.y op s); \ 549793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 550793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 2 operator op(scalar_type s, const input_type ## 2 & b) \ 551793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 552793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 2>::make(s op b.x, s op b.y); \ 553793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 554793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 3 operator op(const input_type ## 3 & a, scalar_type s) \ 555793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 556793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 3>::make(a.x op s, a.y op s, a.z op s); \ 557793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 558793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 3 operator op(scalar_type s, const input_type ## 3 & b) \ 559793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 560793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 3>::make(s op b.x, s op b.y, s op b.z); \ 561793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 562793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 4 operator op(const input_type ## 4 & a, scalar_type s) \ 563793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 564793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 4>::make(a.x op s, a.y op s, a.z op s, a.w op s); \ 565793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 566793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 4 operator op(scalar_type s, const input_type ## 4 & b) \ 567793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 568793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 4>::make(s op b.x, s op b.y, s op b.z, s op b.w); \ 569793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 570793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 571793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uchar, int, int) 572793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uchar, float, float) 573793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uchar, double, double) 574793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, char, int, int) 575793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, char, float, float) 576793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, char, double, double) 577793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, ushort, int, int) 578793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, ushort, float, float) 579793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, ushort, double, double) 580793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, short, int, int) 581793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, short, float, float) 582793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, short, double, double) 583793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, int, int, int) 584793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, int, float, float) 585793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, int, double, double) 586793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uint, uint, uint) 587793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uint, float, float) 588793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, uint, double, double) 589793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, float, float, float) 590793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, float, double, double) 591793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(+, double, double, double) 592793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 593793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uchar, int, int) 594793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uchar, float, float) 595793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uchar, double, double) 596793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, char, int, int) 597793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, char, float, float) 598793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, char, double, double) 599793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, ushort, int, int) 600793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, ushort, float, float) 601793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, ushort, double, double) 602793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, short, int, int) 603793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, short, float, float) 604793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, short, double, double) 605793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, int, int, int) 606793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, int, float, float) 607793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, int, double, double) 608793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uint, uint, uint) 609793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uint, float, float) 610793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, uint, double, double) 611793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, float, float, float) 612793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, float, double, double) 613793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(-, double, double, double) 614793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 615793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uchar, int, int) 616793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uchar, float, float) 617793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uchar, double, double) 618793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, char, int, int) 619793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, char, float, float) 620793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, char, double, double) 621793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, ushort, int, int) 622793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, ushort, float, float) 623793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, ushort, double, double) 624793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, short, int, int) 625793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, short, float, float) 626793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, short, double, double) 627793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, int, int, int) 628793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, int, float, float) 629793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, int, double, double) 630793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uint, uint, uint) 631793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uint, float, float) 632793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, uint, double, double) 633793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, float, float, float) 634793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, float, double, double) 635793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(*, double, double, double) 636793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 637793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uchar, int, int) 638793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uchar, float, float) 639793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uchar, double, double) 640793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, char, int, int) 641793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, char, float, float) 642793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, char, double, double) 643793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, ushort, int, int) 644793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, ushort, float, float) 645793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, ushort, double, double) 646793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, short, int, int) 647793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, short, float, float) 648793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, short, double, double) 649793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, int, int, int) 650793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, int, float, float) 651793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, int, double, double) 652793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uint, uint, uint) 653793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uint, float, float) 654793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, uint, double, double) 655793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, float, float, float) 656793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, float, double, double) 657793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(/, double, double, double) 658793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 659793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, uchar, uchar, uchar) 660793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, char, char, uchar) 661793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, ushort, ushort, uchar) 662793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, short, short, uchar) 663793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, int, int, uchar) 664793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, uint, uint, uchar) 665793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, float, float, uchar) 666793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(==, double, double, uchar) 667793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 668793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, uchar, uchar, uchar) 669793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, char, char, uchar) 670793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, ushort, ushort, uchar) 671793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, short, short, uchar) 672793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, int, int, uchar) 673793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, uint, uint, uchar) 674793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, float, float, uchar) 675793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(!=, double, double, uchar) 676793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 677793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, uchar, uchar, uchar) 678793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, char, char, uchar) 679793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, ushort, ushort, uchar) 680793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, short, short, uchar) 681793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, int, int, uchar) 682793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, uint, uint, uchar) 683793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, float, float, uchar) 684793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>, double, double, uchar) 685793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 686793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, uchar, uchar, uchar) 687793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, char, char, uchar) 688793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, ushort, ushort, uchar) 689793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, short, short, uchar) 690793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, int, int, uchar) 691793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, uint, uint, uchar) 692793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, float, float, uchar) 693793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<, double, double, uchar) 694793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 695793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, uchar, uchar, uchar) 696793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, char, char, uchar) 697793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, ushort, ushort, uchar) 698793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, short, short, uchar) 699793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, int, int, uchar) 700793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, uint, uint, uchar) 701793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, float, float, uchar) 702793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(>=, double, double, uchar) 703793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 704793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, uchar, uchar, uchar) 705793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, char, char, uchar) 706793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, ushort, ushort, uchar) 707793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, short, short, uchar) 708793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, int, int, uchar) 709793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, uint, uint, uchar) 710793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, float, float, uchar) 711793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(<=, double, double, uchar) 712793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 713793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, uchar, uchar, uchar) 714793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, char, char, uchar) 715793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, ushort, ushort, uchar) 716793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, short, short, uchar) 717793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, int, int, uchar) 718793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, uint, uint, uchar) 719793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, float, float, uchar) 720793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&&, double, double, uchar) 721793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 722793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, uchar, uchar, uchar) 723793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, char, char, uchar) 724793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, ushort, ushort, uchar) 725793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, short, short, uchar) 726793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, int, int, uchar) 727793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, uint, uint, uchar) 728793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, float, float, uchar) 729793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(||, double, double, uchar) 730793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 731793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, uchar, uchar, uchar) 732793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, char, char, char) 733793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, ushort, ushort, ushort) 734793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, short, short, short) 735793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, int, int, int) 736793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(&, uint, uint, uint) 737793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 738793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, uchar, uchar, uchar) 739793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, char, char, char) 740793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, ushort, ushort, ushort) 741793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, short, short, short) 742793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, int, int, int) 743793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(|, uint, uint, uint) 744793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 745793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, uchar, uchar, uchar) 746793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, char, char, char) 747793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, ushort, ushort, ushort) 748793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, short, short, short) 749793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, int, int, int) 750793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP(^, uint, uint, uint) 751793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 752793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#undef CV_CUDEV_IMPLEMENT_SCALAR_BINARY_OP 753793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 754793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// binary function (vec & vec) 755793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 756793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define CV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(func_name, func, input_type, output_type) \ 757793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 1 func_name(const input_type ## 1 & a, const input_type ## 1 & b) \ 758793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 759793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 1>::make(func (a.x, b.x)); \ 760793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 761793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 2 func_name(const input_type ## 2 & a, const input_type ## 2 & b) \ 762793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 763793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 2>::make(func (a.x, b.x), func (a.y, b.y)); \ 764793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 765793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 3 func_name(const input_type ## 3 & a, const input_type ## 3 & b) \ 766793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 767793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 3>::make(func (a.x, b.x), func (a.y, b.y), func (a.z, b.z)); \ 768793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 769793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 4 func_name(const input_type ## 4 & a, const input_type ## 4 & b) \ 770793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 771793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 4>::make(func (a.x, b.x), func (a.y, b.y), func (a.z, b.z), func (a.w, b.w)); \ 772793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 773793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 774793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, uchar, uchar) 775793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, char, char) 776793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, ushort, ushort) 777793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, short, short) 778793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, uint, uint) 779793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::max, int, int) 780793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::fmaxf, float, float) 781793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(max, ::fmax, double, double) 782793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 783793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, uchar, uchar) 784793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, char, char) 785793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, ushort, ushort) 786793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, short, short) 787793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, uint, uint) 788793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::min, int, int) 789793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::fminf, float, float) 790793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(min, ::fmin, double, double) 791793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 792793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, uchar, float) 793793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, char, float) 794793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, ushort, float) 795793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, short, float) 796793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, uint, float) 797793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, int, float) 798793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypotf, float, float) 799793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(hypot, ::hypot, double, double) 800793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 801793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, uchar, float) 802793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, char, float) 803793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, ushort, float) 804793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, short, float) 805793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, uint, float) 806793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, int, float) 807793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2f, float, float) 808793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC(atan2, ::atan2, double, double) 809793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 810793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#undef CV_CUDEV_IMPLEMENT_VEC_BINARY_FUNC 811793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 812793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler// binary function (vec & scalar) 813793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 814793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#define CV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(func_name, func, input_type, scalar_type, output_type) \ 815793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 1 func_name(const input_type ## 1 & a, scalar_type s) \ 816793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 817793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 1>::make(func ((output_type) a.x, (output_type) s)); \ 818793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 819793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 1 func_name(scalar_type s, const input_type ## 1 & b) \ 820793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 821793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 1>::make(func ((output_type) s, (output_type) b.x)); \ 822793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 823793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 2 func_name(const input_type ## 2 & a, scalar_type s) \ 824793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 825793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 2>::make(func ((output_type) a.x, (output_type) s), func ((output_type) a.y, (output_type) s)); \ 826793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 827793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 2 func_name(scalar_type s, const input_type ## 2 & b) \ 828793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 829793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 2>::make(func ((output_type) s, (output_type) b.x), func ((output_type) s, (output_type) b.y)); \ 830793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 831793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 3 func_name(const input_type ## 3 & a, scalar_type s) \ 832793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 833793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 3>::make(func ((output_type) a.x, (output_type) s), func ((output_type) a.y, (output_type) s), func ((output_type) a.z, (output_type) s)); \ 834793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 835793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 3 func_name(scalar_type s, const input_type ## 3 & b) \ 836793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 837793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 3>::make(func ((output_type) s, (output_type) b.x), func ((output_type) s, (output_type) b.y), func ((output_type) s, (output_type) b.z)); \ 838793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 839793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 4 func_name(const input_type ## 4 & a, scalar_type s) \ 840793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 841793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 4>::make(func ((output_type) a.x, (output_type) s), func ((output_type) a.y, (output_type) s), func ((output_type) a.z, (output_type) s), func ((output_type) a.w, (output_type) s)); \ 842793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } \ 843793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler __device__ __forceinline__ output_type ## 4 func_name(scalar_type s, const input_type ## 4 & b) \ 844793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler { \ 845793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler return VecTraits<output_type ## 4>::make(func ((output_type) s, (output_type) b.x), func ((output_type) s, (output_type) b.y), func ((output_type) s, (output_type) b.z), func ((output_type) s, (output_type) b.w)); \ 846793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler } 847793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 848793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, uchar, uchar, uchar) 849793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, uchar, float, float) 850793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, uchar, double, double) 851793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, char, char, char) 852793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, char, float, float) 853793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, char, double, double) 854793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, ushort, ushort, ushort) 855793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, ushort, float, float) 856793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, ushort, double, double) 857793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, short, short, short) 858793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, short, float, float) 859793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, short, double, double) 860793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, uint, uint, uint) 861793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, uint, float, float) 862793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, uint, double, double) 863793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::max, int, int, int) 864793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, int, float, float) 865793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, int, double, double) 866793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmaxf, float, float, float) 867793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, float, double, double) 868793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(max, ::fmax, double, double, double) 869793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 870793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, uchar, uchar, uchar) 871793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, uchar, float, float) 872793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, uchar, double, double) 873793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, char, char, char) 874793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, char, float, float) 875793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, char, double, double) 876793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, ushort, ushort, ushort) 877793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, ushort, float, float) 878793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, ushort, double, double) 879793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, short, short, short) 880793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, short, float, float) 881793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, short, double, double) 882793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, uint, uint, uint) 883793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, uint, float, float) 884793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, uint, double, double) 885793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::min, int, int, int) 886793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, int, float, float) 887793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, int, double, double) 888793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fminf, float, float, float) 889793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, float, double, double) 890793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(min, ::fmin, double, double, double) 891793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 892793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, uchar, float, float) 893793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, uchar, double, double) 894793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, char, float, float) 895793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, char, double, double) 896793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, ushort, float, float) 897793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, ushort, double, double) 898793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, short, float, float) 899793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, short, double, double) 900793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, uint, float, float) 901793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, uint, double, double) 902793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, int, float, float) 903793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, int, double, double) 904793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypotf, float, float, float) 905793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, float, double, double) 906793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(hypot, ::hypot, double, double, double) 907793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 908793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, uchar, float, float) 909793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, uchar, double, double) 910793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, char, float, float) 911793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, char, double, double) 912793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, ushort, float, float) 913793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, ushort, double, double) 914793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, short, float, float) 915793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, short, double, double) 916793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, uint, float, float) 917793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, uint, double, double) 918793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, int, float, float) 919793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, int, double, double) 920793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2f, float, float, float) 921793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, float, double, double) 922793ee12c6df9cad3806238d32528c49a3ff9331dNoah PreslerCV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC(atan2, ::atan2, double, double, double) 923793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 924793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#undef CV_CUDEV_IMPLEMENT_SCALAR_BINARY_FUNC 925793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 926793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler}}} // namespace cv { namespace cuda { namespace device 927793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 928793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler//! @endcond 929793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler 930793ee12c6df9cad3806238d32528c49a3ff9331dNoah Presler#endif // __OPENCV_CUDA_VECMATH_HPP__ 931