Skip to content

Commit

Permalink
Add missing multi_ptr aliases for access::address_space::generic
Browse files Browse the repository at this point in the history
Add `[decorated_|raw_]generic_ptr` aliases definitions.

These aliases were previously mentioned in the
text (https://github.com/KhronosGroup/SYCL-Docs/blob/d314fbc9aead30704dd1f4d35db4b55b93bce7b0/adoc/chapters/architecture.adoc?plain=1#L1021),
but their definitions were missing where their homologous are defined.

Signed-off-by: Victor Perez <[email protected]>
  • Loading branch information
victor-eds committed Aug 1, 2024
1 parent d314fbc commit 2583115
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions adoc/config/rouge/lib/rouge/lexers/sycl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ class Sycl < Cpp
context_bound
cpu_selector
decorated_constant_ptr
decorated_generic_ptr
decorated_global_ptr
decorated_local_ptr
decorated_private_ptr
Expand Down
15 changes: 15 additions & 0 deletions adoc/headers/pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ template <typename ElementType,
using private_ptr =
multi_ptr<ElementType, access::address_space::private_space, IsDecorated>;

template <typename ElementType,
access::decorated IsDecorated = access::decorated::legacy>
using generic_ptr =
multi_ptr<ElementType, access::address_space::generic_space, IsDecorated>;

// Template specialization aliases for different pointer address spaces.
// The interface exposes non-decorated pointer while keeping the
// address space information internally.
Expand All @@ -48,6 +53,11 @@ using raw_private_ptr =
multi_ptr<ElementType, access::address_space::private_space,
access::decorated::no>;

template <typename ElementType>
using raw_generic_ptr =
multi_ptr<ElementType, access::address_space::generic_space,
access::decorated::no>;

// Template specialization aliases for different pointer address spaces.
// The interface exposes decorated pointer.

Expand All @@ -66,4 +76,9 @@ using decorated_private_ptr =
multi_ptr<ElementType, access::address_space::private_space,
access::decorated::yes>;

template <typename ElementType>
using decorated_generic_ptr =
multi_ptr<ElementType, access::address_space::generic_space,
access::decorated::yes>;

} // namespace sycl

0 comments on commit 2583115

Please sign in to comment.