uschindler commented on code in PR #14896:
URL: https://github.com/apache/lucene/pull/14896#discussion_r2205384593


##########
lucene/core/src/java/org/apache/lucene/util/Constants.java:
##########
@@ -94,12 +94,23 @@ private static boolean is64Bit() {
   private static final boolean HAS_SSE4A =
       HotspotVMOptions.get("UseXmmI2F").map(Boolean::valueOf).orElse(false);
 
+  /** true for cpu with AVX support at least AVX2. */
+  private static final boolean HAS_AVX2 =
+      HotspotVMOptions.get("UseAVX").map(Integer::valueOf).orElse(0) >= 2;
+
+  /** true for arm cpu with SVE support. */
+  private static final boolean HAS_SVE =
+      HotspotVMOptions.get("UseSVE").map(Integer::valueOf).orElse(0) > 0;

Review Comment:
   I'd use `>= 1` like in the check for AVX2 above.



-- 
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

Reply via email to