     {
         printf("Error destroying CUDPP.\n");
     }
+
+    CUDA_SAFE_CALL( cudaEventDestroy(timerStart) );
+    CUDA_SAFE_CALL( cudaEventDestroy(timerStop) );
 }
 
 __global__ 

        printf("Error creating CUDPPPlan.\n");
    }

    CUT_SAFE_CALL(cutCreateTimer(&(satTimer[0])));
    CUT_SAFE_CALL(cutCreateTimer(&(satTimer[1])));
    CUT_SAFE_CALL(cutCreateTimer(&(satTimer[2])));
}

extern "C"

                                                   d_satPitchInElements,
                                                   width, height);
    CUT_CHECK_ERROR("de-interleave");

    // scan rows
    cudppMultiScan(scanPlan, SATs[1][0], SATs[0][0], width, height);
    CUT_CHECK_ERROR("scan 1");
