Add/SubSaturate for FP
Halimi, Jean-Philippe
jean-philippe.halimi at intel.com
Wed Feb 21 20:07:50 UTC 2018
Adding Panama-dev to the conversation.
Jp
From: Paul Sandoz [mailto:paul.sandoz at oracle.com]
Sent: Wednesday, February 21, 2018 11:53 AM
To: Halimi, Jean-Philippe <jean-philippe.halimi at intel.com>
Cc: Vladimir Ivanov <vladimir.x.ivanov at oracle.com>; Lupusoru, Razvan A <razvan.a.lupusoru at intel.com>; Rukmannagari, Shravya <shravya.rukmannagari at intel.com>; Deshpande, Vivek R <vivek.r.deshpande at intel.com>; Viswanathan, Sandhya <sandhya.viswanathan at intel.com>; Kandu, Rahul <rahul.kandu at intel.com>
Subject: Re: Add/SubSaturate for FP
Hi Jp,
I think you are correct, they don’t make sense for FP types.
Also, i think the clamped value is incorrect for various types. What should the clamped value be for saturated add of two byte values? Byte.MAX_VALUE?
Shall we continue the conversation on the panama list?
—
Separately if we support saturation we should add scalar methods to the boxed classes.
Paul.
On Feb 21, 2018, at 10:59 AM, Halimi, Jean-Philippe <jean-philippe.halimi at intel.com<mailto:jean-philippe.halimi at intel.com>> wrote:
Dear both,
While I was adding test coverage for the VectorAPI testing framework, I realized that addSaturate for Float was saturating on Integer, while subSaturate was saturating on Float.
I am unsure whether Add and Sub saturate operations make sense for floating point vectors. I have made a patch which removes the two methods for FP vectors.
What are your thoughts?
Thanks,
Jp
<add_saturate.patch>
More information about the panama-dev
mailing list