On Wed, 6 May 2026 10:22:49 GMT, Jatin Bhateja <[email protected]> wrote:
>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16Vector.java >> line 803: >> >>> 801: v0.uOp(m, (i, a) -> (float) Math.log10(a)); >>> 802: case VECTOR_OP_SQRT: return (v0, m) -> >>> 803: v0.sOp(m, (i, a) -> (short) >>> float16ToRawShortBits(Float16.sqrt(shortBitsToFloat16(a)))); >> >> Can we reuse `uOp` and convert the result of `Float16.sqrt` to `float` >> instead? > > We can but as mentioned above sOp is also used for rearrangeTemplate, should > be also make a change there ? Ah yes, I missed that one (masked vs. non-masked overloads). My recommendation would be to reuse the non-raw, `uOp`, version in for the sqrt unary operation. Then rename as you suggest for use in the `rearrangeTemplate`. That IMO keeps it more uniform. Fallback performance is anyway going to be slow, code clarity/uniformity, is I think more important here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28002#discussion_r3196454509
