Skip to content

Conversation

@davebayer
Copy link
Contributor

Closes #6885

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Dec 11, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Progress in CCCL Dec 11, 2025
@davebayer davebayer changed the title Rework hierarchy Rework hierarchy levels Dec 11, 2025
@davebayer davebayer force-pushed the rework_hierarchy branch 2 times, most recently from 1696934 to 8e96baa Compare December 11, 2025 19:52
@davebayer davebayer force-pushed the rework_hierarchy branch 3 times, most recently from 378f52f to ee6e83f Compare December 16, 2025 13:49
@davebayer davebayer marked this pull request as ready for review December 16, 2025 13:49
@davebayer davebayer requested review from a team as code owners December 16, 2025 13:49
@cccl-authenticator-app cccl-authenticator-app bot moved this from In Progress to In Review in CCCL Dec 16, 2025
@github-actions

This comment has been minimized.

@NVIDIA NVIDIA deleted a comment from github-actions bot Dec 17, 2025
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

😬 CI Workflow Results

🟥 Finished in 1h 35m: Pass: 98%/123 | Total: 1d 18h | Max: 1h 35m | Hits: 99%/212322

See results here.

*/
template <class _Tp, size_t... _Extents>
struct hierarchy_query_result : public dimensions<_Tp, _Extents...>
struct hierarchy_query_result_org : 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.

Should this type be removed?


_CCCL_TEMPLATE(class _Tp, class _Hierarchy)
_CCCL_REQUIRES(::cuda::std::__cccl_is_integer_v<_Tp> _CCCL_AND __is_hierarchy_v<_Hierarchy>)
[[nodiscard]] _CCCL_DEVICE_API static _Tp rank_as(const grid_level& __level, const _Hierarchy& __hier) noexcept
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed just as an optimization?

_CCCL_TEMPLATE(class _Tp, class _InLevel, class _Hierarchy)
_CCCL_REQUIRES(::cuda::std::__cccl_is_integer_v<_Tp> _CCCL_AND __is_hierarchy_level_v<_InLevel> _CCCL_AND
__is_hierarchy_v<_Hierarchy>)
[[nodiscard]] _CCCL_API static constexpr auto extents_as(const _InLevel& __in_level, const _Hierarchy& __hier) noexcept
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just return __hier.extents(_Level{}, _InLevel{})?


_CCCL_TEMPLATE(class _Tp2 = _Tp)
_CCCL_REQUIRES(::cuda::std::is_same_v<_Tp2, signed char>)
_CCCL_API constexpr operator char3() const noexcept
Copy link
Contributor

Choose a reason for hiding this comment

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

we really need all those operators?

inline constexpr bool trait_v = cuda::__is_natively_reachable_hierarchy_level_v<FromLevel, ToLevel>;

static_assert(!trait_v<cuda::thread_level, cuda::thread_level>);
static_assert(!trait_v<cuda::thread_level, cuda::warp_level>);
Copy link
Contributor

Choose a reason for hiding this comment

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

think a query like that should work no?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

[FEA]: Improve device hierarchy queries

2 participants