enabled double in copyMakeBorder kernel
This commit is contained in:
@@ -425,6 +425,12 @@ namespace cv
|
|||||||
|
|
||||||
void copyMakeBorder(const oclMat &src, oclMat &dst, int top, int bottom, int left, int right, int bordertype, const Scalar &scalar)
|
void copyMakeBorder(const oclMat &src, oclMat &dst, int top, int bottom, int left, int right, int bordertype, const Scalar &scalar)
|
||||||
{
|
{
|
||||||
|
if (!src.clCxt->supportsFeature(FEATURE_CL_DOUBLE) && src.depth() == CV_64F)
|
||||||
|
{
|
||||||
|
CV_Error(CV_OpenCLDoubleNotSupported, "Selected device does not support double");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
oclMat _src = src;
|
oclMat _src = src;
|
||||||
|
|
||||||
CV_Assert(top >= 0 && bottom >= 0 && left >= 0 && right >= 0);
|
CV_Assert(top >= 0 && bottom >= 0 && left >= 0 && right >= 0);
|
||||||
@@ -469,7 +475,7 @@ namespace cv
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (bordertype_index == sizeof(__bordertype) / sizeof(int))
|
if (bordertype_index == sizeof(__bordertype) / sizeof(int))
|
||||||
CV_Error(CV_StsBadArg, "unsupported border type");
|
CV_Error(CV_StsBadArg, "Unsupported border type");
|
||||||
|
|
||||||
string kernelName = "copymakeborder";
|
string kernelName = "copymakeborder";
|
||||||
size_t localThreads[3] = {16, 16, 1};
|
size_t localThreads[3] = {16, 16, 1};
|
||||||
|
@@ -34,6 +34,13 @@
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if defined (DOUBLE_SUPPORT)
|
||||||
|
#ifdef cl_khr_fp64
|
||||||
|
#pragma OPENCL EXTENSION cl_khr_fp64:enable
|
||||||
|
#elif defined (cl_amd_fp64)
|
||||||
|
#pragma OPENCL EXTENSION cl_amd_fp64:enable
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BORDER_CONSTANT
|
#ifdef BORDER_CONSTANT
|
||||||
//BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii
|
//BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii
|
||||||
|
Reference in New Issue
Block a user