rmuir commented on code in PR #16203:
URL: https://github.com/apache/lucene/pull/16203#discussion_r3387123231
##########
lucene/core/src/java25/org/apache/lucene/internal/vectorization/MemorySegmentBulkVectorOps.java:
##########
@@ -147,13 +204,313 @@ private void dotProductBulkImpl(
}
}
+ // -- uint8 dot product
+
+ static final class Uint8DotProduct {
+
+ private Uint8DotProduct() {}
+
+ void dotProductBulk(
+ MemorySegment seg,
+ int[] scores,
+ byte[] q,
+ long d1,
+ long d2,
+ long d3,
+ long d4,
+ int elementCount) {
+ dotProductBulkImpl(seg, scores, q, null, d1, d2, d3, d4, elementCount);
+ }
+
+ void dotProductBulk(
+ MemorySegment seg,
+ int[] scores,
+ MemorySegment qSeg,
+ long d1,
+ long d2,
+ long d3,
+ long d4,
+ int elementCount) {
+ dotProductBulkImpl(seg, scores, null, qSeg, d1, d2, d3, d4,
elementCount);
+ }
+
+ private void dotProductBulkImpl(
+ MemorySegment seg,
+ int[] scores,
+ byte[] qArray,
+ MemorySegment qSeg,
+ long d1,
+ long d2,
+ long d3,
+ long d4,
+ int elementCount) {
+ int i = 0;
+ IntVector acc1 = IntVector.zero(INT_SPECIES);
+ IntVector acc2 = IntVector.zero(INT_SPECIES);
+ IntVector acc3 = IntVector.zero(INT_SPECIES);
+ IntVector acc4 = IntVector.zero(INT_SPECIES);
Review Comment:
why are we doing 4 at a time?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]