cuda::experimental::make_hierarchy
Defined in include/cuda/experimental/__hierarchy/hierarchy_dimensions.cuh
-
template<typename L1, typename ...Levels>
constexpr auto cuda::experimental::make_hierarchy(L1 l1, Levels... ls) noexcept Creates a hierarchy from passed in levels.
This function takes any number of level_dimensions or derived objects and creates a hierarchy out of them. Levels need to be in ascending or descending order and the lowest level needs to be valid for thread_level unit. To create a hierarchy not ending with thread_level unit, use make_hierarchy_fragment instead.
- Snippet
#include <cudax/hierarchy_dimensions.cuh> using namespace cuda::experimental; auto hierarchy1 = make_hierarchy(grid_dims(256), cluster_dims<4>(), block_dims<8, 8, 8>()); auto hierarchy2 = make_hierarchy(block_dims<8, 8, 8>(), cluster_dims<4>(), grid_dims(256)); static_assert(cuda::std::is_same_v<decltype(hierarchy1), decltype(hierarchy2)>);