Skip to content

[SYCL] Return support for compilation with C++14 back #3802

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions sycl/include/CL/sycl/detail/defines_elementary.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@

#ifndef __SYCL_DEPRECATED
#ifndef SYCL_DISABLE_DEPRECATION_WARNINGS
#ifdef _WIN32
#define __SYCL_DEPRECATED(message) __declspec(deprecated(message))
#else
#define __SYCL_DEPRECATED(message) __attribute__((deprecated(message)))
#endif
#define __SYCL_DEPRECATED(message) [[deprecated(message)]]
#else // SYCL_DISABLE_DEPRECATION_WARNINGS
#define __SYCL_DEPRECATED(message)
#endif // SYCL_DISABLE_DEPRECATION_WARNINGS
Expand Down
4 changes: 2 additions & 2 deletions sycl/include/CL/sycl/kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ class __SYCL_EXPORT kernel {
/// \return depends on information being queried.
template <info::kernel_sub_group param>
// clang-format off
typename info::param_traits<info::kernel_sub_group, param>::return_type
__SYCL_DEPRECATED("Use get_info with info::kernel_device_specific instead.")
typename info::param_traits<info::kernel_sub_group, param>::return_type
get_sub_group_info(const device &Device) const;
// clang-format on

Expand All @@ -166,8 +166,8 @@ class __SYCL_EXPORT kernel {
/// \return depends on information being queried.
template <info::kernel_sub_group param>
// clang-format off
typename info::param_traits<info::kernel_sub_group, param>::return_type
__SYCL_DEPRECATED("Use get_info with info::kernel_device_specific instead.")
typename info::param_traits<info::kernel_sub_group, param>::return_type
get_sub_group_info(const device &Device,
typename info::param_traits<info::kernel_sub_group,
param>::input_type Value) const;
Expand Down
2 changes: 2 additions & 0 deletions sycl/include/CL/sycl/kernel_handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class kernel_handler {
}

#ifdef __SYCL_DEVICE_ONLY__
#if __cplusplus >= 201703L
template <
auto &S,
typename T = typename std::remove_reference_t<decltype(S)>::value_type,
Expand All @@ -63,6 +64,7 @@ class kernel_handler {
return __sycl_getComposite2020SpecConstantValue<T>(
SymbolicID, &S, MSpecializationConstantsBuffer);
}
#endif // __cplusplus >= 201703L
#endif // __SYCL_DEVICE_ONLY__

char *MSpecializationConstantsBuffer = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions sycl/include/CL/sycl/properties/accessor_properties.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class __SYCL2020_DEPRECATED("spelling is now: no_init") noinit

__SYCL_INLINE_CONSTEXPR property::no_init no_init;

__SYCL_INLINE_CONSTEXPR property::noinit
__SYCL2020_DEPRECATED("spelling is now: no_init") noinit;
__SYCL2020_DEPRECATED("spelling is now: no_init")
__SYCL_INLINE_CONSTEXPR property::noinit noinit;

#else

Expand Down
4 changes: 4 additions & 0 deletions sycl/include/CL/sycl/sycl_span.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//
//===---------------------------------------------------------------------===//

#if __cplusplus >= 201703L

#ifndef _SYCL_SPAN
#define _SYCL_SPAN

Expand Down Expand Up @@ -623,3 +625,5 @@ span(const _Container &)->span<const typename _Container::value_type>;
} // __SYCL_INLINE_NAMESPACE(cl)

#endif // _SYCL_SPAN

#endif // __cplusplus >= 201703L
1 change: 1 addition & 0 deletions sycl/test/basic_tests/stdcpp_compat.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// RUN: %clangxx -fsycl -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s -c -o %t.out
// RUN: %clangxx -fsycl -std=c++14 -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s -c -o %t.out
// RUN: %clangxx -fsycl -std=c++17 -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s -c -o %t.out
// RUN: %clangxx -fsycl -std=c++20 -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note,warning %s -c -o %t.out
// expected-no-diagnostics
Expand Down
2 changes: 2 additions & 0 deletions sycl/unittests/get_native_interop/test_get_native.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
//
//===----------------------------------------------------------------------===//

#define SYCL2020_DISABLE_DEPRECATION_WARNINGS

#include <CL/sycl.hpp>
#include <CL/sycl/backend/opencl.hpp>
#include <detail/context_impl.hpp>
Expand Down