Skip to content

[SYCL] Deprecate Intel extension ctz function #5333

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 21 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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: 4 additions & 2 deletions sycl/include/CL/sycl/builtins.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,10 @@ detail::enable_if_t<detail::is_geninteger<T>::value, T> ctz(T x) __NOEXC {
namespace ext {
namespace intel {
template <typename T>
sycl::detail::enable_if_t<sycl::detail::is_geninteger<T>::value, T>
ctz(T x) __NOEXC {
__SYCL_DEPRECATED(
"'sycl::ext::intel::ctz' is deprecated, use 'sycl::ctz' instead")
sycl::detail::enable_if_t<sycl::detail::is_geninteger<T>::value, T> ctz(
T x) __NOEXC {
return sycl::ctz(x);
}
} // namespace intel
Expand Down
13 changes: 13 additions & 0 deletions sycl/test/regression/ctz_namespace.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s

#include <sycl/sycl.hpp>

int main() {

long long int a = -9223372034707292160ll;
long long int b = sycl::ctz(a);
// expected-warning@+1 {{'ctz<long long>' is deprecated: 'sycl::ext::intel::ctz' is deprecated, use 'sycl::ctz' instead}}
long long int c = sycl::ext::intel::ctz(a);

return 0;
}