Post

Replies

Boosts

Views

Activity

Reply to 'Float16' is unavailable in macOS when in swift package
I'm very upset because I feel like it should be easier to find than this, but in the docs (and the Float16 header): /// A half-precision (16b), floating-point value type. /// /// `Float16` is available on Apple silicon, /// and unavailable on Intel when targeting macOS. sooo, basically, if you conditionally compile for arm, it should work: #if arch(arm64) @available(macOS 11.0, iOS 14.0, *) let value: Float16 = 0 #endif
Aug ’23
Reply to 'Float16' is unavailable in macOS when in swift package
I'm very upset because I feel like it should be easier to find than this, but in the docs (and the Float16 header): /// A half-precision (16b), floating-point value type. /// /// `Float16` is available on Apple silicon, /// and unavailable on Intel when targeting macOS. sooo, basically, if you conditionally compile for arm, it should work: #if arch(arm64) @available(macOS 11.0, iOS 14.0, *) let value: Float16 = 0 #endif
Replies
Boosts
Views
Activity
Aug ’23