 
             float sum = get(hogluv,pitch, x, y, feature.channel, scaledRect);
 
-#if defined LOG_CUDA_CASCADE
-            printf("root feature %d %f\n",feature.channel, sum);
-#endif
+            dprintf("root feature %d %f\n",feature.channel, sum);
+
             int next = 1 + (int)(sum >= threshold);
 
-#if defined LOG_CUDA_CASCADE
-            printf("go: %d (%f >= %f)\n\n" ,next, sum, threshold);
-#endif
+            dprintf("go: %d (%f >= %f)\n\n" ,next, sum, threshold);
+
             // leaves
             const Node leaf = ((const Node*)nodes.ptr())[nId + next];
             const Feature fLeaf = ((const Feature*)features.ptr())[leaf.feature];

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)

    int c = curr[area.w * pitch + x + area.z];
    int d = curr[area.w * pitch + x + area.x];

    dprintf("    retruved integral values: %d %d %d %d\n", a, b, c, d);

    return (a - b + c - d);
}
