Skip to content

Commit a1cb02f

Browse files
Merge 07c3a4a into 032cf20
2 parents 032cf20 + 07c3a4a commit a1cb02f

File tree

10 files changed

+1362
-33
lines changed

10 files changed

+1362
-33
lines changed

dpnp/backend/extensions/common/ext/common.hpp

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,6 @@ struct AtomicOp
7070
}
7171
};
7272

73-
template <typename T>
74-
struct Less
75-
{
76-
bool operator()(const T &lhs, const T &rhs) const
77-
{
78-
if constexpr (type_utils::is_complex_v<T>) {
79-
return dpctl::tensor::math_utils::less_complex(lhs, rhs);
80-
}
81-
else {
82-
return std::less{}(lhs, rhs);
83-
}
84-
}
85-
};
86-
8773
template <typename T>
8874
struct IsNan
8975
{
@@ -106,6 +92,21 @@ struct IsNan
10692
}
10793
};
10894

95+
template <typename T>
96+
struct Less
97+
{
98+
bool operator()(const T &lhs, const T &rhs) const
99+
{
100+
if constexpr (type_utils::is_complex_v<T>) {
101+
return IsNan<T>::isnan(rhs) ||
102+
dpctl::tensor::math_utils::less_complex(lhs, rhs);
103+
}
104+
else {
105+
return IsNan<T>::isnan(rhs) || std::less{}(lhs, rhs);
106+
}
107+
}
108+
};
109+
109110
template <typename T, bool hasValueType>
110111
struct value_type_of_impl;
111112

dpnp/backend/extensions/statistics/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ set(_module_src
3030
${CMAKE_CURRENT_SOURCE_DIR}/histogram.cpp
3131
${CMAKE_CURRENT_SOURCE_DIR}/histogramdd.cpp
3232
${CMAKE_CURRENT_SOURCE_DIR}/histogram_common.cpp
33+
${CMAKE_CURRENT_SOURCE_DIR}/kth_element1d.cpp
3334
${CMAKE_CURRENT_SOURCE_DIR}/sliding_dot_product1d.cpp
3435
${CMAKE_CURRENT_SOURCE_DIR}/sliding_window1d.cpp
3536
${CMAKE_CURRENT_SOURCE_DIR}/statistics_py.cpp

0 commit comments

Comments
 (0)