Skip to content

Commit 0e67a5c

Browse files
committed
Add changelog entry
1 parent 6250841 commit 0e67a5c

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
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
* Fix warning in documentation generation caused by `diff` docstring [gh-1855](https://github.com/IntelPython/dpctl/pull/1855)
3434
* Fix additional warnings when generating docs [gh-1861](https://github.com/IntelPython/dpctl/pull/1861)
3535
* Add missing include of SYCL header to "math_utils.hpp" [gh-1899](https://github.com/IntelPython/dpctl/pull/1899)
36+
* Add support of cv-qualifiers and sycl::half type in `is_complex<T>` helper [gh-1900](https://github.com/IntelPython/dpctl/pull/1900)
3637

3738
## [0.18.1] - Oct. 11, 2024
3839

dpctl/tensor/libtensor/include/utils/type_utils.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ struct is_complex : public std::false_type
4141
};
4242

4343
template <typename T>
44-
struct is_complex<T, std::enable_if_t<std::is_same_v<std::remove_cv_t<T>, std::complex<sycl::half>> ||
45-
std::is_same_v<std::remove_cv_t<T>, std::complex<float>> ||
46-
std::is_same_v<std::remove_cv_t<T>, std::complex<double>>>>
44+
struct is_complex<
45+
T,
46+
std::enable_if_t<
47+
std::is_same_v<std::remove_cv_t<T>, std::complex<sycl::half>> ||
48+
std::is_same_v<std::remove_cv_t<T>, std::complex<float>> ||
49+
std::is_same_v<std::remove_cv_t<T>, std::complex<double>>>>
4750
: public std::true_type
4851
{
4952
};
5053

51-
template <typename T>
52-
constexpr bool is_complex_v = is_complex<T>::value;
54+
template <typename T> constexpr bool is_complex_v = is_complex<T>::value;
5355

5456
template <typename dstTy, typename srcTy> dstTy convert_impl(const srcTy &v)
5557
{

0 commit comments

Comments
 (0)