Implement AtomicValue conformances for Float, Double and Float16. Requirements/constraints:
compareExchange must compare the underlying encoded bit patterns rather than performing actual floating point comparisons. (I.e., it must consider negative zero different from positive zero, it must consider a NaN value equal to itself, etc.)
- We should provide as many direct operations as llvm/clang exposes. It would be nice to at least provide an atomic addition.
- We probably don't need/want an
AtomicFloatingPoint protocol.
Implement
AtomicValueconformances forFloat,DoubleandFloat16. Requirements/constraints:compareExchangemust compare the underlying encoded bit patterns rather than performing actual floating point comparisons. (I.e., it must consider negative zero different from positive zero, it must consider a NaN value equal to itself, etc.)AtomicFloatingPointprotocol.