Skip to content

[CUDAX] Uglify the hierarchy files#6491

Merged
davebayer merged 4 commits intoNVIDIA:mainfrom
pciolkosz:uglify_hierarchy
Nov 6, 2025
Merged

[CUDAX] Uglify the hierarchy files#6491
davebayer merged 4 commits intoNVIDIA:mainfrom
pciolkosz:uglify_hierarchy

Conversation

@pciolkosz
Copy link
Contributor

Before we move the hierarchy files to libcu++ we should make them aligned with the naming style there

@pciolkosz pciolkosz requested a review from a team as a code owner November 5, 2025 02:48
@pciolkosz pciolkosz requested a review from griwes November 5, 2025 02:48
@github-project-automation github-project-automation bot moved this to Todo in CCCL Nov 5, 2025
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Review in CCCL Nov 5, 2025
@github-actions

This comment has been minimized.

{
OpType op;
return op(e1, e2);
_Op __op;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: this should probably initialize

Suggested change
_Op __op;
_Op __op{};

Comment on lines 810 to 812
[](auto&&, auto&&... rest) {
return ::cuda::std::make_tuple(rest...);
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed some

Comment on lines 345 to 346
auto d = __detail::__extents_impl<_Unit, _Level>();
return d.extent(0) * d.extent(1) * d.extent(2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed some

static constexpr bool __is_type_supported = true;

[[nodiscard]] _CCCL_HOST_DEVICE static constexpr auto translate(const Dims& d) noexcept
[[nodiscard]] _CCCL_HOST_DEVICE static constexpr auto __translate(const _Dims& __d) noexcept
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: we try to avoid single letter names, how about __d -> __dim

Comment on lines +58 to +59
template <class _Tp, size_t... _Extents>
struct hierarchy_query_result : public dimensions<_Tp, _Extents...>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We resolve what the return type of hierarchy queries should be before moving this to libcu++

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets keep this change limited to renames only

Comment on lines 110 to +112
// For now target only 3 dim extents
static_assert(sizeof...(Extents1) == sizeof...(Extents2));
static_assert(sizeof...(Extents1) == 3);
static_assert(sizeof...(_E1) == sizeof...(_E2));
static_assert(sizeof...(_E1) == 3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this constraint in the future

Comment on lines 153 to 157
template <size_t _X, size_t _Y = 1, size_t _Z = 1>
_CCCL_HOST_DEVICE constexpr auto grid_dims() noexcept
{
return level_dimensions<grid_level, dimensions<dimensions_index_type, X, Y, Z>>();
return level_dimensions<grid_level, dimensions<dimensions_index_type, _X, _Y, _Z>>();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want an overload taking cuda::std::extents, so we allow mixing dynamic/static extents?

@github-project-automation github-project-automation bot moved this from In Review to In Progress in CCCL Nov 5, 2025
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 5, 2025

🥳 CI Workflow Results

🟩 Finished in 31m 06s: Pass: 100%/42 | Total: 6h 09m | Max: 23m 52s | Hits: 84%/20848

See results here.

@github-project-automation github-project-automation bot moved this from In Progress to In Review in CCCL Nov 6, 2025
@davebayer davebayer merged commit 146049d into NVIDIA:main Nov 6, 2025
56 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants