diff --git a/thrust/detail/tuple_meta_transform.h b/thrust/detail/tuple_meta_transform.h index 4aca1a91b..176834d30 100644 --- a/thrust/detail/tuple_meta_transform.h +++ b/thrust/detail/tuple_meta_transform.h @@ -17,6 +17,7 @@ #pragma once #include +#include namespace thrust { @@ -26,148 +27,16 @@ namespace detail template class UnaryMetaFunction, - unsigned int sz = thrust::tuple_size::value> + typename IndexSequence = thrust::make_index_sequence::value>> struct tuple_meta_transform; template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef null_type type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform -{ - typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type - > type; -}; - -template class UnaryMetaFunction> - struct tuple_meta_transform + template class UnaryMetaFunction, + size_t... Is> + struct tuple_meta_transform> { typedef thrust::tuple< - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type, - typename UnaryMetaFunction::type>::type + typename UnaryMetaFunction::type>::type... > type; };