|
|
|
@ -40,129 +40,225 @@ |
|
|
|
|
// |
|
|
|
|
//M*/ |
|
|
|
|
|
|
|
|
|
#if !defined CUDA_DISABLER |
|
|
|
|
#include "opencv2/opencv_modules.hpp" |
|
|
|
|
|
|
|
|
|
#include "opencv2/core/cuda/common.hpp" |
|
|
|
|
#include "opencv2/core/cuda/functional.hpp" |
|
|
|
|
#include "opencv2/core/cuda/transform.hpp" |
|
|
|
|
#include "opencv2/core/cuda/saturate_cast.hpp" |
|
|
|
|
#include "opencv2/core/cuda/simd_functions.hpp" |
|
|
|
|
#ifndef HAVE_OPENCV_CUDEV |
|
|
|
|
|
|
|
|
|
#include "arithm_func_traits.hpp" |
|
|
|
|
#error "opencv_cudev is required" |
|
|
|
|
|
|
|
|
|
using namespace cv::cuda; |
|
|
|
|
using namespace cv::cuda::device; |
|
|
|
|
#else |
|
|
|
|
|
|
|
|
|
namespace arithm |
|
|
|
|
#include "opencv2/cudev.hpp" |
|
|
|
|
|
|
|
|
|
using namespace cv::cudev; |
|
|
|
|
|
|
|
|
|
void divScalar(const GpuMat& src, cv::Scalar val, bool inv, GpuMat& dst, const GpuMat& mask, double scale, Stream& stream, int); |
|
|
|
|
|
|
|
|
|
namespace |
|
|
|
|
{ |
|
|
|
|
template <typename T, typename S, typename D> struct DivScalar : unary_function<T, D> |
|
|
|
|
template <int cn> struct SafeDiv; |
|
|
|
|
template <> struct SafeDiv<1> |
|
|
|
|
{ |
|
|
|
|
template <typename T> |
|
|
|
|
__device__ __forceinline__ static T op(T a, T b) |
|
|
|
|
{ |
|
|
|
|
return b != 0 ? a / b : 0; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
template <> struct SafeDiv<2> |
|
|
|
|
{ |
|
|
|
|
S val; |
|
|
|
|
template <typename T> |
|
|
|
|
__device__ __forceinline__ static T op(const T& a, const T& b) |
|
|
|
|
{ |
|
|
|
|
T res; |
|
|
|
|
|
|
|
|
|
__host__ explicit DivScalar(S val_) : val(val_) {} |
|
|
|
|
res.x = b.x != 0 ? a.x / b.x : 0; |
|
|
|
|
res.y = b.y != 0 ? a.y / b.y : 0; |
|
|
|
|
|
|
|
|
|
__device__ __forceinline__ D operator ()(T a) const |
|
|
|
|
{ |
|
|
|
|
return saturate_cast<D>(a / val); |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
template <> struct SafeDiv<3> |
|
|
|
|
{ |
|
|
|
|
template <typename T> |
|
|
|
|
__device__ __forceinline__ static T op(const T& a, const T& b) |
|
|
|
|
{ |
|
|
|
|
T res; |
|
|
|
|
|
|
|
|
|
template <typename T, typename S, typename D> struct DivScalarInv : unary_function<T, D> |
|
|
|
|
res.x = b.x != 0 ? a.x / b.x : 0; |
|
|
|
|
res.y = b.y != 0 ? a.y / b.y : 0; |
|
|
|
|
res.z = b.z != 0 ? a.z / b.z : 0; |
|
|
|
|
|
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
template <> struct SafeDiv<4> |
|
|
|
|
{ |
|
|
|
|
S val; |
|
|
|
|
template <typename T> |
|
|
|
|
__device__ __forceinline__ static T op(const T& a, const T& b) |
|
|
|
|
{ |
|
|
|
|
T res; |
|
|
|
|
|
|
|
|
|
res.x = b.x != 0 ? a.x / b.x : 0; |
|
|
|
|
res.y = b.y != 0 ? a.y / b.y : 0; |
|
|
|
|
res.z = b.z != 0 ? a.z / b.z : 0; |
|
|
|
|
res.w = b.w != 0 ? a.w / b.w : 0; |
|
|
|
|
|
|
|
|
|
explicit DivScalarInv(S val_) : val(val_) {} |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
__device__ __forceinline__ D operator ()(T a) const |
|
|
|
|
template <typename SrcType, typename ScalarType, typename DstType> struct DivScalarOp : unary_function<SrcType, DstType> |
|
|
|
|
{ |
|
|
|
|
ScalarType val; |
|
|
|
|
|
|
|
|
|
__device__ __forceinline__ DstType operator ()(SrcType a) const |
|
|
|
|
{ |
|
|
|
|
return a != 0 ? saturate_cast<D>(val / a) : 0; |
|
|
|
|
return saturate_cast<DstType>(SafeDiv<VecTraits<ScalarType>::cn>::op(saturate_cast<ScalarType>(a), val)); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
namespace cv { namespace cuda { namespace device |
|
|
|
|
{ |
|
|
|
|
template <typename T, typename S, typename D> struct TransformFunctorTraits< arithm::DivScalar<T, S, D> > : arithm::ArithmFuncTraits<sizeof(T), sizeof(D)> |
|
|
|
|
template <typename SrcType, typename ScalarType, typename DstType> struct DivScalarOpInv : unary_function<SrcType, DstType> |
|
|
|
|
{ |
|
|
|
|
ScalarType val; |
|
|
|
|
|
|
|
|
|
__device__ __forceinline__ DstType operator ()(SrcType a) const |
|
|
|
|
{ |
|
|
|
|
return saturate_cast<DstType>(SafeDiv<VecTraits<ScalarType>::cn>::op(val, saturate_cast<ScalarType>(a))); |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
template <typename T, typename S, typename D> struct TransformFunctorTraits< arithm::DivScalarInv<T, S, D> > : arithm::ArithmFuncTraits<sizeof(T), sizeof(D)> |
|
|
|
|
template <typename ScalarDepth> struct TransformPolicy : DefaultTransformPolicy |
|
|
|
|
{ |
|
|
|
|
}; |
|
|
|
|
template <> struct TransformPolicy<double> : DefaultTransformPolicy |
|
|
|
|
{ |
|
|
|
|
enum { |
|
|
|
|
shift = 1 |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
}}} |
|
|
|
|
|
|
|
|
|
namespace arithm |
|
|
|
|
{ |
|
|
|
|
template <typename T, typename S, typename D> |
|
|
|
|
void divScalar(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream) |
|
|
|
|
template <typename SrcType, typename ScalarDepth, typename DstType> |
|
|
|
|
void divScalarImpl(const GpuMat& src, cv::Scalar value, bool inv, GpuMat& dst, Stream& stream) |
|
|
|
|
{ |
|
|
|
|
typedef typename MakeVec<ScalarDepth, VecTraits<SrcType>::cn>::type ScalarType; |
|
|
|
|
|
|
|
|
|
cv::Scalar_<ScalarDepth> value_ = value; |
|
|
|
|
|
|
|
|
|
if (inv) |
|
|
|
|
{ |
|
|
|
|
DivScalarInv<T, S, D> op(static_cast<S>(val)); |
|
|
|
|
device::transform((PtrStepSz<T>) src1, (PtrStepSz<D>) dst, op, WithOutMask(), stream); |
|
|
|
|
DivScalarOpInv<SrcType, ScalarType, DstType> op; |
|
|
|
|
op.val = VecTraits<ScalarType>::make(value_.val); |
|
|
|
|
|
|
|
|
|
gridTransformUnary_< TransformPolicy<ScalarDepth> >(globPtr<SrcType>(src), globPtr<DstType>(dst), op, stream); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
DivScalar<T, S, D> op(static_cast<S>(val)); |
|
|
|
|
device::transform((PtrStepSz<T>) src1, (PtrStepSz<D>) dst, op, WithOutMask(), stream); |
|
|
|
|
DivScalarOp<SrcType, ScalarType, DstType> op; |
|
|
|
|
op.val = VecTraits<ScalarType>::make(value_.val); |
|
|
|
|
|
|
|
|
|
gridTransformUnary_< TransformPolicy<ScalarDepth> >(globPtr<SrcType>(src), globPtr<DstType>(dst), op, stream); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void divScalar(const GpuMat& src, cv::Scalar val, bool inv, GpuMat& dst, const GpuMat&, double scale, Stream& stream, int) |
|
|
|
|
{ |
|
|
|
|
typedef void (*func_t)(const GpuMat& src, cv::Scalar val, bool inv, GpuMat& dst, Stream& stream); |
|
|
|
|
static const func_t funcs[7][7][4] = |
|
|
|
|
{ |
|
|
|
|
{ |
|
|
|
|
{divScalarImpl<uchar, float, uchar>, divScalarImpl<uchar2, float, uchar2>, divScalarImpl<uchar3, float, uchar3>, divScalarImpl<uchar4, float, uchar4>}, |
|
|
|
|
{divScalarImpl<uchar, float, schar>, divScalarImpl<uchar2, float, char2>, divScalarImpl<uchar3, float, char3>, divScalarImpl<uchar4, float, char4>}, |
|
|
|
|
{divScalarImpl<uchar, float, ushort>, divScalarImpl<uchar2, float, ushort2>, divScalarImpl<uchar3, float, ushort3>, divScalarImpl<uchar4, float, ushort4>}, |
|
|
|
|
{divScalarImpl<uchar, float, short>, divScalarImpl<uchar2, float, short2>, divScalarImpl<uchar3, float, short3>, divScalarImpl<uchar4, float, short4>}, |
|
|
|
|
{divScalarImpl<uchar, float, int>, divScalarImpl<uchar2, float, int2>, divScalarImpl<uchar3, float, int3>, divScalarImpl<uchar4, float, int4>}, |
|
|
|
|
{divScalarImpl<uchar, float, float>, divScalarImpl<uchar2, float, float2>, divScalarImpl<uchar3, float, float3>, divScalarImpl<uchar4, float, float4>}, |
|
|
|
|
{divScalarImpl<uchar, double, double>, divScalarImpl<uchar2, double, double2>, divScalarImpl<uchar3, double, double3>, divScalarImpl<uchar4, double, double4>} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
{divScalarImpl<schar, float, uchar>, divScalarImpl<char2, float, uchar2>, divScalarImpl<char3, float, uchar3>, divScalarImpl<char4, float, uchar4>}, |
|
|
|
|
{divScalarImpl<schar, float, schar>, divScalarImpl<char2, float, char2>, divScalarImpl<char3, float, char3>, divScalarImpl<char4, float, char4>}, |
|
|
|
|
{divScalarImpl<schar, float, ushort>, divScalarImpl<char2, float, ushort2>, divScalarImpl<char3, float, ushort3>, divScalarImpl<char4, float, ushort4>}, |
|
|
|
|
{divScalarImpl<schar, float, short>, divScalarImpl<char2, float, short2>, divScalarImpl<char3, float, short3>, divScalarImpl<char4, float, short4>}, |
|
|
|
|
{divScalarImpl<schar, float, int>, divScalarImpl<char2, float, int2>, divScalarImpl<char3, float, int3>, divScalarImpl<char4, float, int4>}, |
|
|
|
|
{divScalarImpl<schar, float, float>, divScalarImpl<char2, float, float2>, divScalarImpl<char3, float, float3>, divScalarImpl<char4, float, float4>}, |
|
|
|
|
{divScalarImpl<schar, double, double>, divScalarImpl<char2, double, double2>, divScalarImpl<char3, double, double3>, divScalarImpl<char4, double, double4>} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
{0 /*divScalarImpl<ushort, float, uchar>*/, 0 /*divScalarImpl<ushort2, float, uchar2>*/, 0 /*divScalarImpl<ushort3, float, uchar3>*/, 0 /*divScalarImpl<ushort4, float, uchar4>*/}, |
|
|
|
|
{0 /*divScalarImpl<ushort, float, schar>*/, 0 /*divScalarImpl<ushort2, float, char2>*/, 0 /*divScalarImpl<ushort3, float, char3>*/, 0 /*divScalarImpl<ushort4, float, char4>*/}, |
|
|
|
|
{divScalarImpl<ushort, float, ushort>, divScalarImpl<ushort2, float, ushort2>, divScalarImpl<ushort3, float, ushort3>, divScalarImpl<ushort4, float, ushort4>}, |
|
|
|
|
{divScalarImpl<ushort, float, short>, divScalarImpl<ushort2, float, short2>, divScalarImpl<ushort3, float, short3>, divScalarImpl<ushort4, float, short4>}, |
|
|
|
|
{divScalarImpl<ushort, float, int>, divScalarImpl<ushort2, float, int2>, divScalarImpl<ushort3, float, int3>, divScalarImpl<ushort4, float, int4>}, |
|
|
|
|
{divScalarImpl<ushort, float, float>, divScalarImpl<ushort2, float, float2>, divScalarImpl<ushort3, float, float3>, divScalarImpl<ushort4, float, float4>}, |
|
|
|
|
{divScalarImpl<ushort, double, double>, divScalarImpl<ushort2, double, double2>, divScalarImpl<ushort3, double, double3>, divScalarImpl<ushort4, double, double4>} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
{0 /*divScalarImpl<short, float, uchar>*/, 0 /*divScalarImpl<short2, float, uchar2>*/, 0 /*divScalarImpl<short3, float, uchar3>*/, 0 /*divScalarImpl<short4, float, uchar4>*/}, |
|
|
|
|
{0 /*divScalarImpl<short, float, schar>*/, 0 /*divScalarImpl<short2, float, char2>*/, 0 /*divScalarImpl<short3, float, char3>*/, 0 /*divScalarImpl<short4, float, char4>*/}, |
|
|
|
|
{divScalarImpl<short, float, ushort>, divScalarImpl<short2, float, ushort2>, divScalarImpl<short3, float, ushort3>, divScalarImpl<short4, float, ushort4>}, |
|
|
|
|
{divScalarImpl<short, float, short>, divScalarImpl<short2, float, short2>, divScalarImpl<short3, float, short3>, divScalarImpl<short4, float, short4>}, |
|
|
|
|
{divScalarImpl<short, float, int>, divScalarImpl<short2, float, int2>, divScalarImpl<short3, float, int3>, divScalarImpl<short4, float, int4>}, |
|
|
|
|
{divScalarImpl<short, float, float>, divScalarImpl<short2, float, float2>, divScalarImpl<short3, float, float3>, divScalarImpl<short4, float, float4>}, |
|
|
|
|
{divScalarImpl<short, double, double>, divScalarImpl<short2, double, double2>, divScalarImpl<short3, double, double3>, divScalarImpl<short4, double, double4>} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
{0 /*divScalarImpl<int, float, uchar>*/, 0 /*divScalarImpl<int2, float, uchar2>*/, 0 /*divScalarImpl<int3, float, uchar3>*/, 0 /*divScalarImpl<int4, float, uchar4>*/}, |
|
|
|
|
{0 /*divScalarImpl<int, float, schar>*/, 0 /*divScalarImpl<int2, float, char2>*/, 0 /*divScalarImpl<int3, float, char3>*/, 0 /*divScalarImpl<int4, float, char4>*/}, |
|
|
|
|
{0 /*divScalarImpl<int, float, ushort>*/, 0 /*divScalarImpl<int2, float, ushort2>*/, 0 /*divScalarImpl<int3, float, ushort3>*/, 0 /*divScalarImpl<int4, float, ushort4>*/}, |
|
|
|
|
{0 /*divScalarImpl<int, float, short>*/, 0 /*divScalarImpl<int2, float, short2>*/, 0 /*divScalarImpl<int3, float, short3>*/, 0 /*divScalarImpl<int4, float, short4>*/}, |
|
|
|
|
{divScalarImpl<int, float, int>, divScalarImpl<int2, float, int2>, divScalarImpl<int3, float, int3>, divScalarImpl<int4, float, int4>}, |
|
|
|
|
{divScalarImpl<int, float, float>, divScalarImpl<int2, float, float2>, divScalarImpl<int3, float, float3>, divScalarImpl<int4, float, float4>}, |
|
|
|
|
{divScalarImpl<int, double, double>, divScalarImpl<int2, double, double2>, divScalarImpl<int3, double, double3>, divScalarImpl<int4, double, double4>} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
{0 /*divScalarImpl<float, float, uchar>*/, 0 /*divScalarImpl<float2, float, uchar2>*/, 0 /*divScalarImpl<float3, float, uchar3>*/, 0 /*divScalarImpl<float4, float, uchar4>*/}, |
|
|
|
|
{0 /*divScalarImpl<float, float, schar>*/, 0 /*divScalarImpl<float2, float, char2>*/, 0 /*divScalarImpl<float3, float, char3>*/, 0 /*divScalarImpl<float4, float, char4>*/}, |
|
|
|
|
{0 /*divScalarImpl<float, float, ushort>*/, 0 /*divScalarImpl<float2, float, ushort2>*/, 0 /*divScalarImpl<float3, float, ushort3>*/, 0 /*divScalarImpl<float4, float, ushort4>*/}, |
|
|
|
|
{0 /*divScalarImpl<float, float, short>*/, 0 /*divScalarImpl<float2, float, short2>*/, 0 /*divScalarImpl<float3, float, short3>*/, 0 /*divScalarImpl<float4, float, short4>*/}, |
|
|
|
|
{0 /*divScalarImpl<float, float, int>*/, 0 /*divScalarImpl<float2, float, int2>*/, 0 /*divScalarImpl<float3, float, int3>*/, 0 /*divScalarImpl<float4, float, int4>*/}, |
|
|
|
|
{divScalarImpl<float, float, float>, divScalarImpl<float2, float, float2>, divScalarImpl<float3, float, float3>, divScalarImpl<float4, float, float4>}, |
|
|
|
|
{divScalarImpl<float, double, double>, divScalarImpl<float2, double, double2>, divScalarImpl<float3, double, double3>, divScalarImpl<float4, double, double4>} |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
{0 /*divScalarImpl<double, double, uchar>*/, 0 /*divScalarImpl<double2, double, uchar2>*/, 0 /*divScalarImpl<double3, double, uchar3>*/, 0 /*divScalarImpl<double4, double, uchar4>*/}, |
|
|
|
|
{0 /*divScalarImpl<double, double, schar>*/, 0 /*divScalarImpl<double2, double, char2>*/, 0 /*divScalarImpl<double3, double, char3>*/, 0 /*divScalarImpl<double4, double, char4>*/}, |
|
|
|
|
{0 /*divScalarImpl<double, double, ushort>*/, 0 /*divScalarImpl<double2, double, ushort2>*/, 0 /*divScalarImpl<double3, double, ushort3>*/, 0 /*divScalarImpl<double4, double, ushort4>*/}, |
|
|
|
|
{0 /*divScalarImpl<double, double, short>*/, 0 /*divScalarImpl<double2, double, short2>*/, 0 /*divScalarImpl<double3, double, short3>*/, 0 /*divScalarImpl<double4, double, short4>*/}, |
|
|
|
|
{0 /*divScalarImpl<double, double, int>*/, 0 /*divScalarImpl<double2, double, int2>*/, 0 /*divScalarImpl<double3, double, int3>*/, 0 /*divScalarImpl<double4, double, int4>*/}, |
|
|
|
|
{0 /*divScalarImpl<double, double, float>*/, 0 /*divScalarImpl<double2, double, float2>*/, 0 /*divScalarImpl<double3, double, float3>*/, 0 /*divScalarImpl<double4, double, float4>*/}, |
|
|
|
|
{divScalarImpl<double, double, double>, divScalarImpl<double2, double, double2>, divScalarImpl<double3, double, double3>, divScalarImpl<double4, double, double4>} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const int sdepth = src.depth(); |
|
|
|
|
const int ddepth = dst.depth(); |
|
|
|
|
const int cn = src.channels(); |
|
|
|
|
|
|
|
|
|
CV_DbgAssert( sdepth < 7 && ddepth < 7 && cn <= 4 ); |
|
|
|
|
|
|
|
|
|
if (inv) |
|
|
|
|
{ |
|
|
|
|
val[0] *= scale; |
|
|
|
|
val[1] *= scale; |
|
|
|
|
val[2] *= scale; |
|
|
|
|
val[3] *= scale; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
val[0] /= scale; |
|
|
|
|
val[1] /= scale; |
|
|
|
|
val[2] /= scale; |
|
|
|
|
val[3] /= scale; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const func_t func = funcs[sdepth][ddepth][cn - 1]; |
|
|
|
|
|
|
|
|
|
if (!func) |
|
|
|
|
CV_Error(cv::Error::StsUnsupportedFormat, "Unsupported combination of source and destination types"); |
|
|
|
|
|
|
|
|
|
template void divScalar<uchar, float, uchar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<uchar, float, schar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<uchar, float, ushort>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<uchar, float, short>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<uchar, float, int>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<uchar, float, float>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<uchar, double, double>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
|
|
|
|
|
template void divScalar<schar, float, uchar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<schar, float, schar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<schar, float, ushort>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<schar, float, short>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<schar, float, int>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<schar, float, float>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<schar, double, double>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
|
|
|
|
|
//template void divScalar<ushort, float, uchar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<ushort, float, schar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<ushort, float, ushort>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<ushort, float, short>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<ushort, float, int>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<ushort, float, float>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<ushort, double, double>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
|
|
|
|
|
//template void divScalar<short, float, uchar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<short, float, schar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<short, float, ushort>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<short, float, short>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<short, float, int>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<short, float, float>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<short, double, double>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
|
|
|
|
|
//template void divScalar<int, float, uchar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<int, float, schar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<int, float, ushort>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<int, float, short>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<int, float, int>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<int, float, float>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<int, double, double>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
|
|
|
|
|
//template void divScalar<float, float, uchar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<float, float, schar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<float, float, ushort>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<float, float, short>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<float, float, int>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<float, float, float>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<float, double, double>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
|
|
|
|
|
//template void divScalar<double, double, uchar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<double, double, schar>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<double, double, ushort>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<double, double, short>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<double, double, int>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
//template void divScalar<double, double, float>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
template void divScalar<double, double, double>(PtrStepSzb src1, double val, bool inv, PtrStepSzb dst, cudaStream_t stream); |
|
|
|
|
func(src, val, inv, dst, stream); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endif // CUDA_DISABLER |
|
|
|
|
#endif |
|
|
|
|