         LOGICAL_WARP_THREADS,
         scan_op,
         initial_value,
-        aggregates);
+        aggregates,
+        TOTAL_WARPS);
 
     if (g_verbose)
     {

// Globals, constants and typedefs
//---------------------------------------------------------------------

static const int        NUM_WARPS       = 2;


bool                    g_verbose       = false;

    typedef WarpScan<T, LOGICAL_WARP_THREADS> WarpScanT;

    // Allocate temp storage in shared memory
    __shared__ typename WarpScanT::TempStorage temp_storage[MAX_WARPS];

    // Get warp index
    int warp_id = threadIdx.x / LOGICAL_WARP_THREADS;
