File tree Expand file tree Collapse file tree 3 files changed +18
-24
lines changed
ufunc/elementwise_functions Expand file tree Collapse file tree 3 files changed +18
-24
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,18 @@ struct IsNan
106106 }
107107};
108108
109+ template <typename T>
110+ struct value_type_of
111+ {
112+ using type = T;
113+ };
114+
115+ template <typename T>
116+ struct value_type_of <std::complex <T>>
117+ {
118+ using type = T;
119+ };
120+
109121size_t get_max_local_size (const sycl::device &device);
110122size_t get_max_local_size (const sycl::device &device,
111123 int cpu_local_size_limit,
Original file line number Diff line number Diff line change 3636
3737#include " kernels/elementwise_functions/interpolate.hpp"
3838
39+ #include " ext/common.hpp"
3940#include " ext/validation_utils.hpp"
4041
4142namespace py = pybind11;
4243namespace td_ns = dpctl::tensor::type_dispatch;
4344
45+ using ext::common::value_type_of;
4446using ext::validation::array_names;
4547using ext::validation::array_ptr;
4648using ext::validation::common_checks;
@@ -51,18 +53,6 @@ namespace dpnp::extensions::ufunc
5153namespace impl
5254{
5355
54- template <typename T>
55- struct value_type_of
56- {
57- using type = T;
58- };
59-
60- template <typename T>
61- struct value_type_of <std::complex <T>>
62- {
63- using type = T;
64- };
65-
6656template <typename T>
6757using value_type_of_t = typename value_type_of<T>::type;
6858
Original file line number Diff line number Diff line change 5252#include " utils/type_dispatch.hpp"
5353#include " utils/type_utils.hpp"
5454
55+ #include " ext/common.hpp"
56+
5557namespace py = pybind11;
5658namespace td_ns = dpctl::tensor::type_dispatch;
5759
60+ using ext::common::value_type_of;
61+
5862// declare pybind11 wrappers in py_internal namespace
5963namespace dpnp ::extensions::ufunc
6064{
6165
6266namespace impl
6367{
6468
65- template <typename T>
66- struct value_type_of
67- {
68- using type = T;
69- };
70-
71- template <typename T>
72- struct value_type_of <std::complex <T>>
73- {
74- using type = T;
75- };
76-
7769template <typename T>
7870using value_type_of_t = typename value_type_of<T>::type;
7971
You can’t perform that action at this time.
0 commit comments