Commit Graph

6 Commits

Author SHA1 Message Date
Stephen Canon
6971335803 Switch from using deprecated float3-style names to SIMD3<Float> in overlays. (#24743) 2019-05-14 13:20:13 -04:00
Stephen Canon
fbd1d4cecc Use the blessed (repeating: Scalar) init instead of (Scalar) in simd. (#23534) 2019-03-25 20:32:16 -04:00
Stephen Canon
1a9ae47d06 Teach the importer to import any clang vector type as SIMDn<Scalar>. (#23454)
* Teach the importer to import any vector type as SIMDN<Scalar>.

Instead of having a known set of vector types, check to see if the
element type conforms to SIMDScalar; if it does, see if we have a
SIMDN defined with the right number of elements. If both are satisfied,
import the vector type as that Swift type.

By making this change, we gain the ability to import vector types
that aren't defined in terms of the Darwin simd module, which lets
us use C API with vector types on other platforms. It also lets us
import *every* vector type that Swift can represent, rather than the
small subset that are currently hardcoded.

* Increased test coverage for increased SIMD types that we can import.

Includes some minor cleanup from review. Also eliminates the old
simd_sans_simd test, since we can now import all of these types even when the simd module isn't imported.
2019-03-22 22:11:22 -04:00
Thomas Roughton
e0c9a6e17c SIMD Overlay: inline deprecated methods (#23250)
On Swift 5, using the deprecated `SIMD.init(_ scalar: Scalar)` initialiser rather than `SIMD.init(repeating scalar: Scalar)` will cause the type to fail to be specialised, resulting in performance degradation. Mark this method and `static prefix func -` as `@_transparent` to ensure they are correctly specialised.
2019-03-22 16:19:53 -04:00
Doug Gregor
69c9fbc3c8 Move SIMD operators back into the Swift standard library
Moving them out to SIMDOperators didn't help, but the type checker hack
might. Move them back into the Swift standard library where they belong,
but leave SIMDOperators there to smooth over any short-term
incompatibilities.
2018-12-17 11:07:32 -08:00
Saleem Abdulrasool
41d9c2cc59 stdlib: restructure for OS family layout of SDK overlay
The SDK directory is now confusing as the Windows target also has a SDK
overlay.  In order to make this more uniform, move the SDK directory to
Darwin which covers the fact that this covers the XNU family of OSes.
The Windows directory contains the SDK overlay for the Windows target.
2018-12-06 11:32:05 -08:00