Summary
Add method VectorMask::xor(VectorMask)
to the abstract class jdk.incubator.vector.VectorMask
.
Problem
Currently, VectorMask
has methods to perform logical binary and, or, andNot and xorNot (eq) but not xor (exclusive or). This is a basic logical operation that often appears naturally in logical contexts. Furthermore, we do have this method implemented in the concrete implementation of VectorMask
to implement VectorMask::not
and VectorMask::eq
.
Solution
Expose VectorMask::xor
in the public API of the Vector API.
Specification
/**
* Determines logical symmetric difference
* (as {@code a^b}) of this mask and a second input mask.
* <p>
* This is a lane-wise binary operation which applies
* the logical {@code XOR} operation
* ({@code ^}) to each corresponding pair of mask bits.
*
* @param m the input mask
* @return the result of logically disjunctively disjoining the two
* input masks
*/
public abstract VectorMask<E> xor(VectorMask<E> m);
- csr of
-
JDK-8305461 [vectorapi] Add VectorMask::xor
-
- Resolved
-