Mercurial > vec
diff README @ 40:55cadb1fac4b
*: add mod operation, add GCC vector backend
need to test it with old gcc though. :)
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 27 Apr 2025 02:49:53 -0400 |
parents | f9ca85d2f14c |
children |
line wrap: on
line diff
--- a/README Sat Apr 26 15:31:39 2025 -0400 +++ b/README Sun Apr 27 02:49:53 2025 -0400 @@ -63,6 +63,10 @@ considered defined behavior and should result in a zero; if this doesn't happen it's considered a bug + v[u]intAxB mod(v[u]intAxB vec1, v[u]intAxB vec2) + gives the remainder of a division operation. as with div, + divide-by-zero is defined behavior. + v[u]intAxB and(v[u]intAxB vec1, v[u]intAxB vec2) bitwise AND (&) of the values in both vectors @@ -87,7 +91,9 @@ v[u]intAxB avg(v[u]intAxB vec1, v[u]intAxB vec2) returns the average of the values in both vectors i.e., div(add(vec1, vec2), splat(2)), without - the possibility of overflow. + the possibility of overflow. If you are familiar + with AltiVec, this operation exactly mimics + vec_avg. v[u]intAxB min(v[u]intAxB vec1, v[u]intAxB vec2) returns the minimum of the values in both vectors