File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
dpctl/tensor/libtensor/include/kernels/elementwise_functions Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ using dpctl::tensor::ssize_t;
5454namespace td_ns = dpctl::tensor::type_dispatch;
5555
5656using dpctl::tensor::type_utils::is_complex;
57+ using dpctl::tensor::type_utils::is_complex_v;
5758
5859template <typename argT, typename resT> struct ImagFunctor
5960{
@@ -70,7 +71,7 @@ template <typename argT, typename resT> struct ImagFunctor
7071
7172 resT operator ()(const argT &in) const
7273 {
73- if constexpr (is_complex <argT>::value ) {
74+ if constexpr (is_complex_v <argT>) {
7475 using realT = typename argT::value_type;
7576 using sycl_complexT = typename exprm_ns::complex <realT>;
7677 return exprm_ns::imag (sycl_complexT (in));
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ using dpctl::tensor::ssize_t;
5454namespace td_ns = dpctl::tensor::type_dispatch;
5555
5656using dpctl::tensor::type_utils::is_complex;
57+ using dpctl::tensor::type_utils::is_complex_v;
5758
5859template <typename argT, typename resT> struct RealFunctor
5960{
@@ -70,7 +71,7 @@ template <typename argT, typename resT> struct RealFunctor
7071
7172 resT operator ()(const argT &in) const
7273 {
73- if constexpr (is_complex <argT>::value ) {
74+ if constexpr (is_complex_v <argT>) {
7475 using realT = typename argT::value_type;
7576 using sycl_complexT = typename exprm_ns::complex <realT>;
7677 return exprm_ns::real (sycl_complexT (in));
You can’t perform that action at this time.
0 commit comments