Skip to content

Commit

Permalink
Change return type for "abs_diff"
Browse files Browse the repository at this point in the history
Change `abs_diff` so that its return type is the same as the type of
its parameters.  This makes the signature consistent with `abs`.

Closes internal issue 655.
  • Loading branch information
gmlueck committed Jul 21, 2023
1 parent 4437aa9 commit bcf0202
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions adoc/chapters/programming_interface.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24189,14 +24189,12 @@ _Constraints:_ Available only if all of the following conditions are met:

_Returns:_ When the inputs are scalars, returns |x - y|. Otherwise, returns
|x[i] - y[i]| for each element of [code]#x# and [code]#y#. The subtraction is
done without modulo overflow.

When [code]#GenInt1# is scalar, the return type is the unsigned equivalent of
[code]#GenInt1# (when [code]#GenInt1# is signed). When [code]#GenInt1# is
[code]#marray# or [code]#vec#, the return type is [code]#marray# or [code]#vec#
with the equivalent unsigned element type. When [code]#GenInt1# is the
[code]#+__swizzled_vec__+# type, the return type is the corresponding
[code]#vec# with the equivalent unsigned element type.
done without modulo overflow. The behavior is undefined if the result cannot
be represented by the return type.

The return type is [code]#GenInt1# unless [code]#GenInt1# is the
[code]#+__swizzled_vec__+# type, in which case the return type is the
corresponding [code]#vec#.

a@
[frame=all,grid=none]
Expand Down

0 comments on commit bcf0202

Please sign in to comment.