Commit 92ba74a3 authored by marina.kolpakova's avatar marina.kolpakova

fix cuda

parent ea79357f
...@@ -250,7 +250,7 @@ void cv::gpu::CudaMem::create(int _rows, int _cols, int _type, int _alloc_type) ...@@ -250,7 +250,7 @@ void cv::gpu::CudaMem::create(int _rows, int _cols, int _type, int _alloc_type)
//datastart = data = (uchar*)fastMalloc(datasize + sizeof(*refcount)); //datastart = data = (uchar*)fastMalloc(datasize + sizeof(*refcount));
alloc_type = _alloc_type; alloc_type = _alloc_type;
void *ptr; void *ptr = 0;
switch (alloc_type) switch (alloc_type)
{ {
......
...@@ -477,7 +477,7 @@ namespace cv { namespace softcascade { namespace device ...@@ -477,7 +477,7 @@ namespace cv { namespace softcascade { namespace device
const dim3 block(32, 8); const dim3 block(32, 8);
const dim3 grid(divUp(integral.cols, block.x), 1); const dim3 grid(divUp(integral.cols, block.x), 1);
shfl_integral_vertical<<<grid, block, 0, stream>>>((cv::gpu::PtrStepSz<uint>)buffer, integral); shfl_integral_vertical<<<grid, block, 0, stream>>>((cv::gpu::PtrStepSz<unsigned int>)buffer, integral);
cudaSafeCall( cudaGetLastError() ); cudaSafeCall( cudaGetLastError() );
} }
} }
...@@ -498,7 +498,7 @@ namespace cv { namespace softcascade { namespace device ...@@ -498,7 +498,7 @@ namespace cv { namespace softcascade { namespace device
// uint b = 0xffu & (src >> (bidx * 8)); // uint b = 0xffu & (src >> (bidx * 8));
// uint g = 0xffu & (src >> 8); // uint g = 0xffu & (src >> 8);
// uint r = 0xffu & (src >> ((bidx ^ 2) * 8)); // uint r = 0xffu & (src >> ((bidx ^ 2) * 8));
return CV_DESCALE((uint)(b * B2Y + g * G2Y + r * R2Y), yuv_shift); return CV_DESCALE((unsigned int)(b * B2Y + g * G2Y + r * R2Y), yuv_shift);
} }
__global__ void device_transform(const cv::gpu::PtrStepSz<uchar3> bgr, cv::gpu::PtrStepSzb gray) __global__ void device_transform(const cv::gpu::PtrStepSz<uchar3> bgr, cv::gpu::PtrStepSzb gray)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment