@@ -106,10 +106,10 @@ namespace cuda::experimental
106106template <typename ... _ExpTypes, typename _Dst, typename _Config>
107107_CCCL_HOST_API auto __launch_impl (_Dst&& __dst, _Config __conf, ::CUfunction __kernel, _ExpTypes... __args)
108108{
109- static_assert (!::cuda::std::is_same_v<decltype (__conf.dims ), no_init_t >,
109+ static_assert (!::cuda::std::is_same_v<decltype (__conf.hierarchy () ), no_init_t >,
110110 " Can't launch a configuration without hierarchy dimensions" );
111111 ::CUlaunchConfig __config{};
112- constexpr bool __has_cluster_level = has_level_v<cluster_level, decltype (__conf.dims )>;
112+ constexpr bool __has_cluster_level = has_level_v<cluster_level, decltype (__conf.hierarchy () )>;
113113 constexpr unsigned int __num_attrs_needed =
114114 ::cuda::__detail::kernel_config_count_attr_space (__conf) + __has_cluster_level;
115115 ::CUlaunchAttribute __attrs[__num_attrs_needed == 0 ? 1 : __num_attrs_needed];
@@ -122,20 +122,20 @@ _CCCL_HOST_API auto __launch_impl(_Dst&& __dst, _Config __conf, ::CUfunction __k
122122 ::cuda::__throw_cuda_error (__status, " Failed to prepare a launch configuration" );
123123 }
124124
125- __config.gridDimX = static_cast <unsigned >(__conf.dims .extents (block, grid).x );
126- __config.gridDimY = static_cast <unsigned >(__conf.dims .extents (block, grid).y );
127- __config.gridDimZ = static_cast <unsigned >(__conf.dims .extents (block, grid).z );
128- __config.blockDimX = static_cast <unsigned >(__conf.dims .extents (gpu_thread, block).x );
129- __config.blockDimY = static_cast <unsigned >(__conf.dims .extents (gpu_thread, block).y );
130- __config.blockDimZ = static_cast <unsigned >(__conf.dims .extents (gpu_thread, block).z );
125+ __config.gridDimX = static_cast <unsigned >(__conf.hierarchy () .extents (block, grid).x );
126+ __config.gridDimY = static_cast <unsigned >(__conf.hierarchy () .extents (block, grid).y );
127+ __config.gridDimZ = static_cast <unsigned >(__conf.hierarchy () .extents (block, grid).z );
128+ __config.blockDimX = static_cast <unsigned >(__conf.hierarchy () .extents (gpu_thread, block).x );
129+ __config.blockDimY = static_cast <unsigned >(__conf.hierarchy () .extents (gpu_thread, block).y );
130+ __config.blockDimZ = static_cast <unsigned >(__conf.hierarchy () .extents (gpu_thread, block).z );
131131
132132 if constexpr (__has_cluster_level)
133133 {
134134 ::CUlaunchAttribute __cluster_dims_attr{};
135135 __cluster_dims_attr.id = ::CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION;
136- __cluster_dims_attr.value .clusterDim .x = static_cast <unsigned >(__conf.dims .extents (block, cluster).x );
137- __cluster_dims_attr.value .clusterDim .y = static_cast <unsigned >(__conf.dims .extents (block, cluster).y );
138- __cluster_dims_attr.value .clusterDim .z = static_cast <unsigned >(__conf.dims .extents (block, cluster).z );
136+ __cluster_dims_attr.value .clusterDim .x = static_cast <unsigned >(__conf.hierarchy () .extents (block, cluster).x );
137+ __cluster_dims_attr.value .clusterDim .y = static_cast <unsigned >(__conf.hierarchy () .extents (block, cluster).y );
138+ __cluster_dims_attr.value .clusterDim .z = static_cast <unsigned >(__conf.hierarchy () .extents (block, cluster).z );
139139 __config.attrs [__config.numAttrs ++] = __cluster_dims_attr;
140140 }
141141
@@ -162,7 +162,7 @@ _CCCL_CONCEPT work_submitter =
162162// ! template <typename Configuration>
163163// ! __device__ void operator()(Configuration conf, unsigned int
164164// ! thread_to_print) {
165- // ! if (conf.dims .rank(cudax::thread, cudax::grid) == thread_to_print) {
165+ // ! if (conf.hierarchy() .rank(cudax::thread, cudax::grid) == thread_to_print) {
166166// ! printf("Hello from the GPU\n");
167167// ! }
168168// ! }
@@ -294,7 +294,7 @@ _CCCL_HOST_API auto launch(_Submitter&& __submitter,
294294// !
295295// ! template <typename Configuration>
296296// ! __global__ void kernel(Configuration conf, unsigned int thread_to_print) {
297- // ! if (conf.dims .rank(cudax::thread, cudax::grid) == thread_to_print) {
297+ // ! if (conf.hierarchy() .rank(cudax::thread, cudax::grid) == thread_to_print) {
298298// ! printf("Hello from the GPU\n");
299299// ! }
300300// ! }
@@ -351,7 +351,7 @@ _CCCL_HOST_API auto launch(_Submitter&& __submitter,
351351// !
352352// ! template <typename Configuration>
353353// ! __global__ void kernel(Configuration conf, unsigned int thread_to_print) {
354- // ! if (conf.dims .rank(cudax::thread, cudax::grid) == thread_to_print) {
354+ // ! if (conf.hierarchy() .rank(cudax::thread, cudax::grid) == thread_to_print) {
355355// ! printf("Hello from the GPU\n");
356356// ! }
357357// ! }
@@ -404,7 +404,7 @@ _CCCL_HOST_API auto launch(_Submitter&& __submitter,
404404// !
405405// ! template <typename Configuration>
406406// ! __global__ void kernel(Configuration conf, unsigned int thread_to_print) {
407- // ! if (conf.dims .rank(cudax::thread, cudax::grid) == thread_to_print) {
407+ // ! if (conf.hierarchy() .rank(cudax::thread, cudax::grid) == thread_to_print) {
408408// ! printf("Hello from the GPU\n");
409409// ! }
410410// ! }
0 commit comments