Skip to content

Commit

Permalink
Merge pull request #598 from victor-eds/add-generic-ptr-aliases
Browse files Browse the repository at this point in the history
Add missing `multi_ptr` aliases for `access::address_space::generic`
  • Loading branch information
tomdeakin authored Nov 7, 2024
2 parents d1bf02b + 2583115 commit 377f431
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 377f431

Please sign in to comment.