fixed some warnings under win64

This commit is contained in:
Vladislav Vinogradov
2011-08-08 11:28:14 +00:00
parent 767ac9aa10
commit 42ced17c2c
23 changed files with 191 additions and 171 deletions

View File

@@ -171,10 +171,10 @@ namespace cv { namespace gpu { namespace mathfunc
}
void bitwiseNotCaller(int rows, int cols, int elem_size1, int cn,
void bitwiseNotCaller(int rows, int cols, size_t elem_size1, int cn,
const PtrStep src, PtrStep dst, cudaStream_t stream)
{
bitwiseUnOp<UN_OP_NOT>(rows, cols * elem_size1 * cn, src, dst, stream);
bitwiseUnOp<UN_OP_NOT>(rows, static_cast<int>(cols * elem_size1 * cn), src, dst, stream);
}
@@ -296,10 +296,10 @@ namespace cv { namespace gpu { namespace mathfunc
}
void bitwiseOrCaller(int rows, int cols, int elem_size1, int cn, const PtrStep src1,
void bitwiseOrCaller(int rows, int cols, size_t elem_size1, int cn, const PtrStep src1,
const PtrStep src2, PtrStep dst, cudaStream_t stream)
{
bitwiseBinOp<BIN_OP_OR>(rows, cols * elem_size1 * cn, src1, src2, dst, stream);
bitwiseBinOp<BIN_OP_OR>(rows, static_cast<int>(cols * elem_size1 * cn), src1, src2, dst, stream);
}
@@ -315,10 +315,10 @@ namespace cv { namespace gpu { namespace mathfunc
template void bitwiseMaskOrCaller<uint>(int, int, int, const PtrStep, const PtrStep, const PtrStep, PtrStep, cudaStream_t);
void bitwiseAndCaller(int rows, int cols, int elem_size1, int cn, const PtrStep src1,
void bitwiseAndCaller(int rows, int cols, size_t elem_size1, int cn, const PtrStep src1,
const PtrStep src2, PtrStep dst, cudaStream_t stream)
{
bitwiseBinOp<BIN_OP_AND>(rows, cols * elem_size1 * cn, src1, src2, dst, stream);
bitwiseBinOp<BIN_OP_AND>(rows, static_cast<int>(cols * elem_size1 * cn), src1, src2, dst, stream);
}
@@ -334,10 +334,10 @@ namespace cv { namespace gpu { namespace mathfunc
template void bitwiseMaskAndCaller<uint>(int, int, int, const PtrStep, const PtrStep, const PtrStep, PtrStep, cudaStream_t);
void bitwiseXorCaller(int rows, int cols, int elem_size1, int cn, const PtrStep src1,
void bitwiseXorCaller(int rows, int cols, size_t elem_size1, int cn, const PtrStep src1,
const PtrStep src2, PtrStep dst, cudaStream_t stream)
{
bitwiseBinOp<BIN_OP_XOR>(rows, cols * elem_size1 * cn, src1, src2, dst, stream);
bitwiseBinOp<BIN_OP_XOR>(rows, static_cast<int>(cols * elem_size1 * cn), src1, src2, dst, stream);
}

View File

@@ -176,7 +176,7 @@ namespace cv { namespace gpu { namespace histograms
histogram256<<<PARTIAL_HISTOGRAM256_COUNT, HISTOGRAM256_THREADBLOCK_SIZE, 0, stream>>>(
DevMem2D_<uint>(src),
buf,
src.rows * src.step / sizeof(uint),
static_cast<uint>(src.rows * src.step / sizeof(uint)),
src.cols);
cudaSafeCall( cudaGetLastError() );

View File

@@ -161,7 +161,7 @@ namespace cv { namespace gpu { namespace imgproc
texture<uchar4, 2> tex_meanshift;
__device__ short2 do_mean_shift(int x0, int y0, unsigned char* out,
int out_step, int cols, int rows,
size_t out_step, int cols, int rows,
int sp, int sr, int maxIter, float eps)
{
int isr2 = sr*sr;
@@ -225,7 +225,7 @@ namespace cv { namespace gpu { namespace imgproc
return make_short2((short)x0, (short)y0);
}
extern "C" __global__ void meanshift_kernel( unsigned char* out, int out_step, int cols, int rows,
extern "C" __global__ void meanshift_kernel( unsigned char* out, size_t out_step, int cols, int rows,
int sp, int sr, int maxIter, float eps )
{
int x0 = blockIdx.x * blockDim.x + threadIdx.x;
@@ -235,8 +235,8 @@ namespace cv { namespace gpu { namespace imgproc
do_mean_shift(x0, y0, out, out_step, cols, rows, sp, sr, maxIter, eps);
}
extern "C" __global__ void meanshiftproc_kernel( unsigned char* outr, int outrstep,
unsigned char* outsp, int outspstep,
extern "C" __global__ void meanshiftproc_kernel( unsigned char* outr, size_t outrstep,
unsigned char* outsp, size_t outspstep,
int cols, int rows,
int sp, int sr, int maxIter, float eps )
{

View File

@@ -62,7 +62,7 @@ namespace cv { namespace gpu { namespace matrix_operations {
///////////////////////////////////////////////////////////////////////////
template<typename T>
__global__ void copy_to_with_mask(T * mat_src, T * mat_dst, const unsigned char * mask, int cols, int rows, int step_mat, int step_mask, int channels)
__global__ void copy_to_with_mask(T * mat_src, T * mat_dst, const unsigned char * mask, int cols, int rows, size_t step_mat, size_t step_mask, int channels)
{
size_t x = blockIdx.x * blockDim.x + threadIdx.x;
size_t y = blockIdx.y * blockDim.y + threadIdx.y;
@@ -162,7 +162,7 @@ namespace cv { namespace gpu { namespace matrix_operations {
}
template<typename T>
__global__ void set_to_without_mask(T * mat, int cols, int rows, int step, int channels)
__global__ void set_to_without_mask(T * mat, int cols, int rows, size_t step, int channels)
{
size_t x = blockIdx.x * blockDim.x + threadIdx.x;
size_t y = blockIdx.y * blockDim.y + threadIdx.y;
@@ -175,7 +175,7 @@ namespace cv { namespace gpu { namespace matrix_operations {
}
template<typename T>
__global__ void set_to_with_mask(T * mat, const unsigned char * mask, int cols, int rows, int step, int channels, int step_mask)
__global__ void set_to_with_mask(T * mat, const unsigned char * mask, int cols, int rows, size_t step, int channels, size_t step_mask)
{
size_t x = blockIdx.x * blockDim.x + threadIdx.x;
size_t y = blockIdx.y * blockDim.y + threadIdx.y;

View File

@@ -276,7 +276,7 @@ namespace cv { namespace gpu { namespace split_merge {
extern "C" void merge_caller(const DevMem2D* src, DevMem2D& dst,
int total_channels, int elem_size,
int total_channels, size_t elem_size,
const cudaStream_t& stream)
{
static MergeFunction merge_func_tbl[] =
@@ -286,7 +286,7 @@ namespace cv { namespace gpu { namespace split_merge {
mergeC4_<char>, mergeC4_<short>, mergeC4_<int>, 0, mergeC4_<double>,
};
int merge_func_id = (total_channels - 2) * 5 + (elem_size >> 1);
size_t merge_func_id = (total_channels - 2) * 5 + (elem_size >> 1);
MergeFunction merge_func = merge_func_tbl[merge_func_id];
if (merge_func == 0)
@@ -485,7 +485,7 @@ namespace cv { namespace gpu { namespace split_merge {
extern "C" void split_caller(const DevMem2D& src, DevMem2D* dst,
int num_channels, int elem_size1,
int num_channels, size_t elem_size1,
const cudaStream_t& stream)
{
static SplitFunction split_func_tbl[] =
@@ -495,7 +495,7 @@ namespace cv { namespace gpu { namespace split_merge {
splitC4_<char>, splitC4_<short>, splitC4_<int>, 0, splitC4_<double>,
};
int split_func_id = (num_channels - 2) * 5 + (elem_size1 >> 1);
size_t split_func_id = (num_channels - 2) * 5 + (elem_size1 >> 1);
SplitFunction split_func = split_func_tbl[split_func_id];
if (split_func == 0)