 
 
 	//-----------------------------------------------------------------------------
+	// Helper structures
+	//-----------------------------------------------------------------------------
+
+	template <
+		int _START_BIT,
+		int _NUM_BITS,
+		typename PingPongStorage,
+		typename SizeT>
+	friend class Detail;
+
+
+	//-----------------------------------------------------------------------------
 	// Utility Routines
 	//-----------------------------------------------------------------------------
 

		if (detail.num_elements < saturating_load) {

			// Invoke base class enact with small-problem config type
			typedef AutotunedPolicy<ProblemType, CUDA_ARCH, SMALL_SIZE> SmallPolicy;
			return detail.enactor->template EnactSort<SmallPolicy>(detail);
		}

		// Invoke base class enact with type
		return detail.enactor->template EnactSort<LargePolicy>(detail);
	}
};


	template <int CUDA_ARCH, typename Detail>
	static cudaError_t Enact(Detail &detail)
	{
		// Obtain large tuned granularity type
		typedef AutotunedPolicy<
			typename Detail::ProblemType,
			CUDA_ARCH,
			LARGE_SIZE> LargePolicy;

		// Identity the maximum problem size for which we can saturate loads
		int saturating_load = LargePolicy::Upsweep::TILE_ELEMENTS *
