Skip to content
This repository was archived by the owner on Apr 16, 2023. It is now read-only.

philipturner/swift-intel-float16

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Float16 on Intel Macs

This package enables Float16 from the Swift Standard Library on Intel Macs. The floating-point type is available on Linux and Windows with x86_64, but not on macOS. ARM64 creates a stable calling convention when compiling in LLVM, letting Apple officially port Float16 to iOS and M1 Macs. However, Intel has a unique calling convention that creates ABI instability.

How to Use

#if ((os(macOS) || targetEnvironment(macCatalyst)) && arch(x86_64))
import Float16Module
#endif

print("\(Double(2)) is a Double.")
print("\(Float(2)) is a Float.")
print("\(Float16(2)) is a Float16.")

About

Float16 on Intel Macs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published