refactoring in Emulation

pull/13/merge
marina.kolpakova 13 years ago
parent 9c13b84e35
commit aeaf1a6f6d
  1. 4
      modules/gpu/src/cuda/ccomponetns.cu
  2. 2
      modules/gpu/src/cuda/lbp.cu
  3. 4
      modules/gpu/src/opencv2/gpu/device/emulation.hpp

@ -316,7 +316,7 @@ namespace cv { namespace gpu { namespace device
} }
} }
changed = Emulation::sycthOr(changed); changed = Emulation::syncthreadsOr(changed);
if (!changed) if (!changed)
break; break;
@ -474,7 +474,7 @@ namespace cv { namespace gpu { namespace device
} }
} }
} }
} while (Emulation::sycthOr(changed)); } while (Emulation::syncthreadsOr(changed));
} }
__global__ void flatten(const DevMem2D edges, DevMem2Di comps) __global__ void flatten(const DevMem2D edges, DevMem2Di comps)

@ -279,7 +279,7 @@ namespace cv { namespace gpu { namespace device
rect.z = __float2int_rn(windowW * scale); rect.z = __float2int_rn(windowW * scale);
rect.w = __float2int_rn(windowH * scale); rect.w = __float2int_rn(windowH * scale);
int res = Emulation::smem::atomicInc(classified, (unsigned int)objects.cols); int res = atomicInc(classified, (unsigned int)objects.cols);
objects(0, res) = rect; objects(0, res) = rect;
} }
} }

@ -51,11 +51,11 @@ namespace cv { namespace gpu { namespace device
struct Emulation struct Emulation
{ {
static __device__ __forceinline__ int sycthOr(int pred) static __device__ __forceinline__ int syncthreadsOr(int pred)
{ {
#if defined (__CUDA_ARCH__) && (__CUDA_ARCH__ < 200) #if defined (__CUDA_ARCH__) && (__CUDA_ARCH__ < 200)
// just campilation stab // just campilation stab
return false; return 0;
#else #else
return __syncthreads_or(pred); return __syncthreads_or(pred);
#endif #endif

Loading…
Cancel
Save