 
         segment_offsets.push_back(consumed);
     }
-
-    // Allocate simple offsets array and copy STL vector into it
-    if (g_verbose) std::cout << "Segment offsets: ";
-    h_segment_offsets = new Offset[segment_offsets.size()];
-    for (int i = 0; i < segment_offsets.size(); ++i)
-    {
-        h_segment_offsets[i] = segment_offsets[i];
-        if (g_verbose) std::cout << h_segment_offsets[i] << ", ";
-    }
-    if (g_verbose) std::cout << std::endl << std::endl;
-
-    num_segments = segment_offsets.size() - 1;
 }
 
 

                Offset num_segments = next_tile_segment_idx - block_segment_idx;
                StoreStriped<BLOCK_THREADS>(threadIdx.x, d_output + block_segment_idx, segment_reductions, num_segments);
            }
            else
            {
                // Merge the tile's segment and value indices

                // Get thread begin-indices
                Offset thread_segment_idx    = temp_storage.thread_segment_idx[threadIdx.x];
                Offset thread_value_idx      = temp_storage.thread_value_idx[threadIdx.x];

                // Barrier for smem reuse
                __syncthreads();


                    tail_flags[ITEM]                = 0;

                    // Whether or not we slide (a) right along the segment path or (b) down the value path
                    if (valid_segment && (!valid_value || (segment_end_offset <= value_offset)))
                    {
                        // Consume this segment index

