jpountz commented on code in PR #14896: URL: https://github.com/apache/lucene/pull/14896#discussion_r2209669064
########## lucene/core/src/java24/org/apache/lucene/internal/vectorization/PanamaVectorUtilSupport.java: ########## @@ -54,6 +55,11 @@ final class PanamaVectorUtilSupport implements VectorUtilSupport { // preferred vector sizes, which can be altered for testing private static final VectorSpecies<Float> FLOAT_SPECIES; + private static final VectorSpecies<Double> DOUBLE_SPECIES = + PanamaVectorConstants.PREFERRED_DOUBLE_SPECIES; + // This create a vector species which we make sure have exact half bits of DOUBLE_SPECIES + private static final VectorSpecies<Integer> INT_FOR_DOUBLE_SPECIES = Review Comment: This is because we compute the mask on a `double[]` and then use it to compress an `int[]`. But casting a `VectorMask<Double>` to a `VectorMask<Integer>` only works if both species have the same length. So we need to use a `VectorSpecies<Integer>` of the same length as the preferred `VectorSpecies<Double>`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org