Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reuse dpctl.tensor comparison functions. #1458

Merged
merged 4 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions dpnp/dpnp_algo/dpnp_algo.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ cdef extern from "dpnp_iface_fptr.hpp" namespace "DPNPFuncName": # need this na
DPNP_FN_EIG_EXT
DPNP_FN_EIGVALS
DPNP_FN_EIGVALS_EXT
DPNP_FN_EQUAL_EXT
DPNP_FN_ERF
DPNP_FN_ERF_EXT
DPNP_FN_EYE
Expand Down Expand Up @@ -149,8 +148,6 @@ cdef extern from "dpnp_iface_fptr.hpp" namespace "DPNPFuncName": # need this na
DPNP_FN_FMOD_EXT
DPNP_FN_FULL
DPNP_FN_FULL_LIKE
DPNP_FN_GREATER_EXT
DPNP_FN_GREATER_EQUAL_EXT
DPNP_FN_HYPOT
DPNP_FN_HYPOT_EXT
DPNP_FN_IDENTITY
Expand All @@ -165,8 +162,6 @@ cdef extern from "dpnp_iface_fptr.hpp" namespace "DPNPFuncName": # need this na
DPNP_FN_KRON_EXT
DPNP_FN_LEFT_SHIFT
DPNP_FN_LEFT_SHIFT_EXT
DPNP_FN_LESS_EXT
DPNP_FN_LESS_EQUAL_EXT
DPNP_FN_LOG
DPNP_FN_LOG_EXT
DPNP_FN_LOG10
Expand Down Expand Up @@ -200,7 +195,6 @@ cdef extern from "dpnp_iface_fptr.hpp" namespace "DPNPFuncName": # need this na
DPNP_FN_NEGATIVE
DPNP_FN_NEGATIVE_EXT
DPNP_FN_NONZERO
DPNP_FN_NOT_EQUAL_EXT
DPNP_FN_ONES
DPNP_FN_ONES_LIKE
DPNP_FN_PARTITION
Expand Down Expand Up @@ -481,18 +475,12 @@ cpdef dpnp_descriptor dpnp_right_shift(dpnp_descriptor x1_obj,
"""
Logic functions
"""
cpdef dpnp_descriptor dpnp_equal(dpnp_descriptor array1, dpnp_descriptor input2)
cpdef dpnp_descriptor dpnp_greater(dpnp_descriptor input1, dpnp_descriptor input2)
cpdef dpnp_descriptor dpnp_greater_equal(dpnp_descriptor input1, dpnp_descriptor input2)
cpdef dpnp_descriptor dpnp_isclose(dpnp_descriptor input1, dpnp_descriptor input2,
double rtol=*, double atol=*, cpp_bool equal_nan=*)
cpdef dpnp_descriptor dpnp_less(dpnp_descriptor input1, dpnp_descriptor input2)
cpdef dpnp_descriptor dpnp_less_equal(dpnp_descriptor input1, dpnp_descriptor input2)
cpdef dpnp_descriptor dpnp_logical_and(dpnp_descriptor input1, dpnp_descriptor input2)
cpdef dpnp_descriptor dpnp_logical_not(dpnp_descriptor input1)
cpdef dpnp_descriptor dpnp_logical_or(dpnp_descriptor input1, dpnp_descriptor input2)
cpdef dpnp_descriptor dpnp_logical_xor(dpnp_descriptor input1, dpnp_descriptor input2)
cpdef dpnp_descriptor dpnp_not_equal(dpnp_descriptor input1, dpnp_descriptor input2)


"""
Expand Down
54 changes: 0 additions & 54 deletions dpnp/dpnp_algo/dpnp_algo_logic.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,14 @@ __all__ += [
"dpnp_all",
"dpnp_allclose",
"dpnp_any",
"dpnp_equal",
"dpnp_greater",
"dpnp_greater_equal",
"dpnp_isclose",
"dpnp_isfinite",
"dpnp_isinf",
"dpnp_isnan",
"dpnp_less",
"dpnp_less_equal",
"dpnp_logical_and",
"dpnp_logical_not",
"dpnp_logical_or",
"dpnp_logical_xor",
"dpnp_not_equal"
]


Expand Down Expand Up @@ -167,30 +161,6 @@ cpdef utils.dpnp_descriptor dpnp_any(utils.dpnp_descriptor array1):
return result


cpdef utils.dpnp_descriptor dpnp_equal(utils.dpnp_descriptor x1_obj,
utils.dpnp_descriptor x2_obj,
object dtype=None,
utils.dpnp_descriptor out=None,
object where=True):
return call_fptr_2in_1out_strides(DPNP_FN_EQUAL_EXT, x1_obj, x2_obj, dtype, out, where, func_name="equal")


cpdef utils.dpnp_descriptor dpnp_greater(utils.dpnp_descriptor x1_obj,
utils.dpnp_descriptor x2_obj,
object dtype=None,
utils.dpnp_descriptor out=None,
object where=True):
return call_fptr_2in_1out_strides(DPNP_FN_GREATER_EXT, x1_obj, x2_obj, dtype, out, where, func_name="greater")


cpdef utils.dpnp_descriptor dpnp_greater_equal(utils.dpnp_descriptor x1_obj,
utils.dpnp_descriptor x2_obj,
object dtype=None,
utils.dpnp_descriptor out=None,
object where=True):
return call_fptr_2in_1out_strides(DPNP_FN_GREATER_EQUAL_EXT, x1_obj, x2_obj, dtype, out, where, func_name="greater_equal")


cpdef utils.dpnp_descriptor dpnp_isclose(utils.dpnp_descriptor input1,
utils.dpnp_descriptor input2,
double rtol=1e-05,
Expand Down Expand Up @@ -255,22 +225,6 @@ cpdef utils.dpnp_descriptor dpnp_isnan(utils.dpnp_descriptor input1):
return result


cpdef utils.dpnp_descriptor dpnp_less(utils.dpnp_descriptor x1_obj,
utils.dpnp_descriptor x2_obj,
object dtype=None,
utils.dpnp_descriptor out=None,
object where=True):
return call_fptr_2in_1out_strides(DPNP_FN_LESS_EXT, x1_obj, x2_obj, dtype, out, where, func_name="less")


cpdef utils.dpnp_descriptor dpnp_less_equal(utils.dpnp_descriptor x1_obj,
utils.dpnp_descriptor x2_obj,
object dtype=None,
utils.dpnp_descriptor out=None,
object where=True):
return call_fptr_2in_1out_strides(DPNP_FN_LESS_EQUAL_EXT, x1_obj, x2_obj, dtype, out, where, func_name="less_equal")


cpdef utils.dpnp_descriptor dpnp_logical_and(utils.dpnp_descriptor x1_obj,
utils.dpnp_descriptor x2_obj,
object dtype=None,
Expand Down Expand Up @@ -300,11 +254,3 @@ cpdef utils.dpnp_descriptor dpnp_logical_xor(utils.dpnp_descriptor x1_obj,
utils.dpnp_descriptor out=None,
object where=True):
return call_fptr_2in_1out_strides(DPNP_FN_LOGICAL_XOR_EXT, x1_obj, x2_obj, dtype, out, where, func_name="logical_xor")


cpdef utils.dpnp_descriptor dpnp_not_equal(utils.dpnp_descriptor x1_obj,
utils.dpnp_descriptor x2_obj,
object dtype=None,
utils.dpnp_descriptor out=None,
object where=True):
return call_fptr_2in_1out_strides(DPNP_FN_NOT_EQUAL_EXT, x1_obj, x2_obj, dtype, out, where, func_name="not_equal")
Loading