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
106
106
}
107
107
};
108
108
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
+
109
121
size_t get_max_local_size (const sycl::device &device);
110
122
size_t get_max_local_size (const sycl::device &device,
111
123
int cpu_local_size_limit,
Original file line number Diff line number Diff line change 36
36
37
37
#include " kernels/elementwise_functions/interpolate.hpp"
38
38
39
+ #include " ext/common.hpp"
39
40
#include " ext/validation_utils.hpp"
40
41
41
42
namespace py = pybind11;
42
43
namespace td_ns = dpctl::tensor::type_dispatch;
43
44
45
+ using ext::common::value_type_of;
44
46
using ext::validation::array_names;
45
47
using ext::validation::array_ptr;
46
48
using ext::validation::common_checks;
@@ -51,18 +53,6 @@ namespace dpnp::extensions::ufunc
51
53
namespace impl
52
54
{
53
55
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
-
66
56
template <typename T>
67
57
using value_type_of_t = typename value_type_of<T>::type;
68
58
Original file line number Diff line number Diff line change 52
52
#include " utils/type_dispatch.hpp"
53
53
#include " utils/type_utils.hpp"
54
54
55
+ #include " ext/common.hpp"
56
+
55
57
namespace py = pybind11;
56
58
namespace td_ns = dpctl::tensor::type_dispatch;
57
59
60
+ using ext::common::value_type_of;
61
+
58
62
// declare pybind11 wrappers in py_internal namespace
59
63
namespace dpnp ::extensions::ufunc
60
64
{
61
65
62
66
namespace impl
63
67
{
64
68
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
-
77
69
template <typename T>
78
70
using value_type_of_t = typename value_type_of<T>::type;
79
71
You can’t perform that action at this time.
0 commit comments