[vector] Questions on addSaturate and subSaturate
Lupusoru, Razvan A
razvan.a.lupusoru at intel.com
Wed Mar 28 19:47:33 UTC 2018
Hi everyone,
I am looking into implementation of addSaturate and subSaturate and I am trying to understand intended semantics.
>From my expectation just from the method name on integral types, it seems that in case of overflow, it will max out at largest value. And in case of underflow, it will not wrap around past min value.
However, I have a couple of questions based on current implementation.
* Should these methods be defined for FP types? If yes, what would be intended semantics for FP?
* Should these methods take care of both overflow and underflow? Currently it seems that they only take care of overflow in implementation.
* For subword types, is the saturation the appropriate max/min values for that type? (Currently Integer.MAX_VALUE is used)
Any advice on intended semantics and whether these are valid uses cases for API would be valuable.
Thanks,
Razvan
More information about the panama-dev
mailing list