Fix build errors

This commit is contained in:
Andrey Kamaev
2013-03-18 14:42:27 +04:00
parent 1b4afcca30
commit 4bd721ad3b
11 changed files with 129 additions and 130 deletions

View File

@@ -387,7 +387,7 @@ namespace cv
void openCLMemcpy2D(Context *clCxt, void *dst, size_t dpitch,
const void *src, size_t spitch,
size_t width, size_t height, enum openCLMemcpyKind kind, int channels)
size_t width, size_t height, openCLMemcpyKind kind, int channels)
{
size_t buffer_origin[3] = {0, 0, 0};
size_t host_origin[3] = {0, 0, 0};
@@ -593,11 +593,11 @@ namespace cv
size_t kernelWorkGroupSize;
openCLSafeCall(clGetKernelWorkGroupInfo(kernel, clCxt->impl->devices[clCxt->impl->devnum],
CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &kernelWorkGroupSize, 0));
CV_Assert( (localThreads[0] <= clCxt->impl->maxWorkItemSizes[0]) &&
(localThreads[1] <= clCxt->impl->maxWorkItemSizes[1]) &&
(localThreads[2] <= clCxt->impl->maxWorkItemSizes[2]) &&
((localThreads[0] * localThreads[1] * localThreads[2]) <= kernelWorkGroupSize) &&
(localThreads[0] * localThreads[1] * localThreads[2]) <= clCxt->impl->maxWorkGroupSize);
CV_Assert( localThreads[0] <= clCxt->impl->maxWorkItemSizes[0] );
CV_Assert( localThreads[1] <= clCxt->impl->maxWorkItemSizes[1] );
CV_Assert( localThreads[2] <= clCxt->impl->maxWorkItemSizes[2] );
CV_Assert( localThreads[0] * localThreads[1] * localThreads[2] <= kernelWorkGroupSize );
CV_Assert( localThreads[0] * localThreads[1] * localThreads[2] <= clCxt->impl->maxWorkGroupSize );
}
#ifdef PRINT_KERNEL_RUN_TIME

View File

@@ -43,17 +43,14 @@
//
//M*/
#include "opencv2/ocl/private/util.hpp"
#include "precomp.hpp"
#if defined (HAVE_OPENCL)
#ifndef CL_VERSION_1_2
#define CL_VERSION_1_2 0
#endif
using namespace std;
namespace cv
{
namespace ocl
@@ -180,7 +177,7 @@ namespace cv
texture = clCreateImage((cl_context)mat.clCxt->oclContext(), CL_MEM_READ_WRITE, &format, &desc, NULL, &err);
#else
texture = clCreateImage2D(
mat.clCxt->impl->clContext,
(cl_context)mat.clCxt->oclContext(),
CL_MEM_READ_WRITE,
&format,
mat.cols,
@@ -254,4 +251,3 @@ namespace cv
}//namespace ocl
}//namespace cv
#endif

View File

@@ -65,12 +65,6 @@ namespace cv
{
namespace ocl
{
enum openCLMemcpyKind
{
clMemcpyHostToDevice = 0,
clMemcpyDeviceToHost,
clMemcpyDeviceToDevice
};
void error( const char *error_string, const char *file, const int line, const char *func = "");
const char *getOpenCLErrorString( int err );