Skip to content

Commit 435402b

Browse files
committed
Formatting and remove warnings
1 parent d78b932 commit 435402b

File tree

8 files changed

+93
-85
lines changed

8 files changed

+93
-85
lines changed

clang/lib/Sema/SemaSYCL.cpp

Lines changed: 70 additions & 67 deletions
Large diffs are not rendered by default.

clang/test/SemaSYCL/Inputs/sycl.hpp

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ local_accessor: public accessor<dataT,
227227
access::target::local> {
228228
public:
229229
#ifdef __SYCL_DEVICE_ONLY__
230-
local_accessor() = default;
230+
local_accessor() = default;
231231
#endif
232232
void use(void) const {}
233233
template <typename... T>
@@ -252,11 +252,13 @@ struct sampler_impl {
252252
class __attribute__((sycl_special_class)) __SYCL_TYPE(sampler) sampler {
253253
struct sampler_impl impl;
254254
#ifdef __SYCL_DEVICE_ONLY__
255-
sampler() = default;
256255
void __init(__ocl_sampler_t Sampler) { impl.m_Sampler = Sampler; }
257256
#endif
258257

259258
public:
259+
#ifdef __SYCL_DEVICE_ONLY__
260+
sampler() = default;
261+
#endif
260262
void use(void) const {}
261263
};
262264

@@ -489,19 +491,21 @@ namespace experimental {
489491
template <typename T, typename... Props>
490492
class __attribute__((sycl_special_class)) __SYCL_TYPE(annotated_arg) annotated_arg {
491493
T obj;
492-
#ifdef __SYCL_DEVICE_ONLY__
493-
annotated_arg() = default;
494-
void __init(T _obj) {}
495-
#endif
494+
#ifdef __SYCL_DEVICE_ONLY__
495+
void __init(T _obj) {}
496+
public:
497+
annotated_arg() = default;
498+
#endif
496499
};
497500

498501
template <typename T, typename... Props>
499502
class __attribute__((sycl_special_class)) __SYCL_TYPE(annotated_ptr) annotated_ptr {
500503
T* obj;
501-
#ifdef __SYCL_DEVICE_ONLY__
502-
annotated_ptr() = default;
503-
void __init(T* _obj) {}
504-
#endif
504+
#ifdef __SYCL_DEVICE_ONLY__
505+
void __init(T* _obj) {}
506+
public:
507+
annotated_ptr() = default;
508+
#endif
505509
};
506510

507511
} // namespace experimental

sycl/include/sycl/access/access.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ inline namespace _V1 {
2020
namespace access {
2121

2222
enum class target {
23-
global_buffer __SYCL2020_DEPRECATED("use 'target::device' instead") = 2014,
23+
device = 2014,
24+
global_buffer __SYCL2020_DEPRECATED("use 'target::device' instead") = device,
2425
constant_buffer __SYCL2020_DEPRECATED("use 'target::device' instead") = 2015,
2526
local __SYCL2020_DEPRECATED("use `local_accessor` instead") = 2016,
2627
image = 2017,
2728
host_buffer __SYCL2020_DEPRECATED("use 'host_accessor' instead") = 2018,
2829
host_image = 2019,
2930
image_array = 2020,
3031
host_task = 2021,
31-
device = global_buffer,
3232
};
3333

3434
enum class mode {

sycl/include/sycl/accessor.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ class AccessorPrivateProxy;
221221
} // namespace ext::intel::esimd::detail
222222

223223
template <typename DataT, int Dimensions = 1,
224-
access::mode AccessMode = sycl::access::mode::read_write,
225-
access::target AccessTarget = sycl::access::target::device,
226-
access::placeholder IsPlaceholder = sycl::access::placeholder::false_t,
224+
access::mode AccessMode = access::mode::read_write,
225+
access::target AccessTarget = access::target::device,
226+
access::placeholder IsPlaceholder = access::placeholder::false_t,
227227
typename PropertyListT = ext::oneapi::accessor_property_list<>>
228228
class accessor;
229229

sycl/include/sycl/handler.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,8 +520,7 @@ class __SYCL_EXPORT handler {
520520

521521
/// Saves the location of user's code passed in \p CodeLoc for future usage in
522522
/// finalize() method.
523-
/// TODO: remove the first version of this func (the one without the
524-
/// IsTopCodeLoc arg)
523+
/// TODO: remove the first version of this func (the one without the IsTopCodeLoc arg)
525524
/// at the next ABI breaking window since removing it breaks ABI on windows.
526525
void saveCodeLoc(detail::code_location CodeLoc);
527526
void saveCodeLoc(detail::code_location CodeLoc, bool IsTopCodeLoc);

sycl/include/sycl/kernel_bundle.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ template <typename KernelName> kernel_id get_kernel_id();
5959

6060
namespace ext::oneapi::experimental {
6161
template <auto *Func>
62-
kernel_id get_kernel_id();
62+
std::enable_if_t<is_kernel_v<Func>, kernel_id> get_kernel_id();
6363
} // namespace ext::oneapi::experimental
6464

6565
/// Objects of the class identify kernel is some kernel_bundle related APIs

sycl/test/abi/sycl_symbols_linux.dump

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3511,6 +3511,7 @@ _ZN4sycl3_V17handler11storeRawArgEPKvm
35113511
_ZN4sycl3_V17handler12addReductionERKSt10shared_ptrIKvE
35123512
_ZN4sycl3_V17handler12setArgHelperEiRNS0_3ext6oneapi12experimental6detail30dynamic_work_group_memory_baseE
35133513
_ZN4sycl3_V17handler12setArgHelperEiRNS0_6detail22work_group_memory_implE
3514+
_ZN4sycl3_V17handler12setArgHelperEiONS0_6streamE
35143515
_ZN4sycl3_V17handler13getKernelNameEv
35153516
_ZN4sycl3_V17handler14addAccessorReqESt10shared_ptrINS0_6detail16AccessorImplHostEE
35163517
_ZN4sycl3_V17handler14setNDRangeUsedEb

sycl/test/abi/sycl_symbols_windows.dump

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4346,6 +4346,7 @@
43464346
?select_device@filter_selector@oneapi@ext@_V1@sycl@@UEBA?AVdevice@45@XZ
43474347
?setArgHelper@handler@_V1@sycl@@AEAAXH$$QEAVraw_kernel_arg@experimental@oneapi@ext@23@@Z
43484348
?setArgHelper@handler@_V1@sycl@@AEAAXH$$QEAVsampler@23@@Z
4349+
?setArgHelper@handler@_V1@sycl@@AEAAXH$$QEAVstream@23@@Z
43494350
?setArgHelper@handler@_V1@sycl@@AEAAXHAEAVwork_group_memory_impl@detail@23@@Z
43504351
?setArgsHelper@handler@_V1@sycl@@AEAAXH@Z
43514352
?setArgsToAssociatedAccessors@handler@_V1@sycl@@AEAAXXZ

0 commit comments

Comments
 (0)