Skip to content

[SYCL][Doc] Add indeterminate to work_group_memory #15933

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,15 @@ This extension adds the following new class:
----
namespace sycl::ext::oneapi::experimental {

struct indeterminate_t {};
inline constexpr indeterminate_t indeterminate;

template<typename DataT, typename PropertyListT = empty_properties_t>
class work_group_memory {
public:
using value_type = std::remove_all_extents_t<DataT>;

work_group_memory();
work_group_memory(const indeterminate_t&);
work_group_memory(const work_group_memory& rhs);
work_group_memory(handler& cgh);
work_group_memory(size_t num, handler& cgh);
Expand All @@ -132,7 +135,7 @@ The `work_group_memory` class allocates device local memory and provides access
to this memory from within a SYCL kernel function.
The local memory that is allocated is shared between all work-items of a
work-group.
If multiple work-groups execute simultaneously, each of those work-group
If multiple work-groups execute simultaneously, each of those work-groups
receives its own independent copy of the allocated local memory.

The `work_group_memory` type is a legal kernel parameter type as defined in
Expand Down Expand Up @@ -193,7 +196,7 @@ array extents removed.
a@
[source,c++]
----
work_group_memory();
work_group_memory(const indeterminate_t&);
----
!====

Expand All @@ -207,6 +210,11 @@ member functions or operators produces undefined behavior.
[_Note:_ This constructor may be called in either host code or device code.
_{endnote}_]

[_Note:_ The parameter of type `indeterminate_t` is present only to help make it
apparent that this constructor creates a "dummy" `work_group_memory` object.
Applications typically pass the value `indeterminate`.
_{endnote}_]

'''

[frame=all,grid=none,separator="@"]
Expand Down