Fix build errors

This commit is contained in:
Peng Xiao 2013-04-21 11:19:37 +08:00
parent 7b08d5ec69
commit c701d54281

View File

@ -571,36 +571,7 @@ namespace
const float DEFAULT_DATA_WEIGHT = 1.0f;
const float DEFAULT_MAX_DISC_TERM = 160.0f;
const float DEFAULT_DISC_SINGLE_JUMP = 10.0f;
template<typename T>
void print_gpu_mat(const oclMat &mat)
{
T *data_1 = new T[mat.rows * mat.cols * mat.channels()];
Context *clCxt = mat.clCxt;
int status = clEnqueueReadBuffer(clCxt -> impl->clCmdQueue, (cl_mem)mat.data, CL_TRUE, 0,
mat.rows * mat.cols * mat.channels() * sizeof(T), data_1, 0, NULL, NULL);
if(status != CL_SUCCESS)
cout << "error " << status << endl;
cout << ".........................................................." << endl;
cout << "elemSize() " << mat.elemSize() << endl;
cout << "elemSize() " << mat.elemSize1() << endl;
cout << "channels: " << mat.channels() << endl;
cout << "rows: " << mat.rows << endl;
cout << "cols: " << mat.cols << endl;
for(int i = 0; i < 100; i++)
{
for(int j = 0; j < 30; j++)
{
cout << (int)data_1[i * mat.cols * mat.channels() + j] << " ";
}
cout << endl;
}
}
}
void cv::ocl::StereoConstantSpaceBP::estimateRecommendedParams(int width, int height, int &ndisp, int &iters, int &levels, int &nr_plane)
{