 }
 
 
-template<size_t... Indices, class Function, class OuterArgumentPointer, class InnerFactory, class TupleOfNonVoidFutures>
+template<size_t... Indices, class Function, class Shape, class OuterArgumentPointer, class InnerFactory, class TupleOfNonVoidFutures>
 agency::cuda::detail::event
-  launch_when_all_execute_operation(agency::detail::index_sequence<Indices...>, agency::cuda::detail::event& dependency, Function f, agency::cuda::grid_executor::shape_type shape, OuterArgumentPointer outer_arg_ptr, InnerFactory inner_factory, TupleOfNonVoidFutures& futures)
+  launch_when_all_execute_operation(agency::detail::index_sequence<Indices...>,
+                                    agency::cuda::detail::event& dependency,
+                                    Function f,
+                                    Shape shape,
+                                    OuterArgumentPointer outer_arg_ptr,
+                                    InnerFactory inner_factory,
+                                    TupleOfNonVoidFutures& futures)
 {
   // unpack the futures and pass their data pointers to when_all_execute_impl3
   return launch_when_all_execute_operation_impl(dependency, f, shape, outer_arg_ptr, inner_factory, agency::cuda::detail::get<Indices>(futures).data()...);
 }
 
 
-template<size_t... SelectedIndices, size_t... TupleIndices, class TupleOfFutures, class Function, class OuterFactory, class InnerFactory>
+template<size_t... SelectedIndices, size_t... TupleIndices, class Function, class Shape, class TupleOfFutures, class OuterFactory, class InnerFactory>
 agency::cuda::future<new_when_all_execute_and_select_result_t<agency::detail::index_sequence<SelectedIndices...>, TupleOfFutures>>
   when_all_execute_and_select_impl(agency::detail::index_sequence<SelectedIndices...>,
                                    agency::detail::index_sequence<TupleIndices...>,
                                    Function f,
-                                   agency::cuda::grid_executor::shape_type shape,
+                                   Shape shape,
                                    TupleOfFutures tuple_of_futures,
                                    OuterFactory outer_factory,
                                    InnerFactory inner_factory)



template<size_t... Indices, class TupleOfFutures>
auto move_construct_result_from_tuple_of_futures(agency::detail::index_sequence<Indices...>, agency::cuda::detail::event& dependency, TupleOfFutures& futures)
  -> decltype(move_construct_result(dependency, agency::detail::get<Indices>(futures).data()...))
{

{
  return when_all_execute_functor<Function, IndexFunction, OuterArgumentPointer, InnerFactory, DependencyPointers...>(f, index_function, outer_arg_ptr, inner_factory, dependency_ptrs...);
}


template<class FutureOrFutureReference>
