rmuir commented on PR #14939:
URL: https://github.com/apache/lucene/pull/14939#issuecomment-3065506662

   Here's how i'd do this with forbidden-apis:
   
   ```
   @defaultMessage("potentially slow on some cpus, please check the cpu has the 
feature")
   # falls back to BigDecimal
   jdk.incubator.vector.Float16#fma(**)
   jdk.incubator.vector.FloatVector#fma(**)
   jdk.incubator.vector.DoubleVector#fma(**)
   jdk.incubator.vector.VectorOperators.FMA
   # unsupported on neon
   jdk.incubator.vector.ByteVector#compress(**)
   jdk.incubator.vector.IntVector#compress(**)
   jdk.incubator.vector.ShortVector#compress(**)
   jdk.incubator.vector.LongVector#compress(**)
   jdk.incubator.vector.VectorOperators.COMPRESS_BITS
   # unsupported on neon
   jdk.incubator.vector.ByteVector#expand(**)
   jdk.incubator.vector.IntVector#expand(**)
   jdk.incubator.vector.ShortVector#expand(**)
   jdk.incubator.vector.LongVector#expand(**)
   jdk.incubator.vector.VectorOperators.EXPAND_BITS
   ```
   
   We'd have to define helpers (like we have for FMA) for compress() and 
expand() that have the `@SuppressWarnings`, but it would serve the same goal.
   
   Goal is simple: if the code calls IntVector.compress() or similar, I want us 
to first check that the CPU supports that capability.


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