Skip to content

Commit 30918e4

Browse files
authored
Use dpctl tensor include to use experimental SYCL namespace for complex types (#2546)
The PR proposes to reuse dpctl, since it exposes `sycl_complex.hpp` header which enables experimental SYCL namespace for complex types.
1 parent 4240292 commit 30918e4

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3333
* Updated `dpnp.size` to accept tuple of ints for `axes` argument [#2536](https://github.com/IntelPython/dpnp/pull/2536)
3434
* Replaced `ci` section in `.pre-commit-config.yaml` with a new GitHub workflow with scheduled run to autoupdate the `pre-commit` configuration [#2542](https://github.com/IntelPython/dpnp/pull/2542)
3535
* FFT module is updated to perform in-place FFT in intermediate steps of ND FFT [#2543](https://github.com/IntelPython/dpnp/pull/2543)
36+
* Reused dpctl tensor include to enable experimental SYCL namespace for complex types [#2546](https://github.com/IntelPython/dpnp/pull/2546)
3637

3738
### Deprecated
3839

dpnp/backend/kernels/elementwise_functions/sinc.hpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@
2525

2626
#pragma once
2727

28-
#define SYCL_EXT_ONEAPI_COMPLEX
29-
#if __has_include(<sycl/ext/oneapi/experimental/sycl_complex.hpp>)
30-
#include <sycl/ext/oneapi/experimental/sycl_complex.hpp>
31-
#else
32-
#include <sycl/ext/oneapi/experimental/complex/complex.hpp>
33-
#endif
28+
#include <cmath>
29+
#include <complex>
30+
#include <limits>
31+
#include <type_traits>
3432

3533
#include <sycl/sycl.hpp>
3634

3735
// dpctl tensor headers
36+
#include "kernels/elementwise_functions/sycl_complex.hpp"
3837
#include "utils/type_utils.hpp"
3938

4039
namespace dpnp::kernels::sinc
@@ -43,8 +42,6 @@ namespace tu_ns = dpctl::tensor::type_utils;
4342

4443
namespace impl
4544
{
46-
namespace exprm_ns = sycl::ext::oneapi::experimental;
47-
4845
template <typename Tp>
4946
inline Tp sin(const Tp &in)
5047
{

0 commit comments

Comments
 (0)