From e69c6fdef43182dc6efedac482d3f007f5ca15ff Mon Sep 17 00:00:00 2001 From: Marina Kolpakova Date: Mon, 18 Jun 2012 09:00:22 +0000 Subject: [PATCH] minor formating changes --- modules/gpu/src/cuda/canny.cu | 28 +-- modules/gpu/src/cuda/color.cu | 4 +- modules/gpu/src/cuda/column_filter.cu | 12 +- modules/gpu/src/cuda/copy_make_border.cu | 22 +-- modules/gpu/src/cuda/fast.cu | 30 ++-- modules/gpu/src/cuda/gftt.cu | 14 +- modules/gpu/src/cuda/hist.cu | 6 +- modules/gpu/src/cuda/hog.cu | 202 +++++++++++----------- modules/gpu/src/cuda/imgproc.cu | 6 +- modules/gpu/src/cuda/internal_shared.hpp | 6 +- modules/gpu/src/cuda/match_template.cu | 130 +++++++------- modules/gpu/src/cuda/mathfunc.cu | 18 +- modules/gpu/src/cuda/matrix_reductions.cu | 200 ++++++++++----------- modules/gpu/src/cuda/optical_flow.cu | 12 +- modules/gpu/src/cuda/orb.cu | 52 +++--- modules/gpu/src/cuda/remap.cu | 14 +- modules/gpu/src/cuda/resize.cu | 4 +- modules/gpu/src/cuda/rgb_to_yv12.cu | 8 +- modules/gpu/src/cuda/row_filter.cu | 12 +- modules/gpu/src/cuda/safe_call.hpp | 2 +- modules/gpu/src/cuda/split_merge.cu | 78 ++++----- modules/gpu/src/cuda/stereobm.cu | 10 +- modules/gpu/src/cuda/stereobp.cu | 4 +- modules/gpu/src/cuda/stereocsbp.cu | 24 +-- modules/gpu/src/cuda/warp.cu | 8 +- 25 files changed, 453 insertions(+), 453 deletions(-) diff --git a/modules/gpu/src/cuda/canny.cu b/modules/gpu/src/cuda/canny.cu index 4c7c5c7c28..f9dd490bf6 100644 --- a/modules/gpu/src/cuda/canny.cu +++ b/modules/gpu/src/cuda/canny.cu @@ -44,9 +44,9 @@ #include #include "internal_shared.hpp" -namespace cv { namespace gpu { namespace device +namespace cv { namespace gpu { namespace device { - namespace canny + namespace canny { __global__ void calcSobelRowPass(const PtrStepb src, PtrStepi dx_buf, PtrStepi dy_buf, int rows, int cols) { @@ -99,7 +99,7 @@ namespace cv { namespace gpu { namespace device } }; - template __global__ void calcMagnitude(const PtrStepi dx_buf, const PtrStepi dy_buf, + template __global__ void calcMagnitude(const PtrStepi dx_buf, const PtrStepi dy_buf, PtrStepi dx, PtrStepi dy, PtrStepf mag, int rows, int cols) { __shared__ int sdx[18][16]; @@ -175,7 +175,7 @@ namespace cv { namespace gpu { namespace device } ////////////////////////////////////////////////////////////////////////////////////////// - + #define CANNY_SHIFT 15 #define TG22 (int)(0.4142135623730950488016887242097*(1< high_thresh); } } - + map.ptr(i + 1)[j + 1] = edge_type; } } @@ -270,7 +270,7 @@ namespace cv { namespace gpu { namespace device const int tid = threadIdx.y * 16 + threadIdx.x; const int lx = tid % 18; - const int ly = tid / 18; + const int ly = tid / 18; if (ly < 14) smem[ly][lx] = map.ptr(blockIdx.y * 16 + ly)[blockIdx.x * 16 + lx]; @@ -294,10 +294,10 @@ namespace cv { namespace gpu { namespace device n += smem[threadIdx.y ][threadIdx.x ] == 2; n += smem[threadIdx.y ][threadIdx.x + 1] == 2; n += smem[threadIdx.y ][threadIdx.x + 2] == 2; - + n += smem[threadIdx.y + 1][threadIdx.x ] == 2; n += smem[threadIdx.y + 1][threadIdx.x + 2] == 2; - + n += smem[threadIdx.y + 2][threadIdx.x ] == 2; n += smem[threadIdx.y + 2][threadIdx.x + 1] == 2; n += smem[threadIdx.y + 2][threadIdx.x + 2] == 2; @@ -318,10 +318,10 @@ namespace cv { namespace gpu { namespace device n += smem[threadIdx.y ][threadIdx.x ] == 1; n += smem[threadIdx.y ][threadIdx.x + 1] == 1; n += smem[threadIdx.y ][threadIdx.x + 2] == 1; - + n += smem[threadIdx.y + 1][threadIdx.x ] == 1; n += smem[threadIdx.y + 1][threadIdx.x + 2] == 1; - + n += smem[threadIdx.y + 2][threadIdx.x ] == 1; n += smem[threadIdx.y + 2][threadIdx.x + 1] == 1; n += smem[threadIdx.y + 2][threadIdx.x + 2] == 1; @@ -361,7 +361,7 @@ namespace cv { namespace gpu { namespace device #if __CUDA_ARCH__ >= 120 const int stack_size = 512; - + __shared__ unsigned int s_counter; __shared__ unsigned int s_ind; __shared__ ushort2 s_st[stack_size]; @@ -404,11 +404,11 @@ namespace cv { namespace gpu { namespace device if (subTaskIdx < portion) pos = s_st[s_counter - 1 - subTaskIdx]; __syncthreads(); - + if (threadIdx.x == 0) s_counter -= portion; __syncthreads(); - + if (pos.x > 0 && pos.x <= cols && pos.y > 0 && pos.y <= rows) { pos.x += c_dx[threadIdx.x & 7]; @@ -452,7 +452,7 @@ namespace cv { namespace gpu { namespace device { void* counter_ptr; cudaSafeCall( cudaGetSymbolAddress(&counter_ptr, counter) ); - + unsigned int count; cudaSafeCall( cudaMemcpy(&count, counter_ptr, sizeof(unsigned int), cudaMemcpyDeviceToHost) ); diff --git a/modules/gpu/src/cuda/color.cu b/modules/gpu/src/cuda/color.cu index 5184222806..562f3ff2c5 100644 --- a/modules/gpu/src/cuda/color.cu +++ b/modules/gpu/src/cuda/color.cu @@ -45,7 +45,7 @@ #include #include -namespace cv { namespace gpu { namespace device +namespace cv { namespace gpu { namespace device { OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_rgba_traits::functor_type) { @@ -153,7 +153,7 @@ namespace cv { namespace gpu { namespace device { enum { smart_block_dim_y = 8 }; enum { smart_shift = 4 }; - }; + }; OPENCV_GPU_TRANSFORM_FUNCTOR_TRAITS(bgra_to_xyz4_traits::functor_type) { diff --git a/modules/gpu/src/cuda/column_filter.cu b/modules/gpu/src/cuda/column_filter.cu index d00bec84aa..624bd3fbc0 100644 --- a/modules/gpu/src/cuda/column_filter.cu +++ b/modules/gpu/src/cuda/column_filter.cu @@ -48,9 +48,9 @@ #include "opencv2/gpu/device/border_interpolate.hpp" #include "opencv2/gpu/device/static_check.hpp" -namespace cv { namespace gpu { namespace device +namespace cv { namespace gpu { namespace device { - namespace column_filter + namespace column_filter { #define MAX_KERNEL_SIZE 32 @@ -146,7 +146,7 @@ namespace cv { namespace gpu { namespace device const dim3 block(BLOCK_DIM_X, BLOCK_DIM_Y); const dim3 grid(divUp(src.cols, BLOCK_DIM_X), divUp(src.rows, BLOCK_DIM_Y * PATCH_PER_BLOCK)); - + B brd(src.rows); linearColumnFilter<<>>(src, dst, anchor, brd); @@ -162,7 +162,7 @@ namespace cv { namespace gpu { namespace device { typedef void (*caller_t)(DevMem2D_ src, DevMem2D_ dst, int anchor, int cc, cudaStream_t stream); - static const caller_t callers[5][33] = + static const caller_t callers[5][33] = { { 0, @@ -338,9 +338,9 @@ namespace cv { namespace gpu { namespace device linearColumnFilter_caller<30, T, D, BrdColWrap>, linearColumnFilter_caller<31, T, D, BrdColWrap>, linearColumnFilter_caller<32, T, D, BrdColWrap> - } + } }; - + loadKernel(kernel, ksize); callers[brd_type][ksize]((DevMem2D_)src, (DevMem2D_)dst, anchor, cc, stream); diff --git a/modules/gpu/src/cuda/copy_make_border.cu b/modules/gpu/src/cuda/copy_make_border.cu index 3397672e9a..a54a9b7db2 100644 --- a/modules/gpu/src/cuda/copy_make_border.cu +++ b/modules/gpu/src/cuda/copy_make_border.cu @@ -43,9 +43,9 @@ #include "internal_shared.hpp" #include "opencv2/gpu/device/border_interpolate.hpp" -namespace cv { namespace gpu { namespace device +namespace cv { namespace gpu { namespace device { - namespace imgproc + namespace imgproc { template __global__ void copyMakeBorder(const Ptr2D src, DevMem2D_ dst, int top, int left) { @@ -58,9 +58,9 @@ namespace cv { namespace gpu { namespace device template