Skip to content

Commit 3507d53

Browse files
author
Alexander Batashev
committed
address feedback
1 parent 54e68a5 commit 3507d53

File tree

5 files changed

+6
-25
lines changed

5 files changed

+6
-25
lines changed

sycl/include/CL/__spirv/spirv_ops.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,4 +606,5 @@ __spirv_MemoryBarrier(__spv::Scope Memory, uint32_t Semantics) noexcept;
606606
__SYCL_CONVERGENT__ extern SYCL_EXTERNAL __SYCL_EXPORT void
607607
__spirv_GroupWaitEvents(__spv::Scope Execution, uint32_t NumEvents,
608608
__ocl_event_t *WaitEvents) noexcept;
609+
609610
#endif // !__SYCL_DEVICE_ONLY__

sycl/include/CL/sycl/ONEAPI/sub_group.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#include <CL/sycl/detail/helpers.hpp>
1818
#include <CL/sycl/detail/spirv.hpp>
1919
#include <CL/sycl/detail/type_traits.hpp>
20-
#include <CL/sycl/enums.hpp>
2120
#include <CL/sycl/id.hpp>
21+
#include <CL/sycl/memory_enums.hpp>
2222
#include <CL/sycl/range.hpp>
2323
#include <CL/sycl/types.hpp>
2424

sycl/include/CL/sycl/detail/spirv.hpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <CL/sycl/detail/generic_type_traits.hpp>
1515
#include <CL/sycl/detail/helpers.hpp>
1616
#include <CL/sycl/detail/type_traits.hpp>
17-
#include <CL/sycl/enums.hpp>
1817
#include <CL/sycl/id.hpp>
1918

2019
#ifdef __SYCL_DEVICE_ONLY__
@@ -260,21 +259,6 @@ getScope(ONEAPI::memory_scope Scope) {
260259
}
261260
}
262261

263-
constexpr __spv::Scope::Flag getScope(memory_scope Scope) {
264-
switch (Scope) {
265-
case memory_scope::work_item:
266-
return __spv::Scope::Invocation;
267-
case memory_scope::sub_group:
268-
return __spv::Scope::Subgroup;
269-
case memory_scope::work_group:
270-
return __spv::Scope::Workgroup;
271-
case memory_scope::device:
272-
return __spv::Scope::Device;
273-
case memory_scope::system:
274-
return __spv::Scope::CrossDevice;
275-
}
276-
}
277-
278262
template <typename T, access::address_space AddressSpace>
279263
inline typename detail::enable_if_t<std::is_integral<T>::value, T>
280264
AtomicCompareExchange(multi_ptr<T, AddressSpace> MPtr,

sycl/include/CL/sycl/group.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
#include <CL/sycl/detail/generic_type_traits.hpp>
1616
#include <CL/sycl/detail/helpers.hpp>
1717
#include <CL/sycl/device_event.hpp>
18-
#include <CL/sycl/enums.hpp>
1918
#include <CL/sycl/h_item.hpp>
2019
#include <CL/sycl/id.hpp>
20+
#include <CL/sycl/memory_enums.hpp>
2121
#include <CL/sycl/pointers.hpp>
2222
#include <CL/sycl/range.hpp>
2323
#include <stdexcept>

sycl/include/CL/sycl/enums.hpp renamed to sycl/include/CL/sycl/memory_enums.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@
88

99
#pragma once
1010

11+
#include <CL/sycl/ONEAPI/atomic_enums.hpp>
12+
1113
__SYCL_INLINE_NAMESPACE(cl) {
1214
namespace sycl {
13-
enum class memory_scope : unsigned char {
14-
work_item = 0,
15-
sub_group = 1,
16-
work_group = 2,
17-
device = 3,
18-
system = 4
19-
};
15+
using ONEAPI::memory_scope;
2016

2117
#if __cplusplus >= 201703L
2218
inline constexpr auto memory_scope_work_item = memory_scope::work_item;

0 commit comments

Comments
 (0)