enabled double in copyMakeBorder kernel

This commit is contained in:
Ilya Lavrenov 2013-10-18 16:46:00 +04:00
parent 2681cef5d7
commit b3e1a4598c
2 changed files with 14 additions and 1 deletions

View File

@ -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)
{
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;
CV_Assert(top >= 0 && bottom >= 0 && left >= 0 && right >= 0);
@ -469,7 +475,7 @@ namespace cv
break;
if (bordertype_index == sizeof(__bordertype) / sizeof(int))
CV_Error(CV_StsBadArg, "unsupported border type");
CV_Error(CV_StsBadArg, "Unsupported border type");
string kernelName = "copymakeborder";
size_t localThreads[3] = {16, 16, 1};

View File

@ -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
//BORDER_CONSTANT: iiiiii|abcdefgh|iiiiiii