mirror of
https://github.com/apple/swift-numerics
synced 2026-11-22 04:30:45 +00:00
Remove relaxed add/mul for Float16 on wasm, as they cannot be defined.
This commit is contained in:
1 file changed
+5
@@ -173,6 +173,10 @@ extension Float16: Real {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !arch(wasm32)
|
||||
// WASM doesn't have _Float16 on the C side, so we can't define the C hooks
|
||||
// that these use. TODO: implement these as Swift builtins instead.
|
||||
|
||||
@_transparent
|
||||
public static func _relaxedAdd(_ a: Float16, _ b: Float16) -> Float16 {
|
||||
_numerics_relaxed_addf16(a, b)
|
||||
@@ -182,6 +186,7 @@ extension Float16: Real {
|
||||
public static func _relaxedMul(_ a: Float16, _ b: Float16) -> Float16 {
|
||||
_numerics_relaxed_mulf16(a, b)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user