Skip to content

Commit

Permalink
Add extent observers to common group interface
Browse files Browse the repository at this point in the history
rank(), rank_dynamic() and static_extent() are all exposed as static
member functions in mdspan, so we follow that precedent here.
  • Loading branch information
Pennycook committed Dec 5, 2024
1 parent 9341806 commit 008ac23
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions adoc/extensions/sycl_khr_group_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ class GroupT {
#if defined (__cpp_lib_mdspan)
constexpr extents_type extents() const noexcept;
constexpr index_type extent(rank_type r) const noexcept;
static constexpr rank_type rank() noexcept;
static constexpr rank_type rank_dynamic() noexcept;
static constexpr size_t static_extent(rank_type r) noexcept;
#endif
constexpr size_type size() const noexcept;
Expand Down Expand Up @@ -139,6 +143,36 @@ _Returns_: The number of work-items in the specified dimension of the group.

'''

.[apidef]#GroupT::rank#
[source,role=synopsis,id=api:khr-group-interface-common-group-rank]
----
static constexpr rank_type rank() noexcept;
----

_Effects_: Equivalent to [code]#return extents_type::rank();#.

'''

.[apidef]#GroupT::rank_dynamic#
[source,role=synopsis,id=api:khr-group-interface-common-group-rank_dynamic]
----
static constexpr rank_type rank_dynamic() noexcept;
----

_Effects_: Equivalent to [code]#return extents_type::rank_dynamic();#.

'''

.[apidef]#GroupT::static_extent#
[source,role=synopsis,id=api:khr-group-interface-common-group-static_extent]
----
static constexpr size_t static_extent(rank_type r) noexcept;
----

_Effects_: Equivalent to [code]#return extents_type::static_extent(r);#.

'''

.[apidef]#GroupT::size#
[source,role=synopsis,id=api:common-group-size]
----
Expand Down

0 comments on commit 008ac23

Please sign in to comment.