 float __device icf::Cascade::rescale(const icf::Level& level, uchar4& scaledRect,
                                      const int channel, const float threshold) const
 {
-#if defined LOG_CUDA_CASCADE
-    printf("feature %d box %d %d %d %d\n", channel, scaledRect.x, scaledRect.y, scaledRect.z, scaledRect.w);
-    printf("rescale: %f [%f %f]\n",level.relScale, level.scaling[0], level.scaling[1]);
-#endif
+    dprintf("feature %d box %d %d %d %d\n", channel, scaledRect.x, scaledRect.y, scaledRect.z, scaledRect.w);
+    dprintf("rescale: %f [%f %f]\n",level.relScale, level.scaling[0], level.scaling[1]);
 
     float relScale = level.relScale;
     float farea = (scaledRect.z - scaledRect.x) * (scaledRect.w - scaledRect.y);

void icf::Cascade::detect(const cv::gpu::PtrStepSzi& hogluv, PtrStepSz<uchar4> objects, cudaStream_t stream) const
{
    dim3 block(32, 8, 1);
    dim3 grid(ChannelStorage::FRAME_WIDTH / 32, ChannelStorage::FRAME_HEIGHT / 8, 1);
    device::detect<<<grid, block, 0, stream>>>(*this, hogluv, hogluv.step / sizeof(int), objects);
    cudaSafeCall( cudaGetLastError() );
    if (!stream)

float __device get(const int* __restrict__ hogluv, const int pitch,
                   const int x, const int y, int channel, uchar4 area)
{
    dprintf("feature box %d %d %d %d ", area.x, area.y, area.z, area.w);
    dprintf("get for channel %d\n", channel);
    dprintf("extract feature for: [%d %d] [%d %d] [%d %d] [%d %d]\n",
        x + area.x, y + area.y,  x + area.z, y + area.y,  x + area.z,y + area.w,
        x + area.x, y + area.w);
    dprintf("at point %d %d with offset %d\n", x, y, 0);

    const int* curr = hogluv + ((channel * 121) + y) * pitch;

