Skip to content

Commit

Permalink
Resolve logically dead code from Coverity report (#1541)
Browse files Browse the repository at this point in the history
* Resolved logically dead code from coverity report

* Fixed tests

* Skip fmod tests with rhs=0.3

* Appled review comments
  • Loading branch information
antonwolfy authored Aug 28, 2023
1 parent ff71682 commit 5a2913f
Show file tree
Hide file tree
Showing 6 changed files with 424 additions and 222 deletions.
2 changes: 1 addition & 1 deletion dpnp/dpnp_algo/dpnp_algo.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ cpdef dpnp_queue_initialize():
# TODO:
# choose seed number as is in numpy
seed_from_time = time(NULL)
dpnp_rng_srand_c(seed_from_time)
dpnp_rng_srand_c(< size_t > seed_from_time)


"""
Expand Down
12 changes: 6 additions & 6 deletions dpnp/dpnp_iface_bitwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def bitwise_and(
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
Parameters `where`, `dtype` and `subok` are supported with their default values.
Keyword arguments `kwargs` are currently unsupported.
Keyword argument `kwargs` is currently unsupported.
Otherwise the function will be executed sequentially on CPU.
Data type of input arrays `x1` and `x2` has to be an integer or boolean data type.
Expand Down Expand Up @@ -160,7 +160,7 @@ def bitwise_or(
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
Parameters `where`, `dtype` and `subok` are supported with their default values.
Keyword arguments `kwargs` are currently unsupported.
Keyword argument `kwargs` is currently unsupported.
Otherwise the function will be executed sequentially on CPU.
Data type of input arrays `x1` and `x2` has to be an integer or boolean data type.
Expand Down Expand Up @@ -225,7 +225,7 @@ def bitwise_xor(
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
Parameters `where`, `dtype` and `subok` are supported with their default values.
Keyword arguments `kwargs` are currently unsupported.
Keyword argument `kwargs` is currently unsupported.
Otherwise the function will be executed sequentially on CPU.
Data type of input arrays `x1` and `x2` has to be an integer or boolean data type.
Expand Down Expand Up @@ -286,7 +286,7 @@ def invert(
Parameter `x` is supported as either :class:`dpnp.ndarray`
or :class:`dpctl.tensor.usm_ndarray`.
Parameters `where`, `dtype` and `subok` are supported with their default values.
Keyword arguments `kwargs` are currently unsupported.
Keyword argument `kwargs` is currently unsupported.
Otherwise the function will be executed sequentially on CPU.
Data type of input array `x` has to be an integer data type.
Expand Down Expand Up @@ -358,7 +358,7 @@ def left_shift(
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
Parameters `where`, `dtype` and `subok` are supported with their default values.
Keyword arguments `kwargs` are currently unsupported.
Keyword argument `kwargs` is currently unsupported.
Otherwise the function will be executed sequentially on CPU.
Input data is supported as integer only.
Expand Down Expand Up @@ -421,7 +421,7 @@ def right_shift(
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
Parameters `where`, `dtype` and `subok` are supported with their default values.
Keyword arguments `kwargs` are currently unsupported.
Keyword argument `kwargs` is currently unsupported.
Otherwise the function will be executed sequentially on CPU.
Input data is supported as integer only.
Expand Down
Loading

0 comments on commit 5a2913f

Please sign in to comment.