DPC++ Runtime
Runtime libraries for oneAPI DPC++
group_local_memory.hpp
Go to the documentation of this file.
1 //==----- group_local_memory.hpp --- SYCL group local memory extension -----==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 #pragma once
9 
12 
13 #include <type_traits>
14 
15 namespace sycl {
17 template <typename T, typename Group>
19  "use sycl::ext::oneapi::group_local_memory_for_overwrite instead")
20 std::enable_if_t<std::is_trivially_destructible<T>::value &&
21  detail::is_group<Group>::value,
22  multi_ptr<T, access::address_space::local_space,
23  access::decorated::legacy>> __SYCL_ALWAYS_INLINE
25  return sycl::ext::oneapi::group_local_memory_for_overwrite<T, Group>(g);
26 }
27 
28 template <typename T, typename Group, typename... Args>
29 __SYCL_DEPRECATED("use sycl::ext::oneapi::group_local_memory instead")
30 std::enable_if_t<std::is_trivially_destructible<T>::value &&
31  detail::is_group<Group>::value,
32  multi_ptr<T, access::address_space::local_space,
33  access::decorated::legacy>> __SYCL_ALWAYS_INLINE
34  group_local_memory(Group g, Args &&...args) {
35  return sycl::ext::oneapi::group_local_memory<T, Group, Args...>(
36  g, std::forward<Args>(args)...);
37 }
38 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
39 } // namespace sycl
group_local_memory.hpp
T
__SYCL_INLINE_VER_NAMESPACE
#define __SYCL_INLINE_VER_NAMESPACE(X)
Definition: defines_elementary.hpp:11
__SYCL_ALWAYS_INLINE
#define __SYCL_ALWAYS_INLINE
Definition: defines_elementary.hpp:25
sycl::_V1::group_local_memory
std::enable_if_t< std::is_trivially_destructible< T >::value &&detail::is_group< Group >::value, multi_ptr< T, access::address_space::local_space, access::decorated::legacy > > __SYCL_ALWAYS_INLINE group_local_memory(Group g, Args &&...args)
Definition: group_local_memory.hpp:34
spirv_vars.hpp
sycl
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:14
__SYCL_DEPRECATED
#define __SYCL_DEPRECATED(message)
Definition: defines_elementary.hpp:46
sycl::_V1::detail::enable_if_t
typename std::enable_if< B, T >::type enable_if_t
Definition: stl_type_traits.hpp:24
sycl::_V1::multi_ptr
Provides constructors for address space qualified and non address space qualified pointers to allow i...
Definition: atomic.hpp:34
sycl::_V1::access::decorated
decorated
Definition: access.hpp:59
sycl::_V1::is_group
Definition: type_traits.hpp:68
std
Definition: accessor.hpp:3230
sycl::_V1::ext::oneapi::group_local_memory_for_overwrite
std::enable_if_t< std::is_trivially_destructible< T >::value &&sycl::detail::is_group< Group >::value, multi_ptr< T, access::address_space::local_space, access::decorated::legacy > > __SYCL_ALWAYS_INLINE group_local_memory_for_overwrite(Group g)
Definition: group_local_memory.hpp:30
sycl::_V1::access::address_space
address_space
Definition: access.hpp:47