Skip to content

Commit

Permalink
Add quick reference for MaskedAbsOr(Zero)
Browse files Browse the repository at this point in the history
  • Loading branch information
mazimkhan committed Nov 20, 2024
1 parent 458c7e1 commit cc5c4e8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions g3doc/quick_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,18 @@ not a concern, these are equivalent to, and potentially more efficient than,
<code>V **MaskedSatSubOr**(V no, M m, V a, V b)</code>: returns `a[i] +
b[i]` saturated to the minimum/maximum representable value, or `no[i]` if
`m[i]` is false.
* `V`: `{i,f}` \
<code>V **MaskedAbsOr**(M m, V a, V b)</code>: returns the absolute value of
`a[i]` where m is active and returns `b[i]` otherwise.

#### Zero masked arithmetic

Ops in this section return `0` for `mask=false` lanes. These are equivalent
to, and potentially more efficient than, `IfThenElseZero(m, Abs(a, b));` etc.

* `V`: `{i,f}` \
<code>V **MaskedAbsOrZero**(M m, V a)</code>: returns the absolute value of
`a[i]` where m is active and returns zero otherwise.

#### Shifts

Expand Down

0 comments on commit cc5c4e8

Please sign in to comment.